Old youtube tutorial ( Corona 4 HF1): Getting Started with Caustics in Corona for 3ds Max.
With our new caustics solver, absolutely stunning caustic images can be rendered in basically just a few clicks. There is no need to adjust parameters and settings or "try your luck" with the old experimental engines as done before. The new caustics solver is easy to work with, supports reflective and refractive caustics, is fast to render, and will take your images to the next level of photo-realism.
Caustics solver features
Corona caustics solver supports the following features:
-
Reflective and Refractive caustics. (Glass, water, and highly reflective metals etc)
-
Dispersion in refractive materials (useful for diamonds, crystals, etc)
-
Motion blur (the caustics effect will motion-blur correctly)
-
Separate caustics multi-pass for post-processing, with the possibility to split into diffuse, reflection, refraction, and GI components
-
Caustics work with both the UHD Cache and Path Tracing
-
Caustics from each light source will also be correctly adjusted by LightMix
- Caustics can be disable for specific lights sources and environment light (HDRI or Corona Sky)
- Objects can be excluded from receiving caustics
There are, however, also currently some limitations:
- Caustics may render slower/differently when using render regions (this will be improved).
- Caustics inside volumes are still calculated the old way and are not accelerated by the new solver.
-
Refractive caustics still require having caustics enabled in the material. Reflective caustics do not.
-
Only Corona Lights will produce caustics (standard and photometric Max lights are not supported).
- The new caustics use a Markov Chain Monte Carlo algorithm, which means each frame in an animation (or even rendering the same frame twice) will have a different pattern in the noise. To avoid flickering in animations, you will have to render a significant number of passes to ensure the solution has converged.
How to render caustics?
1. Enabling the caustic solver
The new caustics solver can be enabled globally for a scene using just a single checkbox in the Performance tab of Render Setup:
Once the new caustics solver is enabled, Corona will calculate physically realistic caustics for any reflective materials and any refractive materials that have caustics turned on in the material itself.
Note: reflective caustics are always calculated, regardless of the state of the material’s caustics checkbox.
2. Reflective caustics
To render reflective caustics you will need:
-
A highly reflective material (reflective caustics do not require turning on any special caustics option in the material). A typical "metal" setup will work best - you can use the "Chrome" preset built into the Corona Physical Material:
-
A light source (small, bright light will produce sharp, intensive caustics).
-
A surface which will catch the caustics (a ground plane, table top, etc.)
3. Refractive caustics
Rendering refractive caustics requires:
-
A refractive material with "Caustics (slow)" option enabled. You can use the "Glass"
-
The refractive material cannot be using "Thin (no refraction)" option, as refraction is required to render caustics.
-
A light source (small, bright light will produce sharp, intensive caustics).
-
A surface which will catch the caustics (a ground plane, table top, etc.)
Excluding objects from receiving caustics
In some cases, you may want to disable receiving caustics for specific objects in your scene. For example:
- When rendering jewelry, you may want to see caustics on the ground, but not on other objects.
- When rendering a pool, you may want to see caustics generated by the water on the bottom of the pool, but not on the walls of nearby buildings.
- When rendering a bathroom with highly reflective tiles on all walls, generating caustics for the whole interior may be very resource-heavy and may introduce noise. To improve rendering performance, you can exclude most objects from receiving caustics and only keep them where they are really needed (e.g. at the bottom of the bathtub filled with water, or reflected off a mirror).
To use this feature, navigate to Render Setup > Performance > Caustics Solver and use the button which says "Objects: 0 objects excluded...". This will open a pop-up list where you can exclude (or include) any scene objects you wish from receiving caustics:
Examples of using the caustics excludes option:
The default rendering. No excludes used. All glass spheres are casting caustics on all scene objects:
Ground object excluded from receiving caustics - note that the caustics from the bottom-most glass sphere are not visible on the ground any more:
White cube object excluded from receiving caustics - note that the caustics from the glass sphere in the center of the image are not visible on the white cube any more:
In the below example we are rendering a bathtub full of water. There are many reflective materials in the scene, including wall tiles, which results in calculating caustics for almost the whole scene. Additionally, both the refractive and the reflective caustics are visible (at the bottom of the bathtub and on the wall).
Render time: 5 minutes
Passes: 25
Caustics visible on the wall, on the bottom of the bathtub, some caustics causing fireflies in the shadows in the corner.
To get better rendering performance, get rid of unwanted fireflies, and remove reflective caustics from the wall (if we want to), we can exclude all scene objects from caustics calculations, and only include the bathtub object so that we see refractive caustics generated by the water:
Render time: 5 minutes
Passes: 27
Caustics are visible in the bathtub only, less fireflies, better overall image quality.
Note: some very faint reflective or refractive caustics may still appear even if an object is excluded from receiving caustics. This is because the excludes option disables receiving caustics generated by the fast caustics solver. Corona's default path tracing solver will be still used for simulating lighting in the whole scene anyway. Caustics generated with the default path tracing solver are much weaker, because they are clamped according to the Max Sample Intensity value.
CShading_Caustics render element
With the new caustics solver comes a new render element - CShading_Caustics.
This render element allows you to separate the caustics effects from the render to facilitate better control over the effect in post-production.
To enable the CShading_Caustics render element, simply add it to the list of render elements as you would any other render element.
To ensure optimal compositing of the CShading_Caustics render element onto your final render, make sure you enable the “Only in caustics element” checkbox in Render Setup > Performance tab:
Turning on this checkbox will stop caustics from being visible in the beauty render element of the final render. They will, however, be visible in the CShading_Caustics render element and the render time penalty will still apply.
Beauty pass with the caustics rendering disabled |
CShading_Caustics render element output of the same render |
The following is the above two images composited by adding the CShading_caustics render element on top of the beauty render element (“add” blending mode in Photoshop):
The caustics render element can be also split based on type (direct, reflected, refracted, GI). The resulting elements can be combined to produce the full caustics solution (same as what you normally see in the beauty pass). Caustics can be split into parts and later composed, masked and otherwise adjusted, in 3rd party 2D editors:
Beauty pass: All ''include'' passes displayed in one image:
Include Direct: This contains caustics that are directly visible from the camera:
Include Reflected: This includes all caustics that are visible from the camera through a series of specular reflections/refractions, where the first interaction (first bounce after the camera) is reflection:
Include Refracted: Same as Reflected, but the first interaction is refraction:
Include GI: Includes caustics that are not in the above 3 categories (e.g. caustics visible from the camera through diffuse reflection):
Environment caustics and per-light control
Environment caustics
The caustics solver can also generate caustics cast by your scene environment, be it a CoronaSky map or a HDRI. Environment caustics are turned on by default and can be controlled by a checkbox in the Performance tab of the Render Setup dialog as shown below:
If the "Caustics from environment" checkbox is cleared, caustics will only be calculated from the scene lights and any environment maps will be ignored.
This is useful if your HDRI has a strong light source that you do not want to affect the caustics in the scene (for example, you are using a Corona Sun for the main light in the scene).
It is also recommended to disable caustics generated by the environment if you are matching a Corona Sun to a sun on the HDRI image as otherwise, caustics will be calculated for both the HDRI image's sun and the Corona Sun which can lead to incorrect results and longer rendering times as well as possibly overly blur the caustics effect.
Per-light control of caustics
You can define which lights do and which do not produce caustics effects by either turning on or off the "Generate caustics" checkbox in the light's properties:
Note: all lights have the "Generate caustics" option enabled by default.
Disabling caustics in individual lights is useful in cases where you want to have a large-scale caustics effect, for example from a sun hitting a pool, but don't want to have a longer render time associated with calculating caustics from interior or exterior lighting on the building.
Troubleshooting
I can't see caustics!
Make sure that your glass material has the "Caustics (slow)" option enabled under refraction properties and that you are using Corona lights and not standard 3ds max lights or 3ds max photometric lights.
My caustics are too dark!
The caustics solver calculates physically accurate caustics and so the intensity of the light will directly affect the intensity of the caustics effect.
My caustics are "cut off" in some places, and I can see triangular artifacts!
This can happen under very specific circumstances if the object generating caustics is partly outside of the current camera view.
See this guide for solutions: Caustics appear cut off / with artifacts!
My caustics look strange with AI-based denoisers (Intel, Nvidia)
Unfortunately, the AI based denoisers need to be trained to optimally denoise caustics and since the caustics solver in Corona is very new, there has not been enough time to train the denoisers.
Denoising quality of the AI-based denoisers will improve in the future as we work with both Intel and Nvidia on training their respective AI denoisers.
The Corona high-quality denoiser works with caustics perfectly fine.
My caustics progressively disappear, there are black spots visible on my rendered caustics!
In rare cases, caustics may start disappearing while the rendering progresses, or black spots might start emerging in your image. In cases like these, you will need to disable the Caustics Adaptivity option. Normally the Caustics Adaptivity option allows for the caustic solver to not calculate very weak caustics in order to save computational resources, but in some cases this causes visible issues.
This option should only be disabled if the aforementioned issues are present. To disable it, first enable Devel/debug mode in Corona System settings in System Tab of 3ds max Render Setup. Then navigate to Performance >Caustics solver settings and uncheck "Enable caustics adaptivity":
Note: this option is enabled by default.
Are there some other tips and tricks on rendering caustics?
-
Do not enable caustics “just for the heck of it”. Rendering with caustics enabled is still slower than rendering without them and unless it’s absolutely necessary, keep caustics to the minimum.
-
Enable dispersion for highly refractive materials to add realism (e.g. diamonds). Beware, this will slow the rendering further, more than just having caustics enabled.
-
Avoid using atmospheric effects like fog with caustics. Even though it is supported, it has not yet been optimized and may cause slowdowns and excessive noise in the current implementation since the old method of calculating in-volume caustics is still being used.
Examples
The same scene rendered with the new caustics solver. “Caustics (slow)” option has been turned on in refractive materials. Both reflective and refractive caustics are visible and sharp. 30 minutes rendering time.