|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello,
I've a transparency problem with a rolled up plane, which I created by lots of
very narrow boxes:
#declare tube = merge{
box {<0,0,0>, <0.2,7.5,0.075> pigment {rgb<0,0,1>}}
box {<0.2,0>, <0.366,7.5,0.075> pigment
{rgb<0.2,0.2,0.3>}}
}
#declare i = 0;
#while ( i <= 2000)
object {tube translate<2.3+i/2500,0,0> rotate <0,i/909*360,0>}
declare i = i + 1;
#end
Adding a factor of transparency by "transmit" in "pigment" doesn't work. Even if
I add a transmit factor of 0.9 the rolled up plane stays as it is with a factor
of 0.0
What's the reason for the behaviour of this object?
Post a reply to this message
|
|
| |
| |
|
|
From: Christian Froeschlin
Subject: Re: Transparency problem with rolled up plane
Date: 11 Jan 2010 17:13:07
Message: <4b4ba273$1@news.povray.org>
|
|
|
| |
| |
|
|
Tubemaker wrote:
> What's the reason for the behaviour of this object?
The object definition looks rather strange: A box is about 0.2 units
wide in x direction, but the spacing you use is about 0.0004 so you
have an overlap of about 500 layers at each surface point. You can't
actually look through that anyway even if you set max_trace_level to
the maximum value of 255.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Hello,
>
> I've a transparency problem with a rolled up plane, which I created by lots of
> very narrow boxes:
>
> #declare tube = merge{
> box {<0,0,0>,<0.2,7.5,0.075> pigment {rgb<0,0,1>}}
> box {<0.2,0>,<0.366,7.5,0.075> pigment
> {rgb<0.2,0.2,0.3>}}
> }
>
>
> #declare i = 0;
>
> #while ( i<= 2000)
> object {tube translate<2.3+i/2500,0,0> rotate<0,i/909*360,0>}
> declare i = i + 1;
>
> #end
>
> Adding a factor of transparency by "transmit" in "pigment" doesn't work. Even if
> I add a transmit factor of 0.9 the rolled up plane stays as it is with a factor
> of 0.0
>
> What's the reason for the behaviour of this object?
>
>
>
>
>
>
Your "Tube" object been a merge (or union) of textured objects, any
texture given to the final object would be ignored. Remove the texture
from that part, or have them transparent.
You probably have a max_trace_level problem.
If you wrap your loop in a merge, you may get closer to what you want as
the inside surfaces will get removed.
It will be prety long to render such a merge.
#declare tube = merge{
box {<0,0,0>, <0.201,7.5,0.075> pigment {rgb<0,0,1>}}
// the 0.201 is to prevent coincident surfaces between the two //components.
box {<0.2,0>, <0.366,7.5,0.075> pigment
{rgb<0.2,0.2,0.3>}}
}
/////////////////////////
merge{// this remover the inner surfaces.
#declare i = 0;
#while ( i <= 2000)
object {tube translate<2.3+i/2500,0,0> rotate <0,i/909*360,0>}
declare i = i + 2;
#end
}
You may need to increase the max_trace_level like:
global_settings{max_trace_leve 20}
You may try using a blob object with many cylinder components like:
blob{threshold 0.1
#declare i = 0;
#while ( i <= 2000)
cylinder{0, <0, 7.5, 0.075>, 0.1, 0.3
translate<2.0+i/250,0,0>
rotate <0,i/909*380,0>
}
#declare i = i + 1;
#end
pigment{rgbf<1, 0.3, 0.7, 0.9>}
rotate <-120, 25, 0>
}
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Tubemaker" <nomail@nomail> wrote:
> I've a transparency problem with a rolled up plane, which I created by lots of
> very narrow boxes:
I like triangles :-)
As a proof of concept, I threw together a quick example. Please excuse the crude
coding and stupid variable names. Also, it's not a closed mesh, so interior will
not work properly. And some/all of the triangles may be inside out, so making
smooth triangles may need some work.
Enjoy!
-Peter
camera{
location <5,15,-15> look_at y*3
}
light_source{<5,15,-15>1}
#local Start_Point = 5; // Loop starts on this x-axis and goes towards zero.
#local Thickness = 0.5; // Thickness of the loops
#local SPC = 0.005; // Space between triangles, decrease for more detail (and/or
use smooth triangles)
#local H = y*5; // Height
#local Safety_Measure = 0.001; // For avoiding coincident surfaces
#local Number_Of_Loops = 2; // Increase for more loops
union{ // White loop
#local X = 0;
#while (X<Number_Of_Loops+1) // One more white than blue loop
#local X2 = X+SPC;
#local P1 = vrotate(<Start_Point - X*Thickness*2,0,0>,y*
X*360);
#local P2 = vrotate(<Start_Point
-(X2)*Thickness*2,0,0>,y*(X2)*360);
#local P3 = vrotate(<Start_Point-Thickness- (X)*Thickness*2,0,0>,y*
X*360);
#local P4 =
vrotate(<Start_Point-Thickness-(X2)*Thickness*2,0,0>,y*(X2)*360);
triangle{P1 ,P2 ,P3 } // Bottom
triangle{P2 ,P4 ,P3 }
triangle{P1+H,P2+H,P3+H} // Top
triangle{P2+H,P4+H,P3+H}
triangle{P1 ,P1+H,P2 } // Outer
triangle{P1+H,P2 ,P2+H}
triangle{P3 ,P3+H,P4 } // Inner
triangle{P3+H,P4 ,P4+H}
#local X = X+SPC;
#end
pigment {rgb 1 transmit 0.7}
}
union{ // Blue Loop
#local X = 0;
#while (X<Number_Of_Loops)
#local X2 = X+SPC;
#local P1 = vrotate(<Start_Point-Thickness -Safety_Measure-
X*Thickness*2,0,0>,y* X*360);
#local P2 = vrotate(<Start_Point-Thickness
-Safety_Measure-(X2)*Thickness*2,0,0>,y*(X2)*360);
#local P3 = vrotate(<Start_Point-Thickness*2+Safety_Measure-
(X)*Thickness*2,0,0>,y* X*360);
#local P4 =
vrotate(<Start_Point-Thickness*2+Safety_Measure-(X2)*Thickness*2,0,0>,y*(X2)*360);
triangle{P1 ,P2 ,P3 } // Bottom
triangle{P2 ,P4 ,P3 }
triangle{P1+H,P2+H,P3+H} // Top
triangle{P2+H,P4+H,P3+H}
triangle{P1 ,P1+H,P2 } // Outer
triangle{P1+H,P2 ,P2+H}
triangle{P3 ,P3+H,P4 } // Inner
triangle{P3+H,P4 ,P4+H}
#local X = X+SPC;
#end
pigment {rgb z transmit 0.6}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|