POV-Ray : Newsgroups : povray.advanced-users : Fade distance and power? : Fade distance and power? Server Time
30 Jul 2024 14:28:57 EDT (-0400)
  Fade distance and power?  
From: Mick Hazelgrove
Date: 29 Apr 1999 14:38:24
Message: <37289910.0@news.povray.org>
Why does the light beam not fade away with distance?
varying fade_power and distance seems to vary the light evenly along the
beam.

Mick

#version 3.1;

#include "colors.inc"

global_settings
{
  assumed_gamma 1.0
}


// ----------------------------------------
camera
{   location  <0.0, -10, 95.0>
    direction 1.5*z
        up    4/3*y
            right <1,0,0>
  look_at   <0.0, 0.0,  0.0>
}


light_source{ <0, 200, 0>
 // color rgb 1.0
arealight<8, 0, 0> <0, 0, 8> 4, 4
  adaptive 0
  jitter
media_interaction off




// create a point "spotlight" (cylindrical directed) light source
light_source
{
  0*x                     // light's position (translated below)
  color rgb <1,1,1>       // light's color
  spotlight               // this kind of light source
  cylinder                // this variation
  translate <90, 180, -40> // <x y z> position of light
  point_at <0, 0, 30>      // direction of spotlight
  radius 50                // hotspot (inner, in degrees)
  tightness 150            // tightness of falloff (1...100) lower is
softer, higher is tighter
  falloff 50               // intensity falloff radius (outer, in degrees)
  fade_distance 40
  fade_power 1
  media_attenuation on
}


box{<-100,-100,100><100,200,-100> pigment{Blue}hollow
interior{
  media{
  scattering{1, .2 extinction .01}
 samples 20, 100
  intervals 10
  ratio .999
 confidence .9
  variance   1/1000

  }
  }
  }


Post a reply to this message

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