[Algorithms] Some N-Patch questions...
Brought to you by:
vexxed72
From: Peter W. <Pet...@vi...> - 2000-08-07 07:41:14
|
I've been following the discussion on N-Patches, and whilst I was at home this weekend, I had a few ideas for modifications, and I thought I'd throw them open for discussion. I use the same method as ATI to calculate the 9 control points of the bezier lines along each edge of each tri, except I change their 'divide projection of edge onto plane by 3' into a multiplication by an arbitrary tangent scale factor, which works best in the range 0 to 0.5.(*1) We now have 9 control points effectively forming 3, 3D bezier lines along each edge. I then use the bezier curve convex hull subdivision formula from Watt&Watt, 3.4.1, page 81, to calculate the midpoint of each bezier curve.(*2) I use each of these midpoints as a new vertex to split the original triangle into 4. To calculate the normals at each new vertex, I interpolate halfway between the two adjacent original normals, eg MidNorm=Cos(45)*Norm0+Sin(45)*Norm1. I then keep doing this recursively on each of the four triangles, either to a fixed level or until some heuristic is satisfied. I've tried a test implementation, and it seems to give quite pretty results on the single tetrahedron I've tried. It also tends towards a surface with G1 continuity, I think, which ATI's patches don't. One other nice thing about this scheme is that if information is only used from a single edge in the 'should we split this edge' heuristic, you automatically get no cracking since no per-face info is involved. Thoughts? Does it make sense? I'm not on the DirectX beta, so I haven't seen any discussion of N-patches apart from this list, and I'm just getting to grips with subdivision surfaces, so if anyone can point me in the direction of prior work on schemes like this, I'd be grateful. Peter Warden (*1) The tangent scale works a bit like a weight, a small value gives a bevelled appearance, and it tends towards blobbyness as it increases. Out of the range 0-0.5, you get some very weird and wonderful stuff! (*2) This formula only involves additions, multiplies and divisions by 2, so it's quite efficient. I always wanted to use it for something, since it is so elegant, but those darn floating point units always made it faster to calculate the full formula than use recursion on the machines I've implemented beziers on. |