Interactive LightMix is unique to Corona Renderer and lets you adjust the intensity and color of your lights and light-emitting materials during and after render – perfect for anything from subtle adjustments through to turning day into night.
What is interactive LightMix?
Interactive LightMix is a new feature introduced in Corona Renderer 1.5, which allows for rendering an image just once, and then changing colors and intensities of the lights directly from the Corona VFB. It can be used after the rendering is finished and, also, like any other post-processing in Corona, during the rendering (be it regular or interactive mode). In Corona Renderer 1.6 the LightMix has been additionally improved with:
- Possibility to bake LightMix parameters into the scene lights and light-emitting materials (>Scene button)
- Better automatic creation dialog with different ways to group lights, information on RAM usage, and checkboxes for denoising and considering hidden lights
- Better, more user-friendly UI
LightMix can be used on Corona EXR files outside of any 3D software using the Corona Image Editor.
Where to find it?
LightMix can be set up either automatically, or manually.
To set up LightMix automatically:
Simply go to Render Setup > Scene and under "General Settings" press the "Setup Interactive LightMix" button. Corona Interactive LightMix Setup dialog will then pop up, allowing you to:
- Choose the way lights are grouped - based on instances, groups, layers or individual lights.
- See how much RAM will be used by each LightMix layer (calculated depending on the resolution of the final render)
- Decide whether hidden lights should be also considered by the LightMix setup
- Decide whether denoising should be applied to all LightMix and LightSelect render elements
Corona Interactive LightMix Setup window
Instanced lights– If there are instanced lights in the scene, each group has its separate channel. All unique lights in the scene are stored in their individual render channels;
Grouped lights – lighting information of each group of lights is placed in a separate channel. All lights that are not attached to any group in the scene are stored in their individual render channels;
Layers – Lighting information for each layer is stored in a separate channel;
Individual lights – lighting information of each light is stored in a separate channel;
Once the settings are confirmed with the "generate" button:
- One CShading_LightMix element will be automatically added to enable LightMix option in the VFB
- One CShading_LightSelect element will be added with the environment lighting included - this will allow changing the color and intensity of the scene environment
- Multiple CShading_LightSelect elements will be automatically added - this will allow changing the color and intensity of each scene light
A list of automatically generated LightMix and LightSelect render elements
After using this one-click solution, you can simply start rendering the scene (both regular and interactive rendering will work), and then go to LightMix tab in the Corona VFB to change intensity and color of each light:
After using the automatic setup, LightMix tab in the Corona VFB becomes available
To set up LightMix manually:
- Go to Render Setup > Render Elements, and then:
- Add at least one CShading_LightMix render element - this is required to enable the LightMix option in the VFB
- Add at least one CShading_LightSelect render element - this is required to be able to control a scene light, or scene environment
CShading_LightMix and CShading_LightSelect render elements can be added manually
Each light that you wish to control should be added to "Included light sources" list in each CShading_LightSelect render element. You can add one or more lights to each LightSelect element. Additionally, you can check the "Include Environment Light" checkbox to control environment lighting.
Note: Objects that use CoronalightMtl with Emit light being disabled, cannot be added or selected for the CShading_Lightselect element. Equally, the same applies to objects with self-illuminated materials.
LightMix and Denosing
You can decide whether denoising should be applied to each LightSelect render element. To denoise the whole LightMix output, you must turn on the denoising option for all LightSelect elements:
As of Corona Renderer 4, the "Rest (unassigned)" LightMix item can be denoised and saved just like any other render element.
This is achieved by allowing any LightSelect render element to act as the "Rest (unassigned)" render element by enabling the appropriate option ("Include lights not assigned to other LightSelect elements") for the LightSelect element:
the LightMix pass with lights not included in other LightSelect render elements.
This render element can and will be denoised just like other LightSelect render elements as long as the "Apply denoising also to this render element" option is enabled.
Please note that if any lights are left unassigned to any LightSelect render elements and no LightSelect render element has the "Include lights not assigned to other LightSelect elements" option enabled, these lights will still end up in the Rest (unassigned) section but you will not be able to denoise the render element or save it.
How to use it?
After setting up LightMix (either automatically, or manually), the color and intensity of each light can be changed in the VFB. Simply go to LightMix tab in Corona VFB and change the desired parameters - this can be done during, or after rendering, for both regular and interactive rendering:
After setting up the Interactive LightMix, its dedicated tab in the VFB becomes available
You can also use additional buttons below the lights list:
- >Scene - This bakes all LightMix colors and intensities into the scene lights. After clicking this and confirming, the image displayed in the VFB will be temporarily changed to the non-LightMix version, and you will need to re-render it to get the desired result. Lights which are instanced will become unique in case some of them were separately altered using the LightMix.
- Save... / Load... - This saves a LightMix preset as a .conf file. Useful, for example, when creating day and night versions of a scene. It is also possible to load a preset after a camera is changed and a different view is rendered. The .conf files can be also loaded into the Corona Image Editor.
- Toggle all - This enables or disables all lights in the LightMix list.
- All 1.0 - This reverts all LightMix layers' intensities to 1.0, which means the values set in the scene will be used - this will NOT make all lights equally bright if they have different intensities set in the scene.
- All white - This simply reverts the colors of all LightMix layers to pure white, which results in having the initial colors of scene lights used.
Additionally, you can right-click on the light names on the LightMix list in the Corona VFB to select a specific light in the scene, add that light to the current selection, or remove that light from the current selection:
Compositing LightMix layers in other applications
To compose different LightMix layers (LightSelect render elements) so that the final image looks the same as in the Corona VFB open the layers in the application of your choice, and stack them on each other in any order using the "add" blending operation. In Adobe Photoshop it is called "Linear Dodge (Add)".
Using LightMix with multiple suns and environments
An example image with multiple suns and environments controlled by LightMix.
In Corona Renderer 4 and newer it is possible to add multiple suns and environment maps to your scene, and then control their appearance with LightMix. This means that you can render just once, and pick between completely different lighting conditions, adjust sun and environment intensity and color, and even have two or more suns illuminate your scene at a time. No re-rendering needed!
See: How to set up multiple suns / environments
What are the limitations?
There are some technical limitations when using LightMix:
- Using extremely high or low light intensities
This, depending on the intensity, may result in persistent noise (fireflies).
Solution: after setting the LightMix as desired, use the >Scene button in the VFB LightMix tab to bake your settings into the scene.
Using extremely high or low light intensities in the LightMix always leads to excessive noise.
- Adding a lot of lights and rendering in very high resolution
This can lead to excessive RAM usage. A warning message should appear when attempting to set up LightMix with many lights.
Solution: render your image in low resolution to keep memory usage low, then adjust LightMix settings as needed. Once the LightMix setup is complete, use the >Scene button to bake all custom light settings into the scene, then disable all LightMix and LightSelect render elements, and re-render your image in high resolution. This way you will be able to use your LightMix settings in a high-resolution render, without the high RAM usage.
- Using the ShadowCatcher material
Note: this issue was fixed in Corona Renderer 3, so it should not be valid any more. The below description and solution can be used in case of some other/similar issues:
LightMix does not interactively update shadow catcher material shading results - this is currently a limitation.
Solution: use the >Scene button to bake LightMix properties into the scene. Then re-render your image and use the beauty pass to get the correct ShadowCatcher result.
See: Known bugs and limitations
Beauty render element:
Other than that, the results of using LightMix are only limited by your imagination. :)
1. When I go to the LightMix tab in the Corona VFB, it says that "Interactive light mixing is currently not possible"!
This happens if LightMix has not been set up correctly. Some of the reasons include:
- LightMix not being set up at all
- All 3ds Max Render Elements are disabled
- There is no CShading_LightMix render element on the 3ds Max Render Elements list
- There are no CShading_LightSelect render elements on the 3ds Max Render Elements list
The solution is to make sure that LightMix is properly set up, and that the Render Elements are enabled. The easiest way to make sure LightMix is set up correctly is by using the dedicated button in the Corona Toolbar or the Setup LightMix button in the Scene tab of the Render Setup window.