Caustics & Photon Mapping (GI) Rollout (mental ray Renderer)

The controls in this rollout are for the effects of caustics and global illumination.

Procedures

To render with caustics:

  1. Select each object you want to generate caustics, either by reflection or refraction. Right-click and choose Properties, then on the mental ray panel of the Object Properties dialog, turn on Generate Caustics.

    Objects receive caustics by default. If you think this value might have changed for the objects you want to receive caustics, use those objects’ Object Properties dialog to make sure Receive Caustics is turned on. Also, to speed rendering time, you might want to turn off Receive Caustics for those objects that don’t need to show them.

  2. On the Render Setup dialog, go to the Caustics And Global Illumination rollout and turn on Caustics.
  3. Adjust the caustics parameters to get the effect you want.
  4. Render the scene.

To render with global illumination:

    Objects generate and receive global illumination by default. If you think these settings might have changed for any objects in the scene, use the Object Properties dialog to make sure the proper settings are enabled.

  1. Select each object you want to generate and/or receive global illumination. Right-click and choose Properties, then on the mental ray panel of the Object Properties dialog, turn on Generate Global Illumination and/or Receive Global Illumination. Also, to speed rendering time, you might want to turn off Receive Global Illumination for those objects that don’t need it.
  2. On the Render Setup dialog, go to the Indirect Illumination panel Caustics & Photon Mapping (GI) rollout Photon Mapping (GI) group and turn on Enable.
  3. Adjust the global illumination parameters to get the effect you want.
  4. For the final rendering, turn on Final Gather as well as Global Illumination. See Final Gathering (FG) Rollout (mental ray Renderer).
  5. Render the scene.

Interface

Caustics group

Attention: For caustics to render, you must also make sure to set up these other conditions in your scene:
  • At least one object must be set to generate caustics. This is off by default.
  • At least one object must be set to receive caustics. This is on by default.
  • At least one light must be set to generate caustics. This is off by default.

The settings for generating and receiving caustics are located on the Object Properties dialog mental ray Panel (Object Properties Dialog).

Enable
When on, the mental ray renderer calculates caustics effects. Default=off.
Multiplier / [color swatch]
Use these to control the intensity and color of the indirect light accumulated by caustics. The defaults, 1.0 and white, produce physically correct rendering.

This is useful for adjusting the contribution of the caustics effect, thus improving the quality of an image.

Maximum Num. Photons per Sample
Sets how many photons are used to compute the intensity of the caustic. Increasing this value makes caustics less noisy but also more blurry. Decreasing this value makes caustics more noisy but less blurry. The larger the Samples value, the greater the rendering time. Default=100.
Tip: To preview a caustic, set Samples to 20, then increase the value for a final rendering.
Maximum Sampling Radius
When on, the spinner value sets the size of photons. When off, each photon is calculated to be 1/100 of the radius of the full scene. Maximum Sampling Radius default=off; value default=1.0.

In many cases, the default photon size (Radius=off) of 1/100 the scene size gives useful results. In other cases, the default photon size might be too large or too small.

When photon reflections overlap, the mental ray renderer uses sampling to smooth them together. Increasing the number of samples increases the amount of smoothing and can create more natural-looking caustics. When photons have a small radius and don't overlap, the Samples setting has no effect. Low Radius values with a large number of photons result in dotty caustics.

Filter
Sets the filter to use for sharpening caustics. Can equal Box, Cone, or Gauss. The Box option requires less rendering time. The Cone option makes caustics appear sharper. Default=Box.

The Gauss filter uses a Gauss (bell) curve, and can be smoother than the Cone filter.

Filter Size
Controls the sharpness of caustics when you choose Cone as the caustic filter. This value must be greater than 1.0. Increasing the value makes caustics more blurry. Decreasing the value makes caustics sharper, but also slightly more noisy. Default=1.1.
Opaque Shadows when Caustics Are Enabled
When on, shadows are opaque. When off, shadows can be partially transparent. Default=on.

Opaque shadows render more quickly than transparent shadows.

Photon Mapping (GI) group

These settings let you control the usage of photons by mental ray for generating global illumination. By default, all objects generate and receive global illumination. The settings for generating and receiving GI are located on the Object Properties dialog mental ray Panel (Object Properties Dialog).

Note: In order to render global illumination in mental ray, the photons must be able to bounce among two or more surfaces. This can be accomplished by having a single object with some concavity in its surface that’s exposed to the light source, or at least two objects, and at least one object must be set to receive global illumination (see mental ray Panel (Object Properties Dialog)). Otherwise you’ll receive error messages and no photons will be stored.
Enable
When on, the mental ray renderer calculates global illumination. Default=off.
Multiplier / [color swatch]
Use these to control the intensity and color of the indirect light accumulated by global illumination. The defaults, 1.0 and white, produce physically correct rendering.

This is useful for adjusting the contribution of the GI effect, thus improving the quality of an image.

Maximum Num. Photons per Sample
Sets how many photons are used to compute the intensity of the global illumination. Increasing this value makes global illumination less noisy but also more blurry. Decreasing this value makes global illumination more noisy but less blurry. The larger the Samples value, the greater the rendering time. Default=500.
Tip: To preview global illumination, set Samples to 100, then increase the value for a final rendering.
Maximum Sampling Radius
When on, the numeric value sets the size of photons. When off, each photon is calculated to be 1/10 of the radius of the full scene. Default=off, 1.0.

