|
![](/i/fill.gif) |
> If you do not provide a surface normal, POV-Ray has to compute one for you.
> If both sides of the triangle mesh are to be lit and textured equally, the
> direction of the surface normal does not matter. However, if you want
> POV-Ray to apply different texturing or lighting to the backface and
> frontface, it needs more information such that all normals point in the same
> direction.
>
> In order to let POV-Ray do this, you have to provide all triangle vertices
> in the same order. Either clockwise or counterclockwise, it does not matter
> which order, just that they all have the same order.
>
> This is the *only* way POV-Ray can compute a surface normal that always
> points in the same direction. Once all your triangle vertices are specified
> in the same order, the surface normal will be well-defined and POV-Ray can
> correctly apply the backface and frontface texture.
>
You are right, but it is a pity that the manual is not clear on that
point ! (I looked again, nowhere what you says is said in the doc)
Moreover, I found there must be a bug in my normal vector (I do have
some), because when I remove them the front and back side are OK (the
order of vertices gives a correct orientation because the same order is
used under OpenGL)
However, OpenGL never uses normal for orientation, so I could not see my
bug under OpenGL, and discovered it when I exported pov files.
Anyway a big thanks for your help. Your "aggressive" (a bit ;-)
discourse let me think that you must be right and I must be wrong and
the discovered that I had a bug ...
Again, it is a pity that the manual is not clear on that point !
because I would not have had doubt if the manual was clear.
Now I just need to find the bug in my code and fix it !
Post a reply to this message
|
![](/i/fill.gif) |