This page provides information on the Corona Volume Grid, its settings, and usage examples.
Overview
The Corona Volume Grid allows you to render objects which are truly volumetric and based on a 3D grid, as opposed to meshes with the Corona Mtl or Corona Volume Mtl which always require some kind of surface consisting of polygons to display the volume.
The typical uses of the Corona Volume Grid are fire, explosions, smoke, clouds, steam, and other visual effects based on particle or fluid simulations, objects which are not possible or hard to render when using classic polygonal mesh.
Supported Formats
Only the OpenVDB (.vdb) format is supported. You can learn more about it at http://www.openvdb.org/, and you can download sample .vdb files at http://www.openvdb.org/download/
The Corona Volume Grid also supports animated OpenVDB files (.vdb sequences).
Corona Volume Grid
Load from file – Loads sequence of OpenVdb from a disk. If one file is selected by the user, the sequence of files is auto-detected. If more files are selected by the user, only those files are loaded and they are placed into sequence by their alphabetical order.
Reload from disk – Reloads a previously loaded sequence of OpenVdb files from disk.
Online Help – Opens the knowledge article for Corona Volume Grid.
Animation
Model – Sets how the sequence of OpenVDB files are mapped onto the 3ds Max timeline.
Repeat – The whole sequence is periodically repeated (the first frame appears after the last frame).
Ping Pong – Sequence is repeated in a continuous way (e.g. frames 1 to 5 are repeated as follows: 1 2 3 4 5 4 3 2 1 2...).
Freeze out of range – Frames below the range of the loaded sequence are displayed as the first frame of the sequence and frames above the range as the last frame of the sequence.
Hide out of range – Out-of-range frames are not displayed.
Frame Offset – Determines how much the OpenVDB sequence is offset compered to the 3ds Max timeline. Setting offset to 1 displays frame 1 to the OpenVDB sequence when 3ds Max frame number is 2 (so the OpenVDB sequence is delayed by 1 frame).
Start – Determines the first frame to be displayed from the OpenVDB sequence. Setting this value to 2 for a sequence with frames from 0 to 9 results in skipping frames 0 and 1.
Length – Determines the number of consecutive frames used from the OpenVDB sequence. Setting this value to 5 for a sequence with frames from 0 to 9 results in skipping frames 5 to 9.
Speed multiplier – Determines how fast the OpenVDB sequence runs. Setting this value to 1 results in one OpenVDB frame per one 3ds Max frame, while setting this value to 2 results in two OpenVDB frames per one 3ds Max frame.
Load nearest if missing –When enabled, missing frames in Open VDB sequence are replaced by the closest frame.
Shading
Emission
Checkbox – Enables emissions in this volume.
Channel – Selects the channel that is used as a source for medium emission. Along with channels (grids) presented in the OpenVDB file, such as Temperature, Density, Velocity, etc., a special option can be selected:
Constant – Contains only the value 1, which fills the whole bounding box of the volume grid.
Tint – Enables modulation of the final color by text map. Only object XYZ and World XYZ mapping are supported.
Mode – Defines the way in which data in the selected emission channel is mapped to the final emission of the volume.
Raw data – Channel data are not mapped and are only influenced by scale and tint.
Channel mapping – Emission channel undergoes mapping to colors, which is accessible under the "Channel color mapping" button.
Blackbody – Emission channel is treated temperature of Kelvin and converted to color according to blackbody radiation laws.
Scale – Uniformly scales emission amount after mapping.
Temperature scale – If emission mode is set to Blackbody, the selected emission channel is treated as temperature in Kelvin and these parameters are used to linearly scale the temperature.
Channel color mapping – Opens the Channel color mapping window, where you can choose how values from the selected channel are mapped to colors.
Absorption
Channel – Еnables absorption in this volume. Selects the channel that is used as a source for absorption. Along with channels (grids) presented in the OpenVDB file, a special option can be selected:
Constant – Contains only the value 1, which fills the whole bounding box of the volume grid.
Tint – Enables modulation of the final color by text map. Only object XYZ and World XYZ mapping are supported.
Scale – Uniformly scales absorption amount after channel mapping.
Channel color mapping – Opens the Channel color mapping window, where you can choose how values from the selected channel are mapped to colors. Use the checkbox to enable mapping of channel value to colors. If mapping is switched off, float channel values are treated as luminance values, while color channel values are not changed. When channel values are colors and mapping is enabled, only the luminance of channel color is taken into account.
Scattering
Checkbox – Enables scattering in this volume. Selects the channel that is used as a source for scattering albedo. Along with channels (grids) presented in the OpenVDB file, a special option can be selected:
Channel - Contains only the value 1, which fills the whole bounding box of the volume grid.
Tint – Enables modulation of the final color by text map. Only object XYZ and World XYZ mapping are supported.
Scale – Uniformly scales scattering albedo after channel mapping.
Directionality – Directionality equals 0 produces isotropic (diffuse) scattering, positive values produce forward scattering and negative values produce backward scattering. The default value of 0 is suitable for most media, with the exception of clouds where a higher positive number produces the effect of a silver lining. Values close to - 1 or 1, increase the amount of image noise.
Single bounce only – When enabled, only a single bounce (direct lightning) is scattered in the medium. This results in a biased (darker), but faster, rendering. Useful for example for rendering god rays.
Channel color mapping – Opens the Channel color mapping window, where you can choose how values from the selected channel are mapped to colors. Use the checkbox to enable mapping of channel value to colors. If mapping is switched off, float channel values are treated as luminance values, while color channel values are not changed.
When channel values are colors and mapping is enabled, only the luminance of channel colors is taken into account.
Example: Emission
Example: Emission Scale
Example: Absorbtion Scale
Example: Scattering Scale
Example: Emission Tint
Set to blue
Example of Scattering Tint
Set to blue
Rendering
Interpolation – Specifies how emission/scattering/absorption values are computed from the channel.
None – No interpolation, the fastest method, but also prone to artifacts.
Linear – Linear interpolation, good quality, and reasonable speed.
Quadratic – Quadratic interpolation, the best results but the lowest speed.
Step size – Determines ray marching step size. Increasing the value leads to faster rendering with more noise and possibly some artifacts, while lowering the value leads to less noise but slower render times.
Alpha mode – Specifies how the object is visible in the alpha channel. Available modes are:
Default – This is the default mode. In this mode, the object's alpha value is derived from the data in the OpenVDB file.
Always black – In this mode, the object's alpha value is black (the object shows as transparent).
Always white – In this mode, the object's alpha value is white (the object shows as opaque).
Flip frame – Flips frame of the OpenVDB channels (more specifically the Y and Z axes).
Motion Blur – Defines how motion blur and frame interpolation are computed.
Disabled – Both frame interpolation and motion blur are disabled (in both cases we only use the frame closest to the current time).
Simple – Simple linear interpolation between two OpenVDB frames, may lead to artifacts.
Velocity-based – Enables smooth interpolation/motion blur using velocities stored in the OpenVDB file. For this mode to work properly, you must select a velocity channel.
Multiplier – Specifies the strength of the motion blur effect.
Frame interpolation is necessary when OpenVDB sequence frames are offset by a non-integer number or have a non-integer speed multiplier.
Viewport display – Determines how the current OpenVDB fame is displayed in the viewport.
Wire box – Only bounding box of selected OpenVDB channels is displayed.
Point cloud – The volume is displayed as a point cloud; each point position is determined by the volume density and its color by channel mapping/tint settings (requires loading of channels - slow for huge files).
Quality – Determines a total number of points displayed for the point cloud preview mode.
Example: Interpolation
Example: Step Size
Examples: Motion Blur
Workflow Examples
This example shows how to get dark, thick smoke, which does not emit or scatter light.
Emission and scattering are disabled (since we do not need them). Absorption is enabled and set to a high scale.
In this example we show how to achieve intensive fire with dark, thin smoke, which does scatter some light.
Emission is enabled since we want to render the emissive fire part. Emission scale is set to 5 to boost intensity. Blackbody mode is selected for the emission, since we are rendering realistic fire.
Absorption is enabled to render the smoke, however its scale is reduced to 0,5 as we'd like the smoke to be thin. Scattering is enabled with the scale set to just 0,05 for a weak scattering effect.
This example shows how to create a bright steam.
We do not need emission for this example, so it is left disabled. Absorption is enabled, however its scale is lowered to 0,05 to make the steam transparent.
Scattering scale is set to 1 to make the steam appear bright.
This example shows magic fire with colorful smoke.
We are using emission, absorption, and scattering. To achieve the purple hue of the smoke, we are using a custom scattering tint color.
For the colorful fire, we are using the channel color mapping option for emission (see below for further information and a mini-tutorial).
Channel Color Mapping Tool
Channel color mapping can be used to colorize the properties of the volume grid (emission, absorption, scattering) based on a gradient. For example, a red-yellow gradient can be used to create realistic fire.
The channel mapping dialog allows for mapping floating point values stored in the channel to colors. The mapping is computed as follows:
- First the float values are scaled by the Input scaling so they fit into [0,1]. One can use the Auto-scale button to compute the input scaling value automatically
- Float value is mapped to color using the color gradient. The leftmost color of the gradient defines how the value of 0 is mapped to color, while the rightmost color defines how the value of 1 is mapped to color
- The color computed from the gradient is scaled by the curve. Note that the curve input is not the color from the gradient, but the input-scaled floating value from the channel (i.e. the result of operation 1)
- The final color is computed by scaling the color back using inverse of Input scaling
Suggested workflow (based on emission)
- Set emission channel to temperature.
- Set mode to Channel mapping.
- Open the Channel color mapping window.
- Press the Auto-scale button to automatically adjust the scaling value.
Set the desired gradient colors:
- The leftmost color represents the color of the darkest features of the volumetric effect
(in case of using the temperature channel, this means the lowest temperature, so all areas outside of the visible fire) - The right most color represents the color of the brightest features of the volumetric effect
(in case of using the temperature channel, this means the highest temperature) - All values in-between represent the transition between the extreme intensities (left and right most)
- The leftmost color represents the color of the darkest features of the volumetric effect
6. At this point, you can adjust the curve to your needs:
- Moving the bottom-left point towards the top of the graph makes the darkest colors more intensive
- Moving the bottom-left point towards the right side of the graph cuts off some of the darkest colors, making them transparent. Note: this is useful for getting rid of the shape of the volume grid's bounding box being visible in the rendering
- Moving the top-right point towards the bottom of the graph makes the whole effect less intensive
- Moving the top-right point towards the left side of the graph makes the whole effect more intensive (note that this can often make the effect appear burnt out)
- You can also add points in other places of the curve to control the in-between values, and you can switch between cubic (bezier) and linear (corner) splines.
- At this point, adjusting the Input scaling value makes the overall effect more or less intensive
7. If you press OK and close the channel color mapping window, you can then return to the Shading rollout of the Corona Volume Grid object and adjust the Emission scale parameter. It works in a similar manner to the Input scaling inside the channel color mapping window, but adjusts the intensity after the color mapping is done. This means that if you have removed the visible bounding box from the volumetric effect using the controls provided in the channel color mapping window, then there is no way to show the bounding box again using the Emission scale parameter. This can be used to adjust the intensity of the effect after the overall color and visibility has been set up (e.g. making fire brighter).