In many cases, the default photon size (Maximum Sampling Radius=off) of one-tenth the scene size gives useful results. In other cases, the default photon size might be too large or too small.

When photons overlap, the mental ray renderer uses sampling to smooth them together. Increasing the number of samples increases the amount of smoothing and can create more natural-looking caustics. When photons have a small radius and don't overlap, the Samples setting has no effect. For global illumination, photons should overlap. To get good results, you might need to turn on Maximum Sampling Radius and increase the photon size.

Merge Nearby Photons (saves memory)
Enables reduction of the memory footprint of the photon map. When on, use the numeric field to specify the distance threshold below which mental ray merges photons. The result is a smoother, less-detailed photon map that uses significantly less memory. Default=off, 0.0.
Note: Loading a legacy file uses the default value of 0.0. Also, using a value of 0.0 is equivalent to turning the feature off.
Optimize for Final Gather (Slower GI)
If turned on before you render the scene, the mental ray renderer computes information to speed up the regathering process. Specifically, each photon stores additional information about how bright its neighbors are. This is particularly useful when combining Final Gather with Global Illumination, in which case the additional information allows Final Gather to quickly determine how many photons exist in a region. The fast lookup computation can take a long time, but it can greatly reduce the total rendering time. Default=off.

The fast lookup computation can be can be stored as additional data inside a photon map (PMAP) file, and then reused in subsequent renderings.

Volumes group

The controls in this group and the ones that follow are for the photon maps used to calculate caustics and global illumination. This group controls volumetric caustics. Volumetric caustics require a material to have a volume shader assign to its Photon Volume component.

Maximum Num. Photons per Sample
Sets how many photons are used to shade the volume. Default=100.
Maximum Sampling Radius
When on, the numeric setting determines the size of photons. When off, mental ray calculates each photon to be one-tenth the size of the scene extents. Default: off; value=1.0.

The numeric setting is unavailable when the checkbox is off.

Trace Depth group

The Trace Depth controls are similar to those for calculating reflections and refractions, but they refer to the photons used by caustics and global illumination, rather than to rays used in diffuse reflection and refraction.

Max. Depth
Limits the combination of reflection and refraction. Reflection and refraction of a photon stop when the total number of both equals the Maximum Depth setting. For example, if Maximum Depth equals 3 and the trace depths each equal 2, a photon can be reflected twice and refracted once, or vice versa, but it can’t be reflected and refracted four times. Default=10.
Max. Reflections
Sets the number of times a photon can be reflected. At 0, no reflection occurs. At 1, the photon can be reflected once only. At 2, the photon can be reflected twice, and so on. Default=10.
Max. Refractions
Sets the number of times a photon can be refracted. At 0, no refraction occurs. At 1, the photon can be refracted once only. At 2, the photon can be refracted twice, and so on. Default=10.

Light Properties group

Controls in this group affect how lights behave when calculating indirect illumination. By default, the energy and photon settings apply to all lights in a scene. Use the mental ray Indirect Illumination rollout for light objects to adjust an individual light either by multiplying the global values, or by setting local values (using multipliers is the recommended method).

Average Caustic Photons per Light
Sets the number of photons emitted by each light for use in caustics. This is the number of photons in the photon map used for caustics. Increasing this value increases the accuracy of caustics, but also increases the amount of memory used and the length of render time. Decreasing this value improves memory usage and render time, and can be useful for previewing caustic effects. Default=10000.
Average GI Photons per Light
Sets the number of photons emitted by each light for use in global illumination. This is the number of photons in the photon map used for global illumination. Increasing this value increases the accuracy of global illumination, but also increases the amount of memory used and the length of render time. Decreasing this value improves memory usage and render time, and can be useful for previewing global-illumination effects. Default=10000.
Decay
Specifies how photon energy decays as it moves away from each light source. This value is given by 1/(distance decay ), where distance is the distance between the light source and an object, and decay is the value of this setting. Default=2.0.

The most common values are:

  • 0.0 The energy doesn't decay, and photons can provide indirect illumination throughout the scene.
  • 1.0 The energy decays at a linear rate, proportionally to its distance from the light. That is, a photon's energy is 1/distance, where distance is the distance from the light source.
  • 2.0 (The default.) The energy decays at an inverse square rate. That is, a photon's energy is the inverse of the square of the distance from the light source: 1/distance 2 .

In the real world, light decays at an inverse square rate (Decay=2.0), but this gives strictly realistic results only if you provide a realistic value for the energy of the light. Other values of Decay can help you adjust indirect illumination without worrying about physical accuracy.

Note: Decay values of less than 1.0 are not recommended, and can cause rendering artifacts.

Geometry Properties group

All Objects Generate & Receive GI and Caustics
When on, at rendering time, all objects in the scene can generate and receive caustics and global illumination, regardless of their local object properties settings. When off, an object's local object properties determine whether it generates or receives caustics or global illumination. Turning this on is an easy way to ensure that caustics and global illumination are generated, though it can increase rendering time. Default=off.

This setting does not alter the object's local object properties settings for mental ray. When you turn off All Objects Generate & Receive GI And Caustics, the prior object properties settings are in effect once again.