Note: the tutorial was released in 2020, but it still presents valid information on volumetric effects in Corona!
There are two light scattering models available in the Corona Physical Material:
- Volumetric Scattering
- Subsurface Scattering
These two modes should be used in slightly different scenarios, and are characterized by different properties:
1. Subsurface Scattering
The Subsurface Scattering mode is suitable for quickly setting up simple materials, which do not require such effects as refraction or opacity. This means that the material has a defined, opaque surface, and that its volume is very thick. Examples of such materials include:
The Subsurface Scattering mode cannot be enabled when using the "Thin shell (no inside)" mode of the Corona Physical Material:
Opacity can be still controlled, however, if it’s lowered, no volume will be visible inside the material, meaning that it is only controlling the visibility of the object’s surface:
Below are the available controls, which define how the final subsurface scattering effect looks:
Controls how much the material's color will be affected by the subsurface scattering as opposed to diffuse reflection. A value of 0 results in no subsurface scattering at all, while a value of 1 results in full subsurface scattering and no diffuse component.
Defines the subsurface scattering radius – how far a color will scatter from a place that was hit by a light ray.
Defines the scatter color of subsurface scattering – the color that can be observed in the shadowed parts of the material.
2. "Volumetric Scattering" Mode
The Volumetric Scattering mode is suitable for materials relying on additional effects such refraction or opacity. Materials, which require this mode are usually very thin or refractive, and this includes:
Milk glass (refraction)
Orange juice (refraction)
Muddy water (refraction)
A good method for setting up a material using volumetric scattering is to make its surface completely transparent using Opacity set to 0. You can then adjust the volumetric scattering parameters to see their effect without interference from other effects such as reflectivity. You can finalize the other material settings once you are satisfied with the look of the volume.
The available properties defining the volume of the material include:
This defines the density of the material. It is controlled using two parameters:
Controls how quickly the light passing through an object will become colored and darker. With a lower value, the light will be very quickly absorbed and so appear more strongly colored and darker, even with thin pieces of the material. With higher values, the light will travel farther through the material before these effects happen, so that even thicker pieces of the material will not show so much coloring and darkening of the light.
The color that the white light will take on after passing through the material by the “Absorption Distance”.
The color of the scattering media. It affects the coloring of light bounced back toward the viewer by the volume of the material, in much the same way as Diffuse controls the coloring of light bounced back toward the viewer by the surface.
It is controlled by three parameters:
- Scattering Color
This controls the color of the light after it is scattered.
This controls the direction in which light is scattered. The default of 0 means that light gets scattered evenly in all directions. Positive values mean that light gets scattered forward, along the same path it was already traveling. Negative values mean that light gets scattered backward, back along the path it was traveling.
- Single bounce only
Once the light has been scattered, it is still passing through the volume and has a chance that it may be scattered again. By enabling this checkbox, light can only be scattered once, after which it will pass through the volume without further scattering (though it will continue to be affected by absorption) and this gives faster rendering with the trade-off being a darker result and potentially less realism depending on how much the scattering affects the result.
When using the Volumetric Scattering mode, to make the light scattering effects visible, at least one of the following material properties has to be enabled:
Lowering opacity when using the Volumetric Scattering mode will only make the object's surface transparent, and will reveal the object's volume underneath:
Using both Volumetric Scattering and Subsurface Scattering at the same time
Corona makes it possible to use both the Volumetric Scattering and Subsurface Scattering options at the same time. To get both controls active, you need to:
- Enable refraction and keep it above 0 but below 1
- Set Opacity to less than 1
The results of using the two options will be blended together. This kind of setup can be used to simulate materials which are intended to be, for example, a mix of glass (refraction, volumetric scattering) and plastic (subsurface scattering), but generally it should not be used commonly.