POV-Ray : Newsgroups : povray.general : Why are these "invisible" spheres visible? : Re: Why are these "invisible" spheres visible? Server Time
31 Jul 2024 12:25:41 EDT (-0400)
  Re: Why are these "invisible" spheres visible?  
From: darenw
Date: 19 Sep 2007 02:30:01
Message: <web.46f0c0ffc3c951275eca966c0@news.povray.org>
"gadoid" <hansen at tkgate.org> wrote:
>... it may be reversing the normal, I at first thought it was
> just shifting it.  I'm beginning to think that this must be a POV-Ray bug,


Seems to be more complicated than reversing the normal. Here is a test scene
that creates several "invisible" discs with varying rotations of a texture.
Note how some of the bumps are lit sideways.   (I've uploaded an image to
povray.binaries.images)

This does look like a bug where, given a sufficiently complicated (semi or
fully) transparent texture on one object, and a 2nd object with a normal
pattern behind it, somehow leftover transformations from dealing with the
first object "stick" in some data structure when calculating lighting on
the 2nd one.  I looked at the source code, but the flaw isn't obvious;
perhaps someone with more recent experience hacking normal.cpp or
lighting.cpp can spot it.

Sorry, no good general workaround i can find yet.  An awkward workaround is
to put behind each object using a rotated transparent texture like your
T_Electron, an invisible object using a purely invisible texture (rgbt
<1,1,1,1>, no patterns) but rotating oppositely.  These invisible
compensator objects going between the real objects and the background would
have to match in shape as seen from the camera. Yeeks, good luck with that!


/// funnynormal.pov
/// render with:  povray +D +P +X -ifunnynormal.pov  +w800 +h600
plane {z, 0
 pigment {color rgb 1}
 finish {diffuse 1  ambient  0}
 normal { leopard 1  sine_wave    scale .2}
}

#declare ClearTex=   texture {
   pigment { color rgbt <.8, 1, 1, 1>}
   finish { ambient 0  diffuse 0}
}

#declare IndirectClearTex = texture {
  bozo  texture_map { [0 ClearTex] }
}

#declare ix=-3;
#while (ix <=3)
 disc {<ix*2, 2,-5>, z,.8 texture{        ClearTex rotate 45*ix*y}}
 disc {<ix*2, 0,-5>, z,.8 texture{IndirectClearTex rotate 45*ix*y}}
 disc {<ix*2,-2,-5>, z,.8 texture{IndirectClearTex rotate 45*ix*z}}
 #declare ix=ix+1;
#end

light_source { <100, 0, -10> rgb <.8,.8,1>*2 }
light_source { <0, 100, -30> rgb <.2, .2, 0> }
camera {
 orthographic
 location <0,0,-100>
 right <15,0,0>
 up <0,10,0>
 direction <0,0,1>*10
}


Post a reply to this message

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