POV-Ray : Newsgroups : povray.unofficial.patches : Why does the normal flip? Server Time
1 Nov 2024 15:25:10 EDT (-0400)
  Why does the normal flip? (Message 1 to 1 of 1)  
From: Warp
Subject: Why does the normal flip?
Date: 18 Sep 2000 11:21:52
Message: <39c6330f@news.povray.org>
This question is not related to unofficial patches since it happens in
the official povray as well, but since this is more like a development
group, I'll ask this here.

  When using certain amount of turbulence and optioins related to it,
the normal vector can flip to the other side of the surface, thus
causing an incorrect result (such as the surface being illuminated by
a light at the other side of the surface).

  For example in this scene there are big red parts in the plane although
the red light is under the plane and should not illuminate any part of
the upper side of the plane.
  Evidently the normal vectors are flipping to the other side of the plane
and thus the incorrect illumination.

camera { location <0,2,-5>*.2 look_at 0 angle 45 }
light_source { <2,3,-1>, 1 }
light_source { -y*20, <1,0,0> }

plane
{ y,0
  pigment { rgb 1 }
  normal
  { gradient x 1 slope_map
    { [0 <0,0>][.25 <.5,1>][.5 <1,0>][.75 <.5,-1>][1 <0,0>]
    }
    turbulence 1
    octaves 3
    lambda 2
    omega 2
  }
  finish { specular .5 }
}


  Is it a bug or just a known "overflow"?
  Could this "overflow" of normal turbulence be fixed, eg. if the
angle between the resulting normal and the actual surface normal is >90
degrees, then rotate it to 90 degrees, or something like that. Of course
this will cause plateaus... (does this sound familiar?-) ).

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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