Table of Contents

This page offers information about the Caustics effect in V-Ray for Cinema 4D.


Overview


V-Ray supports the rendering of caustics effects by using one of the following techniques: photon mapping (New Map mode) or progressive. Alternatively, you can upload a pre-made photon map file.

The Progressive caustics solver uses advanced sampling techniques, and is able to trace as many photons as required without suffering the memory constraints of traditional Photon Mapping techniques.

It is loosely based on two papers: one on Progressive Photon Mapping from Knaus and Zwicker, and another on Metropolis-guided caustics tracing from Šik and Krivánek.

The other method, Photon Mapping, is a two-pass technique.

Caustics parameters are available in the GI tab of the V-Ray render settings.


 



Parameters



Enable Caustics – Turns rendering of caustics on and off.

Mode – Specifies whether caustics should be calculated using a traditional Photon map or the new Progressive algorithm.

New map – Causes a new photon map to be generated. The new map overwrites any previous photon map left over from a previous rendering.
From file – V-Ray does not compute the photon map but loads it from a file.
Progressive – Uses advanced sampling techniques and is able to trace as many photons as required without suffering the memory constraints of traditional Photon Mapping techniques. See the Progressive Caustics advantages and limitations for more information.

Multiplier – Controls the strength of the caustics. It is global and applies to all light sources that generate caustics. If you want different multipliers for the different light sources, use local light settings. 

Search distance units – Determines in what units the Search distance parameter is specified - World units or Pixels. The Progressive mode works only with Pixels.

Search Distance (World) – Specifies the initial photon lookup radius in world units.

Search Distance (Pixels) – Specifies the initial photon lookup radius in pixels.

Max photons  – Maximum number of photons within the search area circle that are be considered when rendering the caustics effect on a surface. Smaller values cause less photons to be used and the caustics appear sharper, but noisier. Larger values produce smoother but blurrier caustics. Assigning a value of 0 means that V-Ray is not limited and uses all the photons that it can find inside the search area.

Max density – This parameter allows you to limit the resolution (and thus the memory) of the caustics photon map. Whenever V-Ray needs to store a new photon in the caustics photon map, it first looks if there are any other photons within a distance specified by Max density. If there is already a suitable photon in the map, V-Ray just adds the energy of the new photon to the one in the map. Otherwise, V-Ray stores the new photon in the photon map. Using this options allows you to shoot many photons (and thus get smoother results) while keeping the size of the caustics photon map manageable. 

For the New map mode, when V-Ray needs to render the caustics effect at a given surface point, it searches for a number of photons on that surface in the area surrounding the shaded point (search area). The search area is a circle with its center at the original photon and a radius equal to the value. Smaller values produce sharper, but perhaps noisier caustics; larger values produce smoother but blurrier caustics.


Caustics Photon Map File – Only active when the Mode is set to From File. Specifies the Photon Map file used to generate caustics.

Auto save – When enabled, V-Ray automatically saves the caustics photon map to the file specified in the Auto save file field when rendering is complete.

Auto save file – Specifies the file to which the caustics photon map is saved when Auto save is enabled. Click the  button to specify the file name.



Example: Search Distance


For this example, the light used in the scene is V-Ray Sun. The Caustics method is set to Progressive and the Search Distance is set in Pixels. The V-Ray Sun has its Photon emission properties adjusted as so: Caustics Subdivs are at their default value of 1500; the Caustics Mult is set to 2 and the Photon Radius is set to 30 cm.


Search Distance = 1

Search Distance = 16

Search Distance = 32




Tips when working with progressive caustics:

Required:

  • The Affect Shadows option should be off in refractive materials if they are to generate caustics. The option can be found in the V-Ray Material's Refraction options, as well as in the V-Ray Node Material options.
  • The Affect Channels option should be set to Affect all Channels in refractive materials to ensure the Caustics Render Element contains also the ones fallen behind refraction.
    Not doing so leaves photons fallen behind refractive surfaces inside the Refraction RE, but not inside the Caustics one. The Affect Channels option can be found in the V-Ray Material's Reflection options, as well as for in the V-Ray Node Material options.
  • If present, the VRaySun's Photon Emission Radius should be set to a value large enough to encompass the relevant parts in the scene.

