How to use the Corona Volume Grid - 3ds Max?

Old youtube turorial: Volumetrics and SSS in Corona Renderer for 3ds Max - Part 4: Corona Volume Grid

 

Be sure to check out the other parts of the above tutorial to learn more about SSS and volumetric effects in Corona Renderer! For further information on the Corona Volume Grid, see below: 

  • What is the Corona Volume Grid object? (CVolumeGrid)
  • Where to find it?
  • What formats are supported?
  • What are the available controls?
  • How to achieve the desired results - Examples
  • How to use the Channel Color Mapping tool?
  • How to get the fastest rendering and the best quality?
  • Aren't Corona Volume Grid controls similar to those found in the Corona Volume Mtl?

volume.gif

 

What is the Corona Volume Grid object? (CVolumeGrid)

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 include:

  • Fire
  • Explosions
  • Smoke
  • Clouds
  • Steam
  • Other visual effects based on particle or fluid simulations
  • Objects which are not possible or hard to render when using classic polygonal mesh


fire.jpg

Fire


smoke.jpg

Smoke 


steam.jpg

Steam 

 

Where to find it?

The Corona Volume Grid can be created by going to the Command Panel and then Create > Corona > CVolumeGrid.

 

corona-volume-grid-ui.png

 

What formats are supported?

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). 

 

What are the available controls?

Most useful controls include:

 

Note: if you need information about the remaining controls, you can hover your mouse over their names to see tooltips.

 

Emission

Toggles emission for the volume. This can be seen as the temperature of the tiny smoke particles. The higher the temperature - the brighter the particles glow. 

noemission.jpg

Emission off

 

yesemission.jpg

Emission on


Channel 
- Selects the channel (grid) present in the OpenVDB file that will be used for medium emission. Usually it should be set to "temperature" to get results such as fire or explosion.
There is also an additional channel called "constant" - it is a single solid color, which is applied to the whole bounding box of the volume. In case of using "constant" mode for the emission, the whole bounding box of the volume grid object will start glowing. This channel is useful, for example, for scattering when creating smoke - you can set constant scattering color to have the same type of scattering inside the whole medium, and then its thickness will be controlled only by the absorption properties.

 

emission-constant.jpg

Emission channel set to "constant"


Scale 
- makes the overall emission more or less intensive (higher values mean higher intensity).

 

yesemission__1_.jpgHigh emission scale

 

emission-scalelower.jpgLower emission scale


Tint 
- this color is applied to the emission (you can see it as a kind of filter). 

emission-tint.jpg

Emission tint set to blue

 

Map - this is the mask used for emission. Note that the mask is applied in 3D space, so adding a noise map will result in having a 3D noise mask applied to the object.

 

emission-noise-map.jpg

Procedural noise used as the map for emission


Mode 
- it defines how the data from the currently selected channel is interpreted:

  • Raw data - uses the original color and intensity which is stored in the vfb file. It is then affected by scale and tint parameters. 
  • Channel mapping - uses custom settings from the "Channel color mapping" tool. See "How to use channel color mapping" below.
  • Blackbody - simulates color emission of a blackbody at given Kelvin temperature (useful for fire simulations).

Absorption

Decides how far light can travel inside the object before it is fully consumed. 

 

Channel - Selects the channel (grid) present in the OpenVDB file that will be used for absorption. Usually it should be set to "smoke" to get results such as fire or explosion. There is also an additional channel called "constant", which fills the whole bounding box of the volume grid. 

 

Scale - makes the object absorb the light faster or slower (higher values mean faster absorption meaning darker overall color, thicker smoke)

 

yesemission.jpg

Lower absorption scale. The smoke appears thinner.

 

absorption-higher.jpg

Higher absorption scale. The smoke appears thicker

 

Tint - this color is applied to the absorption (you can see it as a kind of filter). 

 

Map - this is the mask used for absorption. Note that the mask is applied in 3D space, so adding a noise map will result in having a 3D noise mask applied to the object.

 

Scattering

Decides how light is scattered inside the volume. 

Channel - Selects the channel (grid) present in the OpenVDB file that will be used for scattering. Usually it should be set to "constant" to have the whole medium scatter light in the same way in the areas where absorption allows this, but other channels may work fine too, depending on the needs. 

 

Scale - makes the object scatter light more or less (higher values mean more scattering and brighter overall color).

 

yesemission__2_.jpg

Lower scattering scale. The smoke appears darker

 

scatter-scale-higher.jpg

Higher scattering scale. The smoke appears brighter

 

Tint - this color is applied to the scattering (you can see it as a kind of filter). 

 

scatter-tint.jpg

Scattering tint set to blue

 

Map - this is the mask used for absorption. Note that the mask is applied in 3D space, so adding a noise map will result in having a 3D noise mask applied to the object.

 

Directionality - directionality of the scattering. 0 produces isotropic ("diffuse") scattering. Positive values produce forward scattering. Negative values produce backward scattering. Default value of 0 is suitable for most media, with the exception of clouds, where higher positive numbers will produce the effect of "silver lining"

 

Single bounce only - This option should be enabled, unless disabling it is absolutely necessary. When enabled, only single bounce (direct lighting) will be scattered in the medium. This results in a biased (darker), but much faster rendering. Useful e.g. for rendering "god rays" inside the medium.

 

Rendering:

 

Interpolation - decides about the speed to quality ratio. It is similar to filtering used in many applications when dealing with 2D textures. 

  • "None" will give fastest rendering, but lowest quality with a possibility of "pixelated" or "blocky" appearance of the grid. 
  • "Linear" is a compromise between quality and render speed, and this mode is used by default. 
  • "Quadratic" will produce best quality, but at the cost of render time. 

 

