|
|
Woody nous apporta ses lumieres en ce 2008/01/17 06:44:
> Is there anyway to change how a gradient density fades off?
>
> The following scene has a density that's a linear gradient. That is it falls off
> in a linear fashion. Is there any way to change this so the density falls off
> say at a geometric or exponential rate? Maybe instead of a linear decreasing
> density, something where the density is sinosoidal?
>
> Maybe a density map of some type?
>
> Any help appreciated.
>
>
> #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}
> hollow
> finish{ ambient 0.000 diffuse 0.000 specular 0}
> interior{
> media{
> emission y/2
>
> density {gradient -x scale 1.01}
> }
> }
> scale x*3
> }
>
>
>
In addition to what others have proposed, you can experiment with the various
wave forms available. They are:
ramp_wave //the default for the gradient pattern
triangle_wave // used in the marble and wood patterns
sine_wave
scallop_wave // use the absolute value of a sine
cubic_wave
poly_wave [float]
--
Alain
-------------------------------------------------
You know you've been raytracing too long when your wife's raytraced image you
made to flatter her is the only one you see of her anymore.
Ken Tyler
Post a reply to this message
|
|