|
|
Hi all,
I just started with POV-Ray yesterday and created the code as seen on te
bottom of this message.
It creates 9 superellipsoid's with various heights.
I see two problems here and would like to know if these are bugs or
something I can easily resolve.
1) If the sides of the superellipsoid's collide with other elements I see
these flat parts probably indicating the curve of the superellipsoid's. But
I wanted them to just stay orange.
2) If the sides of the superellipsoid's collide with each other (or even if
you out them inside each other) you get those nasty black areas.
Note: I did not get this second effect when I used random colors for the
superellipsoid's.
Anyone care to comment on this and enlighten me ?
Code:
camera
{
location <-4, 4, -4>
look_at <4, 0, 4>
up <0, .9, 0>
right <1.6, 0, 0>
}
light_source
{
<-75, 120, -25>
rgb 1
}
plane
{
y, 0
pigment
{
checker
rgb 1
rgb <.9, .9, .9>
}
}
plane
{
x, 10
pigment
{
rgb 1
}
}
plane
{
z, 10
pigment
{
rgb 1
}
}
#declare randomSeed = seed (2005);
#declare roundedBox =
superellipsoid
{
<0.2, 0.2>
pigment
{
rgb <1, .9, .8, .99>
}
finish
{
ambient 0.15
diffuse 0.85
phong 1
}
translate <0, 1.001, 0>
};
#declare xCount = 0;
#declare zCount = 0;
#while (xCount < 3)
#while (zCount < 3)
object
{
roundedBox
translate <xCount * 2.0001, 0, zCount * 2.0001>
scale <1, rand(randomSeed) * 2, 1>
pigment
{
rgb <1, .9, .8, .99>
}
}
#declare zCount = zCount + 1;
#end
#declare zCount = 0;
#declare xCount = xCount + 1;
#end
Post a reply to this message
|
|
|
|
Wasn't it Numb-C who wrote:
>Hi all,
>
>I just started with POV-Ray yesterday and created the code as seen on te
>bottom of this message.
>
>It creates 9 superellipsoid's with various heights.
>I see two problems here and would like to know if these are bugs or
>something I can easily resolve.
>
>1) If the sides of the superellipsoid's collide with other elements I see
>these flat parts probably indicating the curve of the superellipsoid's. But
>I wanted them to just stay orange.
>
>2) If the sides of the superellipsoid's collide with each other (or even if
>you out them inside each other) you get those nasty black areas.
>
>Note: I did not get this second effect when I used random colors for the
>superellipsoid's.
>
>Anyone care to comment on this and enlighten me ?
>
(1)All the colour in a POV object is at the surface. When part of the
surface goes below the floor, you lose the contribution from its colour.
One way to work round this is to chop off the bottom of the rounded box
just above the floor, like this:
#while (xCount < 3)
#while (zCount < 3)
intersection {
object
{roundedBox
translate <xCount * 2.0001, 0, zCount * 2.0001>
scale <1, rand(randomSeed) * 2, 1>
}
plane {-y,-0.001}
pigment {rgbf <1, .9, .8, .99> }
finish {ambient 0.15 diffuse 0.85 phong 1}
}
#declare zCount = zCount + 1;
#end
#declare zCount = 0;
#declare xCount = xCount + 1;
#end
(2)The nasty black areas are points where you've reached the current
max_trace_level.
For efficiency, POV doesn't usually trace rays further than 5
intersections because it can take a long time and usually the
contribution from points further than that are negligible. I guess that
your random colours had generally lower transparency so you can't see
through the 5 layers.
Try adding
global_settings {max_trace_level 20}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|