inter-none.jpg

Interpolation set to none. Render time: 24s. The result is visibly "blocky"

 

inter-linear.jpg

Interpolation set to linear. Render time 24s (the same as when using no interpolation). The result appears much smoother and more natural.

 

inter-quad.jpg

Interpolation set to quadratic. Render time 31s.

The result appears more natural, but the rendering is slower. 

 

 

Step size - ray marching step size. Decides how many "volumetric steps" can be used to render the object. Higher values mean faster rendering, more noise, and higher possibility of artifacts showing up. Lower values mean better quality, but slower rendering. To get reasonable render times, the step size should be set to as high value as possible, until ray marching artifacts are visible ("slices" visible inside the object).

 

step-05.jpg

Step size 0,5cm. Render time 3min 46s. The smoke is thick, and details are preserved

 

step-5.jpg

Step size 5cm. Render time 48s. The smoke gets thinner, and there are less details visible.

 

step-50.jpg

Step size 50cm. Render time 29s. The whole object becomes transparent and the details are lost. 

 

Flip frame - flips the OpenVDB file's Y and Z axes, which results in the object being rotated by 90 degrees. This option should be used if the object appears to be incorrectly rotated when loaded.

 

Preview type - use bounding box or point cloud viewport preview for the OpenVDB file. 

Warning: the point cloud preview can be slow when a large file is loaded. 

 

Preview quality - the density of the point cloud preview. 

 

Motion blur - decides how motion blur is computed. 

 

  • Mode
    • Disabled - disables motion blur
    • Simple - simple interpolation between two OpenVDB frames - may lead to artifacts
    • Velocity based - smooth interpolation based on the velocity channel of the OpenVDB file - requires selecting the correct velocity channel
  • Velocity - selects the channel which stores velocity information for the motion blur calculations. Usually "velocity" should be used for this. 
  • Multiplier - strength of the motion blur effect (higher values mean more pronounced motion blur). 

 

mblur-off.jpg

Motion blur off. 

 

mblur-simple.jpg

Simple motion blur. 

 

mblur-velo.jpg

Velocity based motion blur. 

 

How to achieve the desired results - Examples

Example 1 - we want to achieve 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.

thick-smoke.jpg

 

thick-smoke-ui.png

 

Example 2 - we want 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.

 

intensive-fire.jpg

intensive-fire-ui.png

 

Example 3 - we want to achieve 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.

 

bright-steam.jpg

bright-steam-ui.png

 

Example 4 - we want to achieve "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).

 

fire-magic.jpg

 

fire-magic-ui.png

fire-magic-ui2.png

 

How to use the Channel Color Mapping tool?

Simply put, channel color mapping can be used to color 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:

 

1. 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.

2. Float value is mapped to color using the color gradient. The left most color of the gradient defines how the value of 0 is mapped to color, while the right most color defines how the value of 1 is mapped to color.

3. 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 vaue from the channel (i.e. the result of operation 1). 

4. The final color is computed by scaling the color back using inverse of "Input scaling".

 

Suggested workflow (based on emission):

 

 

  1. Set emission channel to temperature.
  2. Set mode to "Channel mapping".
  3. Open the "Channel color mapping" window. 
  4. Press "Auto-scale" button to automatically adjust the scaling value.
  5. Set the desired gradient colors:
    • The left most 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)
  6. At this point, you can adjust the curve to your needs:
    • Moving the bottom-left point towards the top of the graph will make the darkest colors more intensive.
    • Moving the bottom-left point towards the right side of the graph will "cut 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 will make the whole effect less intensive.
    • Moving the top-right point towards the left side of the graph will make 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 will make 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 will work in a similar manner to the "Input scaling" inside the channel color mapping window, but will adjust 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). 

 

How to get the fastest rendering and the best quality?

Here are some guidelines for setting up the Corona Volume Grid object for the best render time / quality ratio:

  • If you are rendering only the Volume Grid object against a solid background (without any surrounding environment such as interior or exterior), go to Render Setup > Performance and lower the GI vs. AA from the default 16 to a lower value (such as 4, but not lower than 2). This will make rendering of the Volume Grid object faster, but may introduce noise in other parts of the image, such as glossy reflections or refractions.

  • Since some parts of the Volume Grid may rely mostly on direct lighting (this is visible when absorption and scattering are used), it may make sense to increase the Light Samples Multiplier value under Render Setup > Performance. This will improve the quality of the light penetrating the light-scattering part of the object (such as smoke, steam).

  • In the Grid Object's settings, go to the Rendering rollout and set Step size to the highest value possible. Too low values will render extremely slowly. Too high values will reveal ray marching artifacts ("slices" or "cubes" visible in the object), and will make the object appear unrealistically transparent.

  • Objects with lower emission scale will always render faster, as less light will be generated, which will in turn generate less noise.

  • Objects with lower scattering scale (darker color) will always render faster. Respectively, bright scattering (e.g. color set to pure white) will render slower.

  • Always use the Single bounce only option under Shading > Scattering inside the Volume Grid object. Disable this option only when it's absolutely necessary. Enabling it will usually bring just a little quality improvement, and will make rendering a lot slower.  

 

Aren't Corona Volume Grid controls similar to those found in the Corona Volume Mtl?

Yes, the controls available in the Corona Volume Grid object are very similar to those found in the Corona Volume material, and they produce very similar results. If you are familiar with the Corona Volume material and SSS effects in Corona, then the volume grids shouldn't be a challenge for you!

 

See also: 

Was this article helpful?
0 out of 0 found this helpful