Photon Tracing in Participating Media

In order to compute volume caustics and global illumination in participating media, the media need volume photon shaders. A volume photon shader will usually have the same name as the corresponding volume shader, but with " _photon" appended. Details on photon tracing in volumes can be found in the mental ray manual.

Volume Photon Shader

The volume photon shader that matches parti_volume. It has the same parameters.

parti_volume_photon
    color "parti_volume_photon" (
        integer         "mode",
        color           "scatter",
        scalar          "extinction",
        scalar          "r",
        scalar          "g1",
        scalar          "g2",
        scalar          "height",
        scalar          "nonuniform",
        scalar          "min_step_len",
        scalar          "max_step_len",
        scalar          "light_dist",
        integer         "min_level",
        boolean         "no_globil_where_direct",
        array light     "lights")
scatter
is the color of the scattering medium. This determines the color of the indirect light that is scattered by the medium. It also acts as a multiplier of the photon energy for the photons in the photon volume map. Note that in mental ray there are three data structures where photon can stored: the GI, the caustics and the volume photon photon map, the first two can be independently color corrected.
min_level
is the minimum refraction level at which photons are stored. This is handled differently for caustic and GI photons. For GI photons the maximum level is set with the global option photon_refraction_depth. Caustics photons storage is very different. It depends on more variables. First the global option photon autovolume can be set or not. If it is not set then caustic photons are only stored after at least one refraction or reflection. If it is set, and the light source is inside the volume then caustic photons can be stored. If the light source is outside the volume, then caustic photons are only stored after at least one refraction or reflection.
light_dist
no_globil_where_direct
lights
are ignored since there is no direct illumination in the photon shader.

All other parameters, especially extinction, need to be identical to the parameters of parti_volume, this to preserve consistency in the algorithm.

Transparent Photon

Deprecated transmat_photon is the material photon shader that matches transmat, used for an enclosing surface of a participating medium or volume that is not a mental ray hull object. It simply continues to trace the incoming photon in the same direction without any interaction with the current object. Such a volume container should be invisible to photons itself.

transmat_photon
    color "transmat_photon" ()

There are no parameters.


Copyright (©) 1986-2009 by mental images GmbH