|
![](/i/fill.gif) |
Woody nous apporta ses lumieres en ce 2007/12/23 21:11:
> Can someone help me out with this scene? I'm trying to create a glowing
> cylindrical object (to look like a spotlight that fallsoff without using an
> actual light source) and I'm getting some results that look like coincident
> surfaces. Code is below.
>
> Also, how would I go about modifying this so it does not look like a black end
> has been pasted on a green cylinder?
I would alter the scene as follow:
>
> #include "colors.inc"
>
> #declare cam_pos=(x*4+y*3+z*-2)*2;
> camera {
> location cam_pos
> look_at (x*1+y*0+z*0)*0.5
>
>
> }
>
>
> light_source {
> cam_pos
> color White // add *2 if this light is not bright enough
> }
>
cylinder { 0, <1,0,0>, 1
pigment {rgbt 1} // No need to see the container
hollow
finish{ ambient 0.000 diffuse 0.000 specular 0}
interior{
media{
emission y/2 // to prevent the oversaturation
//adjust the colour to your taste
density {gradient -x scale 1.01}//prevent second ramp
from apearing
} }
scale x*3
}
>
> //remove this second light. It will make the rendering faster.
> light_source{
> cam_pos
> color White
> }
>
>
Whenever you have more than 1 light_source at the same location you should
replace them with a single one having the sum of all the original ones. It
render faster as you now need only 1 shadow test instead of two, or more. The
color value of a light is not limited to 1.
light_source{0 color 2}
and
light_source{0 color 1} light_source{0 color 1}
both have exactly the same effect on your scene.
--
Alain
-------------------------------------------------
But I thought YOU did the backups...
Post a reply to this message
|
![](/i/fill.gif) |