RE: [Algorithms] Some N-Patch questions...
Brought to you by:
vexxed72
From: Peter W. <Pet...@vi...> - 2000-08-07 15:23:47
|
> > 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 know it's bad form to reply to your own post, but I want to correct the normal interpolation method I gave above. The formula above only works when the two normals are perpendicular, in general I think you'll actually need to add the two normals, and then renormalise the resultant vector to get the new normal, eg MidNorm=(Norm0+Norm1) / (|Norm0+Norm1|) As far as I can see, any desired method can be used to interpolate the normals, as long as it's deterministic and continuous you'll get some variety of smooth surface. I'd like to try applying some normal perturbation stuff like bump-maps to the interpolation code, I think you'd get interesting effects as the surface tried to match the perturbed normals. Peter Warden |