|
![](/i/fill.gif) |
In article <3c82b7fd@news.povray.org>,
"Alf Peake" <alf### [at] peake42 freeserve co uk> wrote:
> Its a bit late at night for me but do I understand that I could use
> trace() on a vertex and use the returned normal as an average for all
> other triangles in a mesh sharing that vertex? I'm referring to
> MegaPov, not 3.5 and just starting to play with generating triangles
> for the first time.
I'm not sure what you mean here...if you trace a ray directly at a
vertex of a mesh, there is no way to predict which triangle it will hit.
POV certainly won't pick all the possible triangles and average their
normals for you. If the mesh is non-smooth, the returned normal will be
the normal of any one of the adjacent triangles. You have to compute a
normal yourself. The POV 3.5 macros can do it accurately because they
have access to the geometry of the surface around each vertex, not just
the vertices. Averaging the normals of the triangles around the point
usualy produces acceptable results as well, but trace() won't be very
useful for this.
--
Christopher James Huff <chr### [at] mac com>
POV-Ray TAG e-mail: chr### [at] tag povray org
TAG web site: http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |