How to set up multiple suns / environments
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!
How to do it?
Setting up multiple suns
Simply create multiple Corona Sun objects (Lights > Corona > CoronaSun). You can adjust the intensity, size, and other parameters of your suns individually, but it is recommended to have all suns use similar intensity values and white color, as these things can be adjusted with LightMix later.
UI screenshot showing 3 Corona Sun objects. All parameters can be left at their defaults. It is best to set similar intensities for all suns, and white color.
Sizes of suns can be freely adjusted - this affects blurriness of shadows cast by each sun.
Setting up multiple environments
For this you can use:
- CoronaSky Maps
- Bitmaps (Corona Bitmap or 3ds Max Bitmap, however Corona Bitmap is preferred as it renders faster)
- Any other texture maps
- Solid colors
Go to Render Setup > Scene > Scene Environment and select Use multiple maps. Click on the Maps button to the right, and this will open a Corona Environment Settings dialog.
There you can: specify the number of environment maps you would like to use, specify the environment lighting color (in case you wish to use a solid color for one of the environments), plug the bitmaps/textures which you wish to use as your multiple environments.
Multiple environments can be set up by going to Render Setup > Scene > Scene Environment. Then selecting Use multiple maps and opening the Corona Environment Settings dialog.
Once you have set up all your environments in the Corona Environment Settings dialog, you can simply set up LightMix by either clicking the Setup LightMix button in the Render Setup > Scene tab or in the Corona Renderer Official Toolbar, or by adding the required render elements manually.
There are multiple ways to set up the interactive LightMix. One of them is by clicking Setup LightMix in Render Setup > Scene.
Once all of the above is done, you will end up with:
- One CShading_LightMix render element (default name: "InteractiveLightMix").
- Multiple CShading_LightSelect render elements (one element for each sun, each environment, and each other light source in your scene; each LightSelect element is named based on the name of the light source it includes).
- One CShading_LightSelect render element by default called "Rest (unassigned)" - this is the element where the lights which are not included in any other LightSelect render elements will end up.
CShading_LightMix and CShading_LightSelect render elements with multiple suns and environments set up.
With such setup ready, you can start rendering.
Early stage of the rendering. Note multiple sunlight directions and overall high brightness.
Note that at the beginning the rendering may be more noisy than usually. This is because multiple suns and environments are especially hard to sample, so some render time / quality penalty is expected. In case of persistent noise or areas which show square "patterns" of noise, you may need to disable the Adaptive light solver in Render Setup > Performance.
The scene will be also most likely overexposed when looking at the Beauty pass, because we are rendering a scene with multiple environments and suns additively mixed together. This is also expected, and can be fixed by either lowering the scene exposure or by adjusting the intensities of individual light sources.
Note: for further problems and solutions see the "Limitations and Troubleshooting" section below.
During rendering (regular and interactive) or after you stop rendering, you can control your multiple suns and environments using the standard LightMix controls. Simply go to the LightMix tab in the Corona VFB, where you can control the suns and environments like any other light sources. This includes:
- Enabling and disabling specific suns, environments, and other light sources.
- Changing their intensities.
- Changing their colors.
- Baking colors and intensities into the scene using the >Scene button.
- Saving and loading LightMix presets.
LightMix tab of the Corona VFB.
Final render with no LightMix adjustments. All suns and environments are visible.
Only the 1st environment enabled.
Only the 3rd sun enabled.
2 environments and 1 sun enabled.
1 environment and 2 suns enabled.
Various adjustments on the suns and environments. Version 1.
Limitations and Troubleshooting
Switching between multiple and single environment map modes
In the following situation:
- You set up environment using the Use multiple maps option
- You set up LightMix so that all corresponding LightSelect render elements are created
- Then you switch back to single-environment rendering (by enabling the "Use single map" or "Use 3ds Max settings" options)
The following will happen:
- All the LightSelect render elements which include index (the number next to the name of selected environment) higher than 0 will render black.
- All the LightSelect render elements which include index 0 will show the currently used environment map.
My rendering is extremely bright!
This is actually expected. If you scene exposure was set up according to a single sun and sky, having multiple suns and environments will make it look overexposed.
Solution: either adjust exposure (in the VFB or in your Corona Camera) or adjust the intensities of various items in the LightMix tab of the VFB (e.g. leave only one sun and environment active).
I can see persistent noise!
Some render time penalty and more noise are expected when rendering multiple suns and environments. If you believe the scene is more noisy or renders much slower than it should, try disabling the solutions below.
- Disable the Adaptive light solver in Render Setup > Performance. This will make the overall rendering quality a bit lower, but may help with persistent noise when dealing with multiple environments.
- Increase GI vs. AA balance to 32 (but not more!) in Render Setup > Performance. This will devote more computing power to GI and direct lighting noise resolving at some cost of anti-aliasing quality.
- Use denoising.
I can see sharp, square-shaped patterns!
This can sometimes happen when using multiple suns or environments with the Adaptive light solver.
Solution: disable the Adaptive light solver in Render Setup > Performance. This will make the overall rendering quality a bit lower, but may help with persistent noise when dealing with multiple environments.
I am having some issues, but can't solve them using the above recommended solutions!
Please contact us by submitting a new support ticket. If possible, attach images showing the issue and the scene itself. You can use our Private Uploader to host your files up to 10GB.