POV-Ray : Newsgroups : povray.newusers : Lighting different when using equivalent isosurface : Lighting different when using equivalent isosurface Server Time
28 Jul 2024 12:33:07 EDT (-0400)
  Lighting different when using equivalent isosurface  
From: Timwi
Date: 20 Mar 2009 22:18:39
Message: <49c44e7f@news.povray.org>
Hi,

I think I may have found a significant bug in POV-Ray, but if it's not a 
bug then please explain to me why, and how I can work around the problem.

Consider the following source:

------------------------------------------------------------------------
#include "colors.inc"

camera { location <2, 2, -5> look_at <0, 0.5, 0> }
light_source { <0, 3, 0> color rgb <0.7, 0.7, 0.7> }

#declare use_iso = 0;

difference {
     box { <-2.5, -1.1, -2.5>,
           < 2.5, 0,     2.5>
     }

     #if(use_iso)
         // this isosurface _should_ be equivalent to the cylinder below
         isosurface {
             function { pow (x, 2) + pow (z, 2) - 4 }
             max_gradient 5.310
             accuracy .0001
             contained_by {
                 box { <-2.01, -1,  -2.01>,
                       < 2.01, .01,  2.01> }
             }
         }
     #else
         cylinder { <0, -1, 0>, <0, .01, 0>, 2 }
     #end

     pigment { Green }
}
------------------------------------------------------------------------

Try rendering this with use_iso set to 0 and then with it set to 1. I 
would have thought the two should produce pretty much the same result, 
since the isosurface is equivalent to the cylinder.

But the result I get is this: with the cylinder everything works as 
expected, but with the isosurface, the inside of the object is 
completely black, even though there is a light source right next to it.

Is this a bug, or am I doing something wrong? If so, what?

Thanks
Timwi


Post a reply to this message

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