|
 |
"Christopher James Huff" <chr### [at] mac com> wrote in message
news:chr### [at] netplex aussie org...
> 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
I'm trying to convert a non-rendered object, blueprints, but with with
known points on the surface. Inventing the wheel. At least I'll
understand the script ;-) I was trying to figure ways to calculate
the average normal for smoothing.
Your comment made me think that after storing each _unique_ vertex in
an array indexed by the triangle's number I could use trace with each
vertex. It only needs to be used once per vertex and will cover all
triangles sharing that vertex.
#declare Average_Norm = <0,0,0>;
#declare Temp = trace( Object, Vertex*2, -Vertex, Average_Norm );
<wimper> Ahhh! The light dawns - I need Object in the first place. I
don't have it :( Excuse me while I arrange a brain transplant.
</wimper>
Alf
Post a reply to this message
|
 |