Optional

  • It is strongly recommended to set time limit when rendering with Progressive Caustics, rather than relying on Noise Threshold value only.
  • Set a higher Min Subdivs value.
    A higher Min Subdivs value (16, 24, even higher.) means there is a longer phase of fixed sampling with no adaptation to the photon casting, so the screen coverage of samples remains more consistent, allowing for quicker filling of, for example, big flat areas or long thin lines.
    The later phase of rendering, with adaptation, then just brings noise down to ensure the Noise Threshold is respected.

Managing Expectations:

  • The Progressive caustic solver is "fire and forget".
    This means that it can be turned on in any scene, and expected to trace photons on any specular or refractive surface.
    It doesn't, however, mean that doing so results in an image converged to perfection within a short time.
    The approach, novel as it is, is still photon-map based, and judgement should be used to ensure quick, noise and frustration-free results.
  • It renders with the beauty.
    The solver does indeed render happily alongside a beauty pass, storing caustics in the appropriate Render Element (see requirements tips above!), but that may not be the best solution as far as performance is concerned.
    It's suggested to consider preparing a dedicated caustic rendering pass if the photon tracing is particularly extensive, and/or if sequences are to be rendered.
    That way, it is possible to optimize the caustics calculation separately from the requirements of the beauty pass.


Progressive Caustics Advantages


  • they require nearly no setup;

  • each cast photon is more useful than those in traditional Photon Mapping;
  • the number of photons castable is only limited by time, not memory;
  • they can resolve tiny caustic details, compared to the scene size;
  • they can resolve caustic details also when a camera is very zoomed in on them;
  • statistics about the photon tracing can be found in the VFB2 stats panel;


Progressive Caustics Limitations


  • they require the progressive image sampler;
  • this image sampler often requires Min. subdivs values much higher than 1;
  • it's non-deterministic, meaning that there could be somewhat unpredictable render times, and also tiny differences in the visual results when rendering the same frame twice;
  • currently doesn't work with distributed rendering;
  • currently not supported by the GPU engine;
  • Depending on the scene, the performance might not scale linearly with the number of threads/cores, resulting in inefficient CPU utilization.

Photon Map method



Expand for Photon Map method...

Multiplier – Controls the strength of the caustics. It is global and applies to all light sources that generate caustics. If you want different multipliers for the different light sources, use local light settings. 

Search Distance Units – Specifies the units of the caustics photon lookup radius. You can choose between World or Pixels. When V-Ray needs to render the caustics effect at a given surface point, it searches for a number of photons on that surface in the area surrounding the shaded point (search area). The search area is a circle with a center at the original photon and its radius is equal to the Search Distance value. Smaller values produce sharper, but more noisy caustics; larger values produce smoother, but blurrier caustics. For more information, see the Search Distance example.

Search Distance World/Pixels – Specifies the photon lookup radius in pixels or world units.

Max Photons – Maximum number of photons within the search area circle that are considered when rendering the caustics effect on a surface. Smaller values cause less photons to be used and the caustics are sharper, but noisier. Larger values produce smoother but blurrier caustics. Assigning a value of 0 means that V-Ray is not limited and uses all the photons that it can find inside the search area.

Max Density – This parameter allows you to limit the resolution (and thus the memory) of the caustics photon map. Whenever V-Ray needs to store a new photon in the caustics photon map, it first looks if there are any other photons within a distance specified by Max density. If there is already a suitable photon in the map, V-Ray just adds the energy of the new photon to the one in the map. Otherwise, V-Ray stores the new photon in the photon map. Using this options allows you to shoot many photons (and thus get smoother results) while keeping the size of the caustics photon map manageable. 

Caustics Photon Map File – Specifies the file used to load the caustics photon map when the Mode is set to From File. Click the Browse button to the right to specify the file name.

Auto Save – When enabled, V-Ray automatically saves the caustics photon map to the file specified in the Auto Save File field when rendering is complete.

Auto Save File – Specifies the file to which the caustics photon map is saved when Auto Save is enabled. Click the Browse button to the right to specify the file name.