Abstract
Texture mapping allows high resolution details over 3D surfaces. Nevertheless, texture mapping has a number of unresolved problems such as distortion, boundary between textures or filtering. On the other hand, NURBS surfaces are usually decomposed into a set of Bézier surfaces, since NURBS surface can not be directly rendered by GPU. In this work, we propose a texture mapping directly on the NURBS surfaces using the RPNS (Rendering Pipeline for NURBS Surface) method, which allows the rendering of NURBS surface directly on the GPU. Our proposal facilitates the implementation while minimizing the cost of storage, mitigating distortions and stitching between textures.
1. Introduction
NURBS (Non-Uniform Rational B-Splines) [] surfaces are one of the standards for data representation, design and exchange in CAD/CAM/CAE applications. NURBS surfaces with textures allows a more realistic representation of the surfaces, improving the final scene in areas such as modeling, virtual reality or animation []. Texture mapping presents a set of problems that usually require user intervention []. The application of texture NURBS surfaces implies a high cost of storage due to the utilization of techniques such as texture atlas generation []. In this work we propose a texture mapping directly on the NURBS surfaces using RPNS (Rendering Pipeline for NURBS Surface) []. RPNS is a solution for the direct evaluation of NURBs surface on the GPU without any previous decomposition to Bézier surfaces.
2. Texture Rendering
RPNS adds a new primitive to the input flow of the geometry stage, KSQuad. In addition, an intermediate stage, the sampler, is added between the geometry and the rasterization stages, as shown in Figure 1. In this stage, KSQuad primitives are sampled adaptively according to the point of view, the geometric characteristics of the surface, and the contour edges between surfaces. This sampling results in a set of sampling points or dices called KSDice that allow the surface to be rendered without cracks or holes. Each KSDice consists of a sampling point and additional information such as the parametric size of the matrix and the grade of the corresponding surface, and does not store any explicit connectivity information. KSDice is a primitive that can ultimately be projected to a single pixel or a set of pixels.
Figure 1.
Rendering texture mapping pipeline for NURBS surfaces.
In the implementation of our proposal, we make use of Texture2DArray, a type of texture coordinated with DirectX and HLSL5 (High Level Shader Language), that allows the definition of colors directly on the KSDices.
3. Results and Conclusions
In this section we present the results obtained on different models (Figure 2) with our proposal. The platform on which the different tests were performed consists of an Intel i7-4790 3.6 GHz with 32 GB of RAM and a NVidia GTX 1080ti with 11GB GDDR5X. As for the software, the tests were conducted on Windows 10 using Visual Studio Community 2017 with DirectX 11 and Microsoft HLSL.
Figure 2.
NURBS Models: (a) Hinge; (b) Head.
Our proposal shows how NURBS surface can be used with textures without previous transformations.
Author Contributions
All authors contributed equally.
Acknowledgments
This research was funded by [the Ministry of Economy and Competitiveness of Spain and FEDER funds (80%)] grant number [TIN2016-75845-P], by [the Government of Galicia (Xunta de Galicia) co-founded by ERDF funds under the Consolidation Programme of Competitive Reference Groups] grant number [ED431C 2017/04], by [the Consolidation Programme of Competitive Research Units] grant number [R2014/049 and R2016/037] and by [the Xunta de Galicia (Centro Singular de Investigación de Galicia accreditation 2016–2019) and the European Union (European Regional Development Fund, ERDF)] grant number [ED431G/01].
Conflicts of Interest
The authors declare no conflict of interest. The founding sponsors had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, and in the decision to publish the results.
References
- Les Piegl, W.T. The NURBS Book, 2nd ed.; Springer: Berlin, Germany, 1997. [Google Scholar]
- Pascu, N.E.; Dobrescu, T.; Opran, C.; Enciu, G. Realistic Scenes in CAD Application. Procedia Eng. 2014, 69, 304–309. [Google Scholar] [CrossRef][Green Version]
- Yuksel, C.; Keyser, J.; House, D.H. Mesh colors. ACM Trans. Gr. 2010, 29, 15. [Google Scholar] [CrossRef]
- Guthe, M.; Klein, R. Automatic Texture Atlas Generation from Trimmed NURBS Models. Comput. Gr. Forum 2003, 22, 453–462. [Google Scholar] [CrossRef]
- Concheiro, R.; Amor, M.; Padrón, E.J.; Doggett, M. Interactive rendering of NURBS surfaces. Comput. Aided Des. 2014, 56, 34–44. [Google Scholar] [CrossRef]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).