Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
Design of the Interior of transparent Shapes in POV-Ray
Italiano Italiano
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorial

  Content Overview
  material, interior, media

  - Syntax material
      texture + interior
  - Window Glass
      + max_trace_level
  - Fog, Mist or Haze
  Media
  - Syntax Media
  - Media+Density Maps
  Atmospheric Media
    with/without density map
  - Beames in the Fog
  Object Media
  Emitting Media
  - Light Sword
  - Candle Flames
  Scattering Media
  - Light through Window
  - Steam, Smoke, Clouds
  Absorbing Media
  - Dust Devils
  Special Problems with Media
  - Scaling of Media
  - Overlapping Media
                                             

Syntax of "media"      

Some Basic Syntax Samples of the 3 Types of "media"      

emission
sphere{ <0,0,0>, 1
        pigment{rgbt 1}
        hollow
 interior{ //-----------
  media{
   emission <1,1,1>
   intervals 3
   samples 1,1 //min,max
   } // end of media ---
 } // end of interior
 translate <0,1.00,0>
} //----- end of sphere
scattering
sphere{ <0,0,0>, 1
        pigment{rgbt 1}
        hollow
 interior{ //-----------
  media{
   scattering{1,<1,1,1>}
   intervals 3
   samples 1,1 //min,max
   } // end of media ---
 } // end of interior
 translate <0,1.00,0>
} //----- end of sphere
absorption
sphere{ <0,0,0>, 1
        pigment{rgbt 1}
        hollow
 interior{ //-----------
  media{
   absorption <1,1,1>
   intervals 3
   samples 1,1 //min,max
   } // end of media ---
 } // end of interior
 translate <0,1.00,0>
} //----- end of sphere

While using color value <1,0.5,0>(orange) instead of <1,1,1>(white) we will get this:
emission <1,0.5,0>
scattering <1,0.5,0>
absorption <1,0.5,0>

Emitting media: It simulates the interior of a shape that emits light.
It is not lit up by any light source and does not gets shadows by any other shape.
But this shape does not really emit light that is cast on to nearby objects.
To get this effect we have to put an additional light_source inside of the media.
If another object is inside of the media, the media color will be added to the color of this object.
Mainly applicated for flames, glowing fire or plasma and shining clouds
.
Scattering media: It simulates the interior of a shape that scatters light of the defined color value.
This means, if it scatters orange light it has a pale shadow in the color of the rest light(bluegreen).
The media itself appears in orange before dark background (if its lighten up by a white light_source without " media_interaction off") and blue in front of a white background.
; Mainly applicated for fog, dark clouds and steam.
.
Absorping media: It simulates the interior of a shape that absorps light of the defined color value.
This means, if it absorps orange light it has a pale shadow in the color of the rest light(bluegreen).
The media itself appears totally in blue the color of the rest light.
Mainly applicated for very dark fog and steam.
.


media default values:
absorption  <0,0,0> // color of the absorbed light.
emission  <0,0,0>  // color of the emitted light.
scattering{ 1            // Type 1 = isotropic scattering, 2 = Mie haze, 3 = Mie murky
                         // Type 4 = Rayleigh scattering,  5 = Henyey-Greenstein scattering
            <0,0,0 >       //
            eccentricity  0.0    // eccentricity at non isotropic types of scattering
            extinction 1.0   // how fast the scattering media absorbs light
          }                  // useful if the media absorbs too much light
//--------------
  method       : 3      // 3 = adaptive sampling; only performed if the minimum samples are set to 3 or more.
                        // Sample method 3 ignores the maximum samples value.
                 aa_level     : 4    // specifies the anti-aliasing recursion depth
                 aa_threshold : 0.1  // with method 3
                        // method 2 distributes samples evenly along the viewing ray
                        // method 1 samples the density of particles at a specified number
                        // of points along the ray's path. Sub-samples are also taken until
                        // the results reach a specified confidence level .
  intervals    : 10     // specifies the integer number of intervals used to sample the ray
  samples      : 1, 1   // min_samples, max_samples taken per interval
  confidence   : 0.9    // decrease for slower more accurate results
  variance     : 1/128  // increase for slower more accurate results
// Note: the maximum number of samples limits the calculations even if
//       the proper variance and confidence are never reached.
  ratio        : 0.9  // distributes intervals differently between lit and unlit areas
top
© Friedrich A. Lohmüller, 2009
www.f-lohmueller.de