|
|
Kneb wrote:
> If I have declared an object earlier in a file, how can I change the
> object's transparency when I'm using it in a pov scene?
<snip>
> Can I change aspects of its color in the scene without having
> a variable to refer to the color?
By using #macro rather than #define you can pass the parameter rather
than using a variable; hopefully this works for you.
Also, see "Complex see-through objects" in p.advanced-users.
Cheers,
Marvin
//==============================================================
// In header file:
#macro SillyObject(xmit)
union {
box{<-2,-2,-.5>,<2,2,.5> pigment{color Blue transmit xmit}}
box{<-.5,-2,-2>,<.5,2,2> pigment{color Blue transmit xmit}}
cylinder{y*2,y*2.5,.25 pigment{color Red transmit xmit}}
}
#end
//==============================================================
// The source file...
#include "colors.inc"
global_settings{assumed_gamma 1.0}
camera{location <2,3,-7> look_at 0}
light_source{<10,20,-10> rgb 1 parallel point_at 0}
plane{y,-2 pigment{color Green}}
SillyObject(0.5) //transmit .5 <==this is what I've been trying to use
Post a reply to this message
|
|