POV-Ray : Newsgroups : povray.general : Normals with large and small traingles. : Re: Normals with large and small traingles. Server Time
19 Nov 2024 07:26:27 EST (-0500)
  Re: Normals with large and small traingles.  
From: Tor Olav Kristensen
Date: 4 May 2002 20:12:00
Message: <3CD4782E.9C15A588@hotmail.com>
Warp, I just remembered that I had not replied to this.

I think that I misunderstood the "nature" of the problem.
Thank you for explaining though.


Tor Olav


Warp wrote:
> 
> Tor Olav Kristensen <tor### [at] onlineno> wrote:
> > Hmmm... I don't know how POV-Ray calculates this.
> 
> > But IIRC ABX once "proved" with an image example
> > that if the area of the triangles are used to
> > scale the normal vectors for each triangle, then
> > it produces quite "smooth shading" results for a
> > mesh.
> 
>   We have to make a distinction between normals at triangle vertices and
> normals inside triangles (which are calculated internally by POV-Ray).
>   The normals at the vertices of the triangles are user-defined and thus
> whatever the user wants them to be.
>   The normals inside the triangle are calculated by POV-Ray by interpolating
> the vertex normals.
>   The normal vector at any point in the triangle is the weigthed average
> of the normals at the vertices, where the weight factor for each normal is
> the distance of the point from that normal. At the edge of the triangle the
> normal at any point is the weigthed average of the two normals at the two
> vertices of that edge.
> 
>   In this special case, where we need the normal vector at the point X and
> we want the result to be smooth, we can't set X to whatever we like, but
> we have to set it to what POV-Ray calculates as the normal vector of triangle
> A at point X. If you set the normal vectors at X for triangles B and C to
> *anything* else than what POV-Ray calculates for triangle A at the point X,
> you will not get smooth lighting.
>   This is the crucial thing to understand in this.
> 
>   As said before, the normal vector of the triangle A at the point X is
> the weighted average of the two vertex normals (which I marked as y and z),
> where the weigth factor is the distance of X from them.
>   I don't know what is the *exact* formula (eg. I don't know if POV-Ray
> normalizes the two vertex normals or not before calculating the weighted
> average), but it shouldn't be too complicated.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.