|
|
I am having strange shadows appear on my image that I can't explain, and
that seem to change and/or disappear under different conditions, as I will
explain in more detail below. First, here is the entire image, so you can
see the problem:
http://www.hentschels.com:8000/~pictures/cgi-bin/album/index.cgi?file=/2004/08August/DansBlocks/block.jpg
The shadows in question are on the blue and yellow balloons in the top
block. The same thing can also be seen in this other image from a different
perspective:
http://www.hentschels.com:8000/~pictures/cgi-bin/album/index.cgi?file=/2004/04April/Blocks/block_04-03-04.jpg
I have simplified my scene significantly to try and isolate the problem, and
I have included the "simplified" code at teh bottom of this message. I put
simplified in quotes because it's still a long file. Sorry. I tried to
remove more, but it has a drastic effect on the shadow that I am trying to
isolate. For example, if I remove the glass_walls, the shadow looks
perfect. If I remove the red balloon, the shadow changes and the defect is
not very noticeable. Same thing if I remove the balloon strings. Ditto with
removing the mirror. All of these objects seem like they are not related to
the shadows in question, but removal of them has a large impact.
Even more puzzling is this: If I render only the portion of the image where
the defect occurs, then the shadow looks correct. If I add "+sc0.397997
+sr0.130217 +ec0.545682 +er0.237062" to the command line and then
re-render, then everything looks as it should. I would not expect that
rendering a section of the image would produce different results than
redering of the entire image, but it does.
I have run the file on three computers, all using either v3.5 or 3.6 for
Windows:
1) AMD Athlon 1700+, 768 MB RAM, Windows XP Pro
2) Intel Celeron 2.6 GHz laptop, 384 MB RAM, Windows XP Home
3) Intel P4 3.2 GHz, 512 MB RAM, Windows XP Pro
The defect is easily visible when rendered at 800x600 and above.
Anti-aliasing doesn't seem to have any impact. Neither does max_trace_level
(I thought it might be an internal-reflections thing).
Is there something else I should try here? Any recommendations? Should I
submit this to the bug group? Please reply to either the e-mail address
provided below, or to the newsgroup. Do not reply to the "dannyb" address
as I might not notice your message among the SPAM. Thanks.
- dan B hentschel
page-dan( **at!** )hentschels.com
"Simplified" code:
#include "glass.inc"
#include "metals.inc"
#include "colors.inc"
#include "math.inc"
#declare block_plastic =
finish { specular 1 roughness 0.002 brilliance 0.5 ambient 0.25 diffuse 0.35
}
#declare block_lavendar = color rgb <146/255, 131/255, 190/255>;
#declare block_lime = color rgb <130/255, 184/255, 90/255>;
#declare block_yellow = color rgb <249/255, 209/255, 75/255>;
#declare block_red = color rgb <176/255, 42/255, 43/255>;
#declare block_blue = color rgb <47/255, 159/255, 223/255>;
camera {
location <4.5, 5.5, -7>
look_at <0.5, 2.5, 0>
right x*image_width/image_height
}
light_source {
0*x
color rgb <0.5,0.5,0.5>
translate <0, 12, -35>
}
light_source {
0*x
color rgb <0.92,0.9,0.85>
translate <10, 50, -16>
}
light_source {
0*x
color rgb <0.85,0.82,0.8>
translate <14, 50, -20>
}
light_source {
0*x
color rgb <0.97,0.93,0.9>
translate <12, 50, -18>
}
// MIRROR
merge {
box {
<-2, 0, 0>
<4, 6, 0.01>
texture {
finish {
specular 0.2
roughness 0.02
ambient 0
diffuse 0.01
reflection {
0.08, 0.6
fresnel on
}
conserve_energy
}
pigment { Clear }
}
interior {
ior 1.7
fade_distance 1.0
fade_power 2
}
}
box {
<-3, 0, 0.0099>
<4, 6, 0.011>
texture {
pigment { White }
finish {
specular 0
roughness 0.001
ambient 0
diffuse 0
reflection 1
}
}
}
translate <0, 0.0, 6.88>
}
#declare box_size = 1.0;
#declare wall_thickness = 0.03*box_size;
#declare corner_width = 0.3*box_size;
#declare small_corner_width = 0.1*box_size;
#declare cap_height = 3*(corner_width - small_corner_width)/2;
#declare glass_height = box_size - cap_height - small_corner_width;
#declare cylinder_size = 0.8*box_size;
#declare round_corner_box =
intersection {
merge {
// Front left corner
cylinder {
<-box_size + corner_width, -2*box_size, -box_size + corner_width>
<-box_size + corner_width, 2*box_size, -box_size + corner_width>
corner_width
}
// Front right corner
cylinder {
<box_size - corner_width, -2*box_size, -box_size + corner_width>
<box_size - corner_width, 2*box_size, -box_size + corner_width>
corner_width
}
// Back left corner
cylinder {
<-box_size + corner_width, -2*box_size, box_size - corner_width>
<-box_size + corner_width, 2*box_size, box_size - corner_width>
corner_width
}
// Back right corner
cylinder {
<box_size - corner_width, -2*box_size, box_size - corner_width>
<box_size - corner_width, 2*box_size, box_size - corner_width>
corner_width
}
box {
<-box_size + corner_width, -2*box_size, -box_size>
<box_size - corner_width, 2*box_size, box_size>
}
box {
<-box_size, -2*box_size, -box_size + corner_width>
<box_size, 2*box_size, box_size - corner_width>
}
}
box {
<-box_size-0.001, -box_size, -box_size-0.001>
<box_size+0.001, box_size, box_size+0.001>
}
}
#declare glass_walls =
difference {
object {
round_corner_box
scale y*(glass_height/box_size)
}
object {
round_corner_box
scale <(box_size-wall_thickness)/box_size, 2,
(box_size-wall_thickness)/box_size>
}
texture {
finish {
specular 1
roughness 0.02
ambient 0
diffuse 0.1
reflection {
0.08, 0.6
fresnel on
}
conserve_energy
}
pigment { Clear }
}
interior {
ior 1.7
fade_distance 1.0
fade_power 2
}
}
#declare block_cover_base =
object {
round_corner_box
scale <1, (cap_height/6)/box_size, 1>
translate y*(cap_height/6)
}
#declare block_cover_lower_corner =
union {
// Left side
cylinder {
<-box_size + small_corner_width, cap_height/3, -box_size +
corner_width>
<-box_size + small_corner_width, cap_height/3, box_size -
corner_width>
small_corner_width
}
// Right side
cylinder {
<box_size - small_corner_width, cap_height/3, -box_size +
corner_width>
<box_size - small_corner_width, cap_height/3, box_size -
corner_width>
small_corner_width
}
// Front
cylinder {
<-box_size + corner_width, cap_height/3, -box_size +
small_corner_width>
<box_size - corner_width, cap_height/3, -box_size +
small_corner_width>
small_corner_width
}
//Back
cylinder {
<-box_size + corner_width, cap_height/3, box_size -
small_corner_width>
<box_size - corner_width, cap_height/3, box_size -
small_corner_width>
small_corner_width
}
// Front left corner
union {
torus {
corner_width - small_corner_width,
small_corner_width
translate <-box_size + corner_width, cap_height/3, -box_size +
corner_width>
}
cylinder {
<-box_size + corner_width, cap_height/3-small_corner_width,
-box_size + corner_width>
<-box_size + corner_width, cap_height/3+small_corner_width,
-box_size + corner_width>
corner_width-small_corner_width
}
}
// Front right corner
union {
torus {
corner_width - small_corner_width,
small_corner_width
translate <box_size - corner_width, cap_height/3, -box_size +
corner_width>
}
cylinder {
<box_size - corner_width, cap_height/3-small_corner_width,
-box_size + corner_width>
<box_size - corner_width, cap_height/3+small_corner_width,
-box_size + corner_width>
corner_width-small_corner_width
}
}
// Back left corner
union {
torus {
corner_width - small_corner_width,
small_corner_width
translate <-box_size + corner_width, cap_height/3, box_size -
corner_width>
}
cylinder {
<-box_size + corner_width, cap_height/3-small_corner_width,
box_size - corner_width>
<-box_size + corner_width, cap_height/3+small_corner_width,
box_size - corner_width>
corner_width-small_corner_width
}
}
// Back right corner
union {
torus {
corner_width - small_corner_width,
small_corner_width
translate <box_size - corner_width, cap_height/3, box_size -
corner_width>
}
cylinder {
<box_size - corner_width, cap_height/3-small_corner_width,
box_size - corner_width>
<box_size - corner_width, cap_height/3+small_corner_width,
box_size - corner_width>
corner_width-small_corner_width
}
}
}
#declare block_cover_slant_walls =
difference {
union {
// Front left corner
cone {
<-box_size + small_corner_width*(1-sind(45)) +
corner_width-small_corner_width*(1-sind(45)), cap_height/3 +
small_corner_width*sind(45), -box_size + small_corner_width*(1-sind(45)) +
corner_width-small_corner_width*(1-sind(45))>,
corner_width-small_corner_width*(1-sind(45)),
<-box_size + small_corner_width*(1-sind(45)) +
corner_width-small_corner_width*(1-sind(45)), cap_height +
small_corner_width*sind(45), -box_size + small_corner_width*(1-sind(45)) +
corner_width-small_corner_width*(1-sind(45))>,
small_corner_width-small_corner_width*(1-sind(45))
}
// Front right corner
cone {
<box_size - small_corner_width*(1-sind(45)) -
corner_width+small_corner_width*(1-sind(45)), cap_height/3 +
small_corner_width*sind(45), -box_size + small_corner_width*(1-sind(45)) +
corner_width-small_corner_width*(1-sind(45))>,
corner_width-small_corner_width*(1-sind(45)),
<box_size - small_corner_width*(1-sind(45)) -
corner_width+small_corner_width*(1-sind(45)), cap_height +
small_corner_width*sind(45), -box_size + small_corner_width*(1-sind(45)) +
corner_width-small_corner_width*(1-sind(45))>,
small_corner_width-small_corner_width*(1-sind(45))
}
// Back left corner
cone {
<-box_size + small_corner_width*(1-sind(45)) +
corner_width-small_corner_width*(1-sind(45)), cap_height/3 +
small_corner_width*sind(45), box_size - small_corner_width*(1-sind(45)) -
corner_width+small_corner_width*(1-sind(45))>,
corner_width-small_corner_width*(1-sind(45)),
<-box_size + small_corner_width*(1-sind(45)) +
corner_width-small_corner_width*(1-sind(45)), cap_height +
small_corner_width*sind(45), box_size - small_corner_width*(1-sind(45)) -
corner_width+small_corner_width*(1-sind(45))>,
small_corner_width-small_corner_width*(1-sind(45))
}
// Back right corner
cone {
<box_size - small_corner_width*(1-sind(45)) -
corner_width+small_corner_width*(1-sind(45)), cap_height/3 +
small_corner_width*sind(45), box_size - small_corner_width*(1-sind(45)) -
corner_width+small_corner_width*(1-sind(45))>,
corner_width-small_corner_width*(1-sind(45)),
<box_size - small_corner_width*(1-sind(45)) -
corner_width+small_corner_width*(1-sind(45)), cap_height +
small_corner_width*sind(45), box_size - small_corner_width*(1-sind(45)) -
corner_width+small_corner_width*(1-sind(45))>,
small_corner_width-small_corner_width*(1-sind(45))
}
// Left
box {
<-sqrt(2)*cap_height/3, -box_size, -box_size + corner_width>
<sqrt(2)*cap_height/3, wall_thickness/2, box_size -
corner_width>
rotate z*45
translate <-box_size + small_corner_width*(1-sind(45)) +
cap_height/3 + wall_thickness*sind(45)/2, 2*cap_height/3 +
small_corner_width*sind(45) - wall_thickness*sind(45)/2, 0>
}
// Right
box {
<-sqrt(2)*cap_height/3, -box_size, -box_size + corner_width>
<sqrt(2)*cap_height/3, wall_thickness/2, box_size -
corner_width>
rotate z*-45
translate <box_size - small_corner_width*(1-sind(45)) -
cap_height/3 - wall_thickness*sind(45)/2, 2*cap_height/3 +
small_corner_width*sind(45) - wall_thickness*sind(45)/2, 0>
}
// Front
box {
<-box_size + corner_width, -box_size, -sqrt(2)*cap_height/3>
<box_size - corner_width, wall_thickness/2,
sqrt(2)*cap_height/3>
rotate x*-45
translate <0, 2*cap_height/3 + small_corner_width*sind(45) -
wall_thickness*sind(45)/2, -box_size + small_corner_width*(1-sind(45)) +
cap_height/3 + wall_thickness*sind(45)/2>
}
// Back
box {
<-box_size + corner_width, -box_size, -sqrt(2)*cap_height/3>
<box_size - corner_width, wall_thickness/2,
sqrt(2)*cap_height/3>
rotate x*45
translate <0, 2*cap_height/3 + small_corner_width*sind(45) -
wall_thickness*sind(45)/2, box_size - small_corner_width*(1-sind(45)) -
cap_height/3 - wall_thickness*sind(45)/2>
}
}
box {
<-box_size, -box_size, -box_size>
<box_size, cap_height/3-0.001, box_size>
}
}
#declare block_cover_upper_corner =
union {
// Left side
cylinder {
<-box_size + 2*cap_height/3 + small_corner_width, cap_height,
-box_size + 2*cap_height/3 + small_corner_width>
<-box_size + 2*cap_height/3 + small_corner_width, cap_height,
box_size - 2*cap_height/3 - small_corner_width>
small_corner_width
}
// Left side
cylinder {
<box_size - 2*cap_height/3 - small_corner_width, cap_height,
-box_size + 2*cap_height/3 + small_corner_width>
<box_size - 2*cap_height/3 - small_corner_width, cap_height,
box_size - 2*cap_height/3 - small_corner_width>
small_corner_width
}
// Front
cylinder {
<box_size - 2*cap_height/3 - small_corner_width, cap_height,
-box_size + 2*cap_height/3 + small_corner_width>
<-box_size + 2*cap_height/3 + small_corner_width, cap_height,
-box_size + 2*cap_height/3 + small_corner_width>
small_corner_width
}
//Back
cylinder {
<box_size - 2*cap_height/3 - small_corner_width, cap_height,
box_size - 2*cap_height/3 - small_corner_width>
<-box_size + 2*cap_height/3 + small_corner_width, cap_height,
box_size - 2*cap_height/3 - small_corner_width>
small_corner_width
}
// Front left corner
sphere {
<-box_size + 2*cap_height/3 + small_corner_width, cap_height,
-box_size + 2*cap_height/3 + small_corner_width>
small_corner_width
}
// Front right corner
sphere {
<box_size - 2*cap_height/3 - small_corner_width, cap_height,
-box_size + 2*cap_height/3 + small_corner_width>
small_corner_width
}
// Back left corner
sphere {
<-box_size + 2*cap_height/3 + small_corner_width, cap_height,
box_size - 2*cap_height/3 - small_corner_width>
small_corner_width
}
// Back right corner
sphere {
<box_size - 2*cap_height/3 - small_corner_width, cap_height,
box_size - 2*cap_height/3 - small_corner_width>
small_corner_width
}
// Top
box {
<box_size - 2*cap_height/3 - small_corner_width, cap_height +
small_corner_width, box_size - 2*cap_height/3 - small_corner_width>
<-box_size + 2*cap_height/3 + small_corner_width, 0.001, -box_size +
2*cap_height/3 + small_corner_width>
}
}
#declare block_cover =
union {
object { block_cover_base }
object { block_cover_lower_corner }
object { block_cover_slant_walls }
object { block_cover_upper_corner }
}
#declare rough_block_cover =
difference {
box {
<-box_size, 0, -box_size>
<box_size, cap_height+small_corner_width, box_size>
}
box {
<-box_size*2, 0, 0>
<box_size*2, box_size, box_size>
rotate x*-45
translate z*(-box_size-cap_height/3)
rotate y*0
}
box {
<-box_size*2, 0, 0>
<box_size*2, box_size, box_size>
rotate x*-45
translate z*(-box_size-cap_height/3)
rotate y*90
}
box {
<-box_size*2, 0, 0>
<box_size*2, box_size, box_size>
rotate x*-45
translate z*(-box_size-cap_height/3)
rotate y*180
}
box {
<-box_size*2, 0, 0>
<box_size*2, box_size, box_size>
rotate x*-45
translate z*(-box_size-cap_height/3)
rotate y*-90
}
}
/* **************************************************
* BALLOON BLOCK
* **************************************************/
#declare balloon_block_top =
difference {
object { block_cover }
intersection {
object {
round_corner_box
scale <0.99, 2, 0.99>
translate y*-box_size
}
union {
object {
rough_block_cover
scale <1-2*wall_thickness, 1.0, 1-2*wall_thickness>
translate y*-0.001
}
object {
rough_block_cover
scale <1-2*wall_thickness, 1.0, 1-2*wall_thickness>
translate y*0.001
}
}
}
translate y*glass_height
texture {
pigment { block_lavendar }
finish { block_plastic }
}
}
#declare balloon_block_top_window =
intersection {
difference {
object {
rough_block_cover
scale <1-2*wall_thickness, 1.0, 1-2*wall_thickness>
}
object {
rough_block_cover
scale <1-4*wall_thickness, 1-wall_thickness, 1-4*wall_thickness>
translate y*-0.001
}
}
object {
round_corner_box
scale <0.99, 2, 0.99>
translate y*-box_size
}
translate y*glass_height
texture {
finish {
specular 0.9
roughness 0.02
ambient 0
diffuse 0
reflection {
0.08, 0.6
fresnel on
}
conserve_energy
}
pigment { Clear }
}
interior {
ior 1.7
fade_distance 1.0
fade_power 2
}
}
#declare balloon_size = 0.35;
#declare balloon_block_balloon =
union {
intersection
{
sphere {
<0, 0, 0>
balloon_size
}
box {
<-balloon_size-0.001, -0.001, -balloon_size-0.001>
<balloon_size+0.001, balloon_size+0.001, balloon_size+0.001>
}
}
intersection
{
sphere {
<0, 0, 0>
balloon_size
}
box {
<-balloon_size-0.001, -balloon_size-0.001, -balloon_size-0.001>
<balloon_size+0.001, 0.001, balloon_size+0.001>
}
scale y*1.5
}
cone {
<0, -balloon_size*1.5-0.1, 0>, 0.12
<0, -balloon_size*1.5+0.1, 0>, 0.06
}
}
#declare balloon_block_string =
cylinder {
<0, 0, 0>
<0, -1, 0>
0.01
texture { T_Chrome_3E }
}
#declare balloon_block =
union {
object { glass_walls }
object { balloon_block_top }
object { balloon_block_top_window }
union {
object { balloon_block_string }
object {
balloon_block_balloon
texture {
pigment { block_yellow }
finish { block_plastic }
}
}
rotate x*-20
translate <0, 0.3, -0.4>
}
union {
object { balloon_block_string }
object {
balloon_block_balloon
texture {
pigment { block_red }
finish { block_plastic }
}
}
rotate x*-20
rotate y*135
translate <-0.4, 0.3, 0.4>
}
union {
object { balloon_block_string }
object {
balloon_block_balloon
texture {
pigment { block_blue }
finish { block_plastic }
}
}
rotate x*-20
rotate y*-135
translate <0.4, 0.3, 0.4>
}
}
object {
balloon_block
translate <0, box_size*5, 0>
}
Post a reply to this message
|
|
|
|
news:web.41360476d5f46917a3fcf12a0@news.povray.org...
> I am having strange shadows appear on my image that I can't explain, and
> that seem to change and/or disappear under different conditions, as I will
> explain in more detail below. First, here is the entire image, so you can
> see the problem:
There's indeed something weird. Apparently, turning off the light buffers
fixes it (-UL) but it still looks like a bug.
Here's a much simplified version that shows the problem. It's apparent when
you compare the full render with the partial render +sc0.358121 +sr0.026110
+ec0.532290 +er0.258486
The shadow on the sphere is truncated on the full render and correct in the
partial one. The incomplete shadows cause the banding you see on your other
images.
Perhaps you can try to simplify it even more to see if it wouldn't be caused
by a coincident surfaces problem. If nobody comes up with an explanation,
you may file a bug report (see the guidelines).
#include "colors.inc"
//global_settings{max_trace_level 100}
camera {location <4.5, 5.5, -7> look_at <0.5, 2.5, 0>}
light_source {<10, 50, -16> color 2}
box {<-2, 0, 5>,<4, 6, 5.01> texture {finish {reflection 1}}}
#declare D =difference {
box {<-1, 0, -1>,<1, 0.6, 1>}
box {<-2, 0, 0>,<2, 1, 1> rotate x*-45 translate -z}
}
union {
cylinder {<-0.7, -2, 0.7>,<-0.7, 2, 0.7>,0.3 pigment {Clear}}
box {<-2, 0, 0>,<2, 1, 1> rotate x*-45 translate -z translate y*0.6
pigment {Clear}}
difference {
cylinder {<0.7, 0.3,-0.7>,<-0.7, 0.3,-0.7>,0.1}
intersection {
union {
cylinder {<0.7, -3, -0.7>,<0.7, 1, -0.7>,0.3}
cylinder {<-0.7, -3, 0.7>,<-0.7, 1, 0.7>,0.3}
}
union {
object {D translate y*-0.001}
object {D translate y*0.001}
}
}
translate y*0.6
}
sphere {<0, 0.3, -0.4>, 0.35}
sphere {<-0.4, 0.3, 0.4>, 0.35}
texture {pigment {Yellow}}
translate y*5
}
G.
--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters
Post a reply to this message
|
|