|
![](/i/fill.gif) |
I am working on a curvature pattern, inspired by the patina thread,
which would be for textures only(it would return a constant value if
used in media density). It would return a value depending on the amount
the surface the evaluation point is on is curving.
I am doing this by getting the normal at the evaluation point, using
that normal to find a point directly "up" at that point, and firing
several sample rays at the surface. I can either fire the rays in a ring
at an equal angle to the normal at the evaluation point, or randomly
inside a cone.
My question is: what is a good way of calculating the curvature of a
surface given several points on a surface and normals at those
points(and of course, the number of samples)?
I am thinking the pattern should work return a value between 0 for
maximum curvature away from the normal of the evaluation point and 1 for
maximum curvature toward the normal. But I am not even really sure what
"maximum curvature" is. :-)
I have considered using the average vdot of the sample normals with the
normal of the evaluation point, the average distance of the sample
points from the point the samples are shot from, using parallel sample
rays instead of rays originating from a point...
--
Chris Huff
e-mail: chr### [at] yahoo com
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
![](/i/fill.gif) |