|
|
Below is simple code that creates a 2D array of identical translucent boxes.
When I look at the array from such an angle that I'm looking through
several surfaces, I see opaque artifacts. Even stranger: The color of the
artifacts gets *darker* as I increase the transmit value (i.e. make the
objects more transparent). If I decrease the transmit value, making the
objects more opaque, the dark artifacts go away. However, I don't want
less translucent objects!
Is there any way to generate multiple translucent objects without producing
this problem? I'm running POV-Ray 3.6.1a.icl8.win32 under Win XP Pro.
Thanks!
White Ryder
#include "colors.inc"
background { color 2*MidnightBlue }
camera
{
location <0, 2, -6>
look_at <0, 1, 0>
}
light_source { < -2, 4, -6> color 1.5*White }
// Basic translucent box
#declare TBox =
box
{
<-1,-1,-1>, < 1, 1, 1>
no_shadow
pigment { color 2*White transmit 0.9}
}
// Create 2D array of TBoxes
#declare X_spacing = 4;
#declare Z_spacing = 3; // see artifact when spacing>2; when spacing=2
faces coincide, no artifact
#declare Num_Xs=2;
#declare Num_Zs=3;
#declare TArray=
union
{
#declare Z_index=0;
#while (Z_index<Num_Zs)
#declare X_index=0;
#while (X_index<Num_Xs)
object
{
TBox
translate x*X_spacing*X_index
translate z*Z_spacing*Z_index
}
#declare X_index = X_index + 1;
#end
#declare Z_index = Z_index + 1;
#end
}
// Display result
object
{
TArray
translate x*-2
}
Post a reply to this message
|
|
|
|
White Ryder nous apporta ses lumieres en ce 2005-09-15 22:25:
> Below is simple code that creates a 2D array of identical translucent boxes.
> When I look at the array from such an angle that I'm looking through
> several surfaces, I see opaque artifacts. Even stranger: The color of the
> artifacts gets *darker* as I increase the transmit value (i.e. make the
> objects more transparent). If I decrease the transmit value, making the
> objects more opaque, the dark artifacts go away. However, I don't want
> less translucent objects!
>
> Is there any way to generate multiple translucent objects without producing
> this problem? I'm running POV-Ray 3.6.1a.icl8.win32 under Win XP Pro.
>
> Thanks!
> White Ryder
>
You are reaching the max_trace_level. When the boxes are more opaque, the adc_bailout
kiks in giving
you a color.
Add this line:
#global_settings{max_trace_level 15}
Adjust the value up until you have no more black spots. You can calculate the required
value easily.
Count the number of boxes you have, multiply by 2 (each box have 2 surfaces) then add
1 for the
backbround or whatever is behind all the boxes.
Read section 2.3.3.7 Max_Trace_Level in the documentation (or read it again).
Alain
Post a reply to this message
|
|