POV-Ray : Newsgroups : povray.newusers : transmit question : transmit question Server Time
5 Nov 2024 11:17:27 EST (-0500)
  transmit question  
From: Kneb
Date: 29 Jan 2004 21:24:01
Message: <4019c041@news.povray.org>
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?  For example:
#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}}
#declare SillyObject=union {
   box{<-2,-2,-.5>,<2,2,.5> pigment{color Blue}}
   box{<-.5,-2,-2>,<.5,2,2> pigment{color Blue}}
   cylinder{y*2,y*2.5,.25 pigment{color Red}}
}
object{SillyObject //transmit .5 <==this is what I've been trying to use
}

I would define a variable for SillyObject's pigment, except in real life
SillyObject is defined in an include file, and also its components are
different colors, so it isn't convenient to make its transparency dependent
on a variable.  Can I change aspects of its color in the scene without
having a variable to refer to the color?
Thanks,
Kneb


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.