Search code examples
algorithm3dsurfacecadnurbs

Bézier Triangles and N-Patches


I'm trying to make a smooth surface out of a polygon mesh. So to make the needed subdivisions, I want to use N-Patches, which consist of Bézier triangles. As I understand, Bézier triangles can be made out of triangle polygon meshes, which are made out of triangle primitives, as seen her:enter image description here

This, however, complicates the task. For example, if I provide a polygon mesh made out of triangle primitives, how do I apply the Bézier triangles and hence the N-patches to the polygon mesh information? For a cubic Bézier triangles, do I need to bind all of the polygon triangles in a group of 9 triangles, where each group represents a bigger triangle, so I get the 9 border control points, with which I can get the inner needed control points, with which to perform a de Casteljau algorithm for the cubic Bézier triangle, as seen here:

enter image description here

This doesn't seem practical and in many cases unusable, e.g. the UV map of the polygon mesh must constructed ouf of these 9 vertices triangles (a group of 9 basic triangles).

This seems the only logical use of Bézier triangles to me, but I think the Bézier Triangles should be constructed out of/for each basic polygon mesh triangles, but this doesn't make sense. If you construct inner control points of a basic polygon mesh triangle with de Casteljau for Bézier triangles, what is there to control/smooth anyway? The basic triangles, out of which the polygon mesh is made of, are completely flat, as all 3 points of the triangle are guaranteed to be on the same plane - so the surface over a triangle will be flat even after using the Bézier triangle, which is the correct behavior. That's why I reasoned the Bézier Triangles need to be created out of many basic triangles.

Some quick reference: http://www.gamasutra.com/view/feature/131389/b%C3%A9zier_triangles_and_npatches.php?print=1


Solution

  • The N-patch is to create a cubic triangular Bezier surface from each triangle of the mesh. Each triangle is defined by 3 vertices and 3 normals. So, the constructed cubic triangular Bezier surface will not be planar in general (unless the 3 normals are all parallel to each other).