Photon tracing

 
 
 

Photon tracing creates a photon map (see Photon maps), which is used by mental ray for Maya to render global illumination and caustics.

Photons work as follows:

To turn on photon tracing, see Turn on photon emission for a light source.

Conditions for photon storage

Photons are stored only if the following conditions are met:

Advanced information about photon tracing

For general information about photon tracing, see Photon maps.

Some photon shader parameters work a little differently than their Maya counterparts. Besides carrying color (or other relevant) information, some parameters also determine the probabilities of how photons interact with objects.

These probabilities (P) are computed as follows:

P3 = P(transmission)
	= INTENSITY(transparency)
	P(diffuse transmission)
		= translucence
	P(specular transmission)
		= 1 - translucence
P2 = P(specular reflection)
	= reflectivity * INTENSITY(specularColor)
P1 = P(diffuse reflection)
	= diffuse * INTENSITY(color) * (1 - INTENSITY(transparency))
P0 = P(absorption)
	= absorbs * (2.0 - P1 - P2 - P3)

The interaction with the highest P-value is most likely to be chosen. So, the ratios of the P-values determine what fraction of the incident photons are refracted (transmitted), reflected, and absorbed, respectively. The probabilities match the Maya materials in that derivation from Maya will give satisfactory results.

Note first that photons are only stored when hitting a diffuse surface. So if P1 is zero for a specific instance, no photons are stored. To improve performance, you should disable the Caustic and Global Illumination.

Translucence determines what fraction of all refracted (transmitted) photons are diffusely transmitted and translucenceFocus controls the diffusity.

Absorption takes place only if the intensity of each color involved is less than one and Diffuse and Reflectivity are within the prescribed range.

If the probability for specular reflection P2 is greater than zero, either a non-zero Shinyness (isotropic), or non-zero spreadX and spreadY (anisotropic) must be specified.

Examples

Diffuse green reflection with red diffuse transmission

absorbs on
diffuse 1.5
color 0.0 1.0 0.0
transparency 1.0 0.0 0.0
translucence 1.0
1/6 diffuse transmission
1/6 diffuse reflection
2/3 absorption

Full specular refraction (caustics)

refractions on
refractiveIndex 1.5
transparency 0.9 0.9 1.0
1/1 specular transmission

Diffuse green reflection with specular isotropic blue reflection

reflectivity 0.8
specularColor 0.7 0.7 1.0
whiteness 1.0 1.0 1.0
shinyness 20.0
diffuse 0.2
color 0.4 1.0 0.4
3/19 diffuse reflection
16/19 specular reflection

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License