POV-Ray : Newsgroups : povray.beta-test : Heightfield bug (most probably an inverted normals problem) : Re: A possible solution, though difficult Server Time
18 Apr 2024 23:11:21 EDT (-0400)
  Re: A possible solution, though difficult  
From: Warp
Date: 23 Jan 2002 13:13:01
Message: <3c4efd2d@news.povray.org>
Christopher James Huff <chr### [at] maccom> wrote:
: Any idea what the visual effects of this will be?

  It will look correct (well, not 100% correct, but smooth triangle shading
is never 100% correct anyways).

: You will be seeing a surface with the normal pointing away 
: from you

  That doesn't matter because it's only used for the illumination, nothing
else.

: I think that unless you toss an "fabs()" into the mix, you 
: will end up with negative diffuse values.

  How so? From the point of view of the light source, nothing strange is
happening.
  It should work correctly in the way I proposed.

  And where do you propose to put the fabs()? I don't understand it.

: I still like my method: If the triangle normal is pointing towards you, 
: but the interpolated normal is pointing away, ignore the intersection 
: and the next one with the same object. The effect should be that you 
: just don't see the corners that you shouldn't be seeing...it might even 
: round out the outline a little.

  This will result in big holes in the mesh in some cases (note that the
normal vectors at the vertices of the triangles do *not* necessarily have to
be the average of the adjacent triangle normals; they can be anything).

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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