|
|
Hello all,
I experienced a problem with the lighting in a CSG scene, where a sphere_sweep
is subtracted from a Round_Box: under certain angles the subtracted sweep gets
dark spots and areas. This behavior occurs on version 3.7.0.msvc10.win64, on
version 3.7.0.RC7.msvc10.win64, but NOT on version 3.6.2.msvc9.win64 (there
everything looks fine).
To reproduce the problem, I set up the following scene:
//*********************************************************************
#include "shapes.inc"
#declare CameraLocation=<20,15,15>;
//#declare CameraLocation=<10,15,15>;
camera {
location CameraLocation
direction <0, 0, 1.5>
sky <0,0,1>
angle 15
look_at <3,2.5,0.4>
}
global_settings { ambient_light rgb <0.1,0.1,0.1> }
light_source { <-5, 7.4, 12> color rgb<1, 1, 1> * 1.75 }
light_source { <15, -6, 17> color rgb<1, 1, 1> * 1.75/3 }
plane { z, -1.0 pigment { color rgb <1.0,1.0,1.0> } }
#declare Modulator_Object=object {
difference{
Round_Box(<-1,-0.4,-0.13>,<1,0.4,0.2>, 0.05 , yes)
sphere_sweep {
cubic_spline
6,
<-1.0,0.001, 0.2>, 0.03
<-0.9,0.001, 0.2>, 0.03
<-0.8, 0.03, 0.2>, 0.03
<-0.6, 0.17, 0.2>, 0.03
<-0.5, 0.2, 0.2>, 0.03
<-0.4, 0.2, 0.2>, 0.03
tolerance 0.001
}
sphere_sweep {
cubic_spline
6,
<-1.0,-0.001, 0.2>, 0.03
<-0.9,-0.001, 0.2>, 0.03
<-0.8,-0.03, 0.2>, 0.03
<-0.6,-0.17, 0.2>, 0.03
<-0.5,-0.2, 0.2>, 0.03
<-0.4,-0.2, 0.2>, 0.03
tolerance 0.001
}
sphere_sweep {
cubic_spline
6,
<1.0,0.001, 0.2>, 0.03
<0.9,0.001, 0.2>, 0.03
<0.8, 0.03, 0.2>, 0.03
<0.6, 0.17, 0.2>, 0.03
<0.5, 0.2, 0.2>, 0.03
<0.4, 0.2, 0.2>, 0.03
tolerance 0.001
}
sphere_sweep {
cubic_spline
6,
<1.0,-0.001, 0.2>, 0.03
<0.9,-0.001, 0.2>, 0.03
<0.8,-0.03, 0.2>, 0.03
<0.6,-0.17, 0.2>, 0.03
<0.5,-0.2, 0.2>, 0.03
<0.4,-0.2, 0.2>, 0.03
tolerance 0.001
}
}
}
object{ Modulator_Object
texture{ pigment{ color rgb<1.0,0.3,0.3>} finish { phong 1 } }
rotate -x*40 translate<3,-0.5,0>
}
object{ Modulator_Object
texture{ pigment{ color rgb<1.0,0.7,0.3>} finish { phong 1 } }
rotate -x*30 translate<3,0.5,0>
}
object{ Modulator_Object
texture{ pigment{ color rgb<1.0,1.0,0.3>} finish { phong 1 } }
rotate -x*20 translate<3,1.5,0>
}
object{ Modulator_Object
texture{ pigment{ color rgb<0.7,1.0,0.3>} finish { phong 1 } }
rotate -x*10 translate<3,2.5,0>
}
object{ Modulator_Object
texture{ pigment{ color rgb<0.3,1.0,0.3>} finish { phong 1 } }
rotate x*0 translate<3,3.5,0>
}
object{ Modulator_Object
texture{ pigment{ color rgb<0.3,1.0,0.7>} finish { phong 1 } }
rotate x*10 translate<3,4.5,0>
}
object{ Modulator_Object
texture{ pigment{ color rgb<0.3,1.0,1.0>} finish { phong 1 } }
rotate x*20 translate<3,5.5,0>
}
//*********************************************************************
If you use the second "#declare CameraLocation", you will see, that then the
error occurs only in the lower left corner and that there are some dark spots
(when rendered without AA) at the ends of the sphere_sweeps, where the sweep
goes over into the spherical end cap.
Is there a solution to avoid this error?
Post a reply to this message
|
|