|
![](/i/fill.gif) |
> So in order to work around this issue, you must "mix" the media yourself in the
> overlapping area.
>
> You'll probably have to define your spheres without a material first, make a
> union of them, and then equip that union with as many media{} statements as you
> have spheres (make sure to translate each of them like you translated the
> corresponding sphere).
I was able to get close to what I needed by doing as you suggested. I will
continue to work on it, but here is a modified program that creates a glow
cylinder by creating and translating media interiors within the cylinder.
Thanks for the hint!!
background { rgb 0 }
camera { location <0,6,0>
look_at 0
//angle 35
}
light_source { <20,40,10>, 1 }
box // floor
{ <-1.5,-1.01,-1.5>, <1.5,-1.2,1.5>
pigment { checker rgb 0.75, rgb 0.25 scale 0.2 }
}
#declare NumGlows = 10;
#declare Radius = 1;
#declare Rod = cylinder { <-1,0,0>, <1,0,0> Radius
pigment { rgbft <1,1,1,0,1> }
#declare i = 0;
#while (i < NumGlows)
hollow
interior
{ media
{ emission .3
density
{ spherical density_map
{ [0 rgb 0 ]
[0.4 rgb <1,0,0>]
[0.8 rgb <1,1,0>]
[1 rgb 1]
}
}
translate x*(-1+2*i/(NumGlows-1))
}
}
#declare i = i + 1;
#end
}
object { Rod scale 3*x }
Post a reply to this message
|
![](/i/fill.gif) |