Keywords: main

Next: 1.34 Global Illumination in Up: 1. Functionality Previous: 1.32 Final Gathering

# 1.33 Volume Caustics

Volume caustics are caused by light that has been specularly reflected or refracted by one or more surfaces and is then scattered by a participating medium in a volume. Examples are:

- Sunlight refracted by a wavy water surface and then scattered by little silt particles in the water.

- Car fog lamps: light emitted by a bulb filament, reflected by a parabolic reflector, and scattered by fog.

In order to create volume caustics, the same light sources, material shaders, photon shaders, and caustic tags as for caustics are needed. But in addition, volume shaders and volume photon shaders are needed. For example:

         material "volsurf"  opaque    # material for surfaces of volume
            "transmat" ()
            shadow "transmat" ()
            photon "transmat_photon" ()
            volume "parti_volume" (
               "scatter" 0.05 0.05 0.05,
               "extinction" 0.05,
               "lights" ["arealight-i"]
            )
            photonvol "parti_volume_photon" (
               "scatter" 0.05 0.05 0.05,
               "extinction" 0.05
            )
         end material

Photons that get scattered multiple times in the volume are stored in a volume photon map. During rendering, volume shaders can call the function mi_compute_volume_irradiance to get irradiance from the photons stored in the volume photon map.

In order to fine-tune the volume caustic, it is possible to change the number of photons that is used to compute the indirect light in the volume caustic. This is done with a `photonvol accuracy` statement in the options. The default is 30 photons and a radius that depends on the scene extent.