Introduction


In this chapter, we'll talk about caustics. According to Wikipedia: "А caustic or caustic network is the envelope of light rays reflected or refracted by a curved surface or object, or the projection of that envelope of rays on another surface. The caustic is a curve or surface to which each of the light rays is tangent, defining a boundary of an envelope of rays as a curve of concentrated light. Therefore, in the image to the right, the caustics can be the patches of light or their bright edges. These shapes often have cusp singularities." Caustics are an extremely important phenomenon, which contributes to the photorealism a lot.

In comparison to the unbiased render engines, V-Ray doesn't handle caustics automatically. The V-Ray renderer still supports the rendering of caustics effects. In order to produce this effect, you must have proper caustics generators and caustics receivers in the scene (for information on how to make an object a caustics generator/receiver, see the Parameters section). The settings in this parameter section control the generation of the photon map.

In order to calculate the caustics effects, V-Ray uses a technique known as photon mapping. It is a two-pass technique. The first pass consists of shooting particles (photons) from the light sources in the scene, tracing them as they bounce around the scene, and recording the places where the photons hit the object surfaces. The second pass is the final rendering, which is when the caustics are calculated by using density estimation techniques on the photon hits stored during the first pass.

Caustics vs. Refraction


  • Caustics affect what the light does; Refraction affects the material
  • Caustics affect highlights and shadows on nearby surfaces
  • Qualities of refractive material affect the appearance of shadow

    • When caustic light passes through an object and hits a surface, highlights and shadows on the surface are based on the object’s reflective/refractive material properties


Refraction


Caustics



GI Caustics


GI caustics represent light that has gone through one diffuse, and one or several specular reflections (or refractions). GI caustics can be generated by skylight, or self-illuminated objects, for example. However, caustics caused by direct lights cannot be simulated in this way. You must use the separate Caustics section to control direct light caustics. Note that GI caustics are usually hard to sample and may introduce noise in the GI solution.

  • Refractive GI caustics – this allows indirect lighting to pass through transparent objects (glass, etc). Note that this is not the same as Caustics, which represent direct light going through transparent objects. You need refractive GI caustics to get skylight through windows, for example.

  • Reflective GI caustics – this allows indirect light to be reflected from specular objects (mirrors, etc). Note that this is not the same as Caustics, which represent direct light going through specular surfaces. This is off by default, because reflective GI caustics usually contribute little to the final illumination, while often they produce undesired subtle noise.


Parameters


The main caustics-related parameters are located in the SettingsCaustics plugin. Here they are:

  • on - Turns rendering of caustics on and off. For more information, see The Light Caustics Subdivs example below.
  • max_photons - Тhis is the maximum number of photons that will be considered when rendering the caustics effect on a surface. Smaller values cause fewer photons to be used and the caustics will be sharper, but noisier. Larger values produce smoother but blurrier caustics. The special value of 0 means that V-Ray uses all the photons that it can find inside the search area. For more information, see The Max Photons example below.
  • search_distance - When V-Ray needs to render the caustics effect at a given surface point, it searches for a number photons on that surface in the area surrounding the shaded point (search area). The search area in fact is a circle with center the original photon and its radius is equal to the Search distance value. Smaller values produce sharper, but perhaps more noisy caustics; larger values produce smoother but blurrier caustics. For more information, see The Search Distance Parameter example below.
  • max_density - 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 will first check 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 will just add the energy of the new photon to the one in the map. Otherwise, V-Ray will store the new photon in the photon map. Using this option allows you to shoot many photons (and thus get smoother results) while keeping the size of the caustics photon map manageable.
  • multiplier - This 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, then you should use the local light settings. Note: this multiplier is cumulative with the multipliers in the local light settings.
  • mode - Controls the mode of the irradiance map:

    • New map – When this option is selected, a new photon map is generated. It overwrites any previous photon maps left over from the previous rendering.
    • Save to file – Hit this button if you want to save an already generated photon map in a file.
    • From file – When you enable this option, V-Ray does not compute the photon map but loads it from a file. Hit the Browse button on the right to specify the file name.
  • file - The file name with the caustics photon map to be loaded when the Mode is set to From file.

  • dont_delete - If true, the caustics photon map is not deleted after rendering is complete.
  • auto_save - True to save the caustics photon map automatically at the end of the rendering
  • auto_save_file - File to save the photon map automatically to.
  • show_calc_phase - True to show the calculation of the caustics map.
Caustics also depend on the individual light settings.

The light/object settings are located in the VRayScene plugin. The ones concerned with caustics are:

  • mw_generate_caustics – Controls the caustics generated by the material.
  • mw_receive_caustics – Controls the caustics received by the material.


Examples


This example shows GI caustics generated by a self-illuminated object:



The Search Distance Parameter

For this image, the Caustics subdivs parameter for the light is set to 250, so that the separate photons are more distinct; the global caustics Multiplier is 5, and the Max photons are set to 60. As can be seen, the larger search distance produces blurrier caustics.





The Light Caustics Subdivs

This example is similar to the previous one, but the Caustics subdivs parameter for the light is increased to 500. The other parameters are the same as in the previous example. As can be seen, the larger number of photons produces smoother caustics effects than in the previous example. 






The Max Photons Parameter

For this example, the Caustics subdivs parameter for the light was set to 1500, the global caustics Multiplier to 5, and the Search distance to 5. As can be seen, the larger value of the Max photons parameter in the second image causes the caustics to appear much smoother.


Max photons are 10

Max photons are 250

Max photons are 1000

Max photons are 0