I have a polygonal mesh with ngons in it. I want to make a tessellation shader to which I send only the regular quads in such a way that it can construct a B-Spline surfaces across it. I came across the useful tutorial, but I do not completely understand it, and my problem is slightly more general in that it contains irregular polygons and vertices. In the mesh I am looking for regular quads, i.e., quads for which all vertices have valency 4. They look like this
| |
___|____|___
| |
___|____|___
| |
| |
It is the inner face that I want the tessellation shader to divide up and then smooth using B-spline method. However, for the B-spline method I need 16 points, So I must subdivide the inner face like this
______ . . . .
| | . . . .
| | --> . . . .
|______| . . . .
I am lost on how to find these points, I can of course just use averaging to get these points but then there will be no smoothing happening. The subdivision rules I normally use are all binary, that is, they split edges into two edges, but this can not produce such a set of control points.
How do I proceed from here? Should I just resort to using quadratic B-splines, and use the top diagram to find approximations of the half way points and send those to the shader? Another issue is that adjacent faces of regular quads may very well be triangles or pentagons etc. So it is difficult to find the points I need for the tessellation shader to perform B-spline smoothing.
Thanks for any tips, if anyone would like some more clarification about the problem please ask, I realize that the question might be vague.