©BBB3viz

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 39 Next »

Table of Contents

This page provides information on the Caustics rollout.

Overview


V-Ray supports the rendering of caustics effects by using one of the following techniques: photon mapping or progressive.

The new 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.
The first pass consists of shooting light 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.

 

UI Path: ||Render Setup window|| > GI tab > Caustics rollout

 



Default Parameters


The following parameters are visible from the Caustics rollout when set to the Default Render UI Mode.

Caustics – Turns rendering of caustics on and off.

Calculation method – Specifies whether caustics should be calculated using a traditional Photon map or the new Progressive1 algorithm.

Progressive

The Progressive method doesn't need most of the controls used for traditional Photon Mapping, so the controls are grayed out. Only the Search Dist control in the render settings and the Multiplier V-Ray property in lights, and in the advanced mode of the caustics panel, have an effect on the result.

Search dist – Specifies the initial photon lookup radius in pixels.

The value set initially is automatically reduced by the solver during successive passes, by up to a fourth of the initial value. For example, with the default value of 4, the search radius after being reduced becomes 1 pixel, allowing for detail to be resolved with that accuracy. If the initial radius is set to 16, the final radius is 4 pixels making the caustics look blurrier.

As of V-Ray 5 update 1, it is recommended to leave the radius at its default value of 4.

Tips when working with progressive caustics:

Required:

  • Affect Shadows should be off in refractive materials if they are to generate caustics.
  • 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.
  • If present, the VRaySun's photon emit radius should be set to a value large enough to encompass the relevant parts in the scene.

Optional:

  • Lower the Min. Shading Rate.
    Photons are cast for each camera ray, not for the secondary ones. The more camera rays are cast, the more photon passes are achieved.
    A value of 3 is fine if rendering with the rest of the scene, but a value of 1 could be used if rendering specific caustic passes (for example, a caustics pass scene prepared with the purpose of maximizing caustics' calculation speeds).
  • Set a higher min AA subdivs value.
    A higher min AA subdivs value (16, 24, even higher.) means there will be a longer phase of fixed sampling with no adaptation to the photon casting, so the screen coverage of samples will remain more consistent, allowing for quicker filling of, for example, big flat areas or long thin lines.
    The later phase of rendering, with adaptation, will then just bring noise down to ensure 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 will result 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 will be possible to optimize the caustics calculation separately from the requirements of the beauty pass.

Click here to see the Photon Map Mode parameters...

Search distance units – Specifies the caustics photon lookup radius units. 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 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 in the expandable field below.

Search dist – Specifies the photon lookup radius in pixels.

Max photons – Specifies the maximum number of photons that is considered when rendering the caustics effect on a surface. Smaller values cause fewer photons to be used and the caustics are 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 in the expandable field below.

Max density – Limits 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 checks 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.

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 previous rendering.
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.

Save to file – Press this button if you want to save an already generated photon map in a file.

File – The file name with the caustics photon map to be loaded when the Mode is set to From file.

  • To write and load *.vrpmap files per frame, use %04d frame formatting token.
  • Caustics also depend on the individual light and geometry properties (see the Object/Light settings). 

 



 

Example: The Search Distance Parameter


For this example, the Light Caustics Multiplier is 80 (V-Ray Light Properties > Caustics Multiplier) and the rest of the parameters are at their default values. The light used in the scene is VRaySun. The Caustics method is set to Progressive. The Caustics Multiplier  (Render Setup > GI tab > Caustics rollout) is set to 15.

 

 

Search Distance is 1

Search Distance is 10

Search Distance is 20

1
20

 

Click here to expand the Photon Map Examples...

Here, the Caustics method is set to Photon map, and the Light Caustics Multiplier is again set to 80. As can be seen, the larger search distance produces blurrier caustics.

 
Search Distance is 1.5
Search Distance is 2.5
Search Distance is 5
1.5
5
 

Example: VRaySun Photon Emit Radius

 

This example shows how a light's photon emit radius affects the caustics effect. Here we use a VRaySun to light the scene. For this example, the Light Caustics Multiplier is 80 (V-Ray Light Properties > Caustics Multiplier) and the rest of the parameters are at their default values.

 
 
Photon Emit Radius is 5
Photon Emit Radius is 10
Photon Emit Radius is 20
Photon Emit Radius is 40
Photon Emit Radius is 50
5
50
 

 

Example: The Max Photons Parameter

 

For this example, the Light Caustics Multiplier is 80 (V-Ray Light Properties > Caustics Multiplier) and the rest of the parameters are at their default values. VRaySun is used in this scene. As can be seen, the larger value of the Max photons parameter causes the caustics to appear much smoother.

 

Max Photons is 10

Max Photons is 60

Max Photons is 100

Max Photons is 200

Max Photons is 300

10
300

 


Advanced Parameters


The following parameters are added to the list of visible settings available from the Caustics rollout when set to the Advanced Render UI Mode.

Progressive Mode

Multiplier – This multiplier controls the strength of the caustics. It is global and applies to all light sources that generate caustics. Should a different multipliers for each light source be needed, the V-Ray properties of each light should be edited. Note: this multiplier is cumulative with the multipliers in the local light settings.
It should also be noted that changing multipliers, while useful for artistic purposes, will result in physically-inaccurate scenes.

 

Click here for Photon Map Mode parameters...

Multiplier – This multiplier controls the strength of the caustics. It is global and applies to all light sources that generate caustics. Should a different multipliers for each light source be needed, the V-Ray properties of each light should be edited. Note: this multiplier is cumulative with the multipliers in the local light settings.

Direct visualization – When enabled, shows the calculations of the caustics map. This option is for previewing purposes only and should be disabled for final renders.


Don't delete – When enabled, V-Ray keeps the photon map in memory after the scene has finished rendering. Otherwise, the map is deleted, so that the memory it takes up is freed. This option can be especially useful if you want to compute the photon map for a particular scene only once and then reuse it for further rendering.

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

Switch to saved map – This option is only available if Auto save is on. It causes V-Ray to automatically set the Mode to From file with the file name of the newly saved map.

 

 

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;
  • the 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;