PDA

View Full Version : Approximating curved surfaces cheaply



John Nagle
02-03-2002, 08:52 PM
Consider Phong shading, where the surface normal for shading purposes is interpolated from the vertex normals. With Phong shading, faces are still flat, but the normals behave as if they were curved.

Suppose we construct the curved surface which is continuous and perpendicular to all the Phong normals. We then express this surface procedurally as a displacement from the flat face. This yields a procedural displacement map, which, if applied, would create a true curved surface. For example, if a sphere were drawn in this way, it would occlude its background as a true circle, not a polygon.

This could be the next step up from Phong shading. The underlying model is still a mesh, but the illusion of a curved surface doesn't break down at the edges. This could make low-poly models look much better.

Somebody must have thought of this years ago.
But I haven't seen it in the usual textbooks. It might be implementable on modern graphics boards that support displacement mapping, so it's worth looking at.

Comments?

Gorg
02-03-2002, 11:20 PM
I don't remember all the math, but isn't that an N-Patch?

Ati has it in hardware(TRUFORM).

AdrianD
02-05-2002, 05:41 AM
What you are asking for are subdivision surfaces. Every professional modeller uses them. ie. in 3DStudioMAX they are called NURMS, in Cinema4D MetaNurbs.
There are many papers about this topic on the web. Try "subdivision surfaces" in a
searchengine.

another keywords are:
"Catmull-clark surfaces"
"doo-sabin surfaces"
"loop-surfaces"

jwatte
02-05-2002, 11:08 AM
TruForm does something like this. There are problems when you have vertices which share location but not normal, as you'll get cracks where polygons used to line up flat. The "solution" is to put a quad in between these edges, using all four verts that make up the two separate edges. Unfortunately, this means that a sharp crease will no longer be as sharp, so to make it really good, you have to model the geometry to take this into consideration, making sure that sharp-creased edges are made up of vertices with normals that both point in the same direction.

John Nagle
02-05-2002, 06:13 PM
I'd been thinking of something more like a procedural displacement shader than a subdivision system. You'd have a function which could be evaluated for any point on a face and would give a "bulge" value, or height above the face. The idea is to evaluate that function as each pixel is drawn and use it as a displacement.

The bulge value must be zero at all vertices. Along edges, it must be determined solely by the data of the vertices at the endpoints of the edge, and its gradient perpendicular to the edge must be zero, so that surfaces will match across edges.

Are all these constraints mathematically achieveable simultaneously?