How to use the Corona Volume Grid object? - C4D

00_C4D_VolumeGrid_Sample_A01.gif

 

 

What is the Corona Volume Grid object?

The Corona Volume Grid allows you to render objects that are truly volumetric and based on a 3D grid instead of meshes using the 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
  • Objects which are not possible or difficult to render when using classic polygonal meshes

In addition to the below content, see also: Corona Volume Grid at the Chaos Documentation Portal 

 

 

Where to find it?

The Corona Volume Grid can be created by going to the Corona menu > Corona Volume Grid:

 

vgrid.jpg

 

 

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) as well as Cinema 4D's Pyro fire and smoke simulation tool which was introduced in their 2023 release.

 

Using Pyro could not be easier. Once you have run your Pyro simulation you can then link it to the Corona Volume Grid object using the eyedropper found in the Objects tab. If the simulation has not been cached already you will receive a prompt asking how you would like to store the cache. There are two options for this. Cache scene and Cache:

 

Cache scene:

This will prompt you to store all Pyro output objects that are used in a scene to disk in a location chosen by the user. 

Note: Exported simulations can take up a lot of HDD storage space so it is worth keeping an eye on the capacity of your HDD. 

 

Cache:

This option allows you to cache a single Pyro output object from a scene.

 

Once either method has been completed, it is automatically linked to the Corona Volume object and rendering can begin.

smoke.png

frame0062.jpg

ink_render2_0170.png

fire logo.jpg

For more information about Pyro, please see MAXON's user guide here.

 

 

What are the available controls?

Most useful controls include:

 

Object

The Object options control how the Volume Grid object will be displayed at the viewport and show information from the simulation like the number of cells and density of the grid:

vobject.jpg

 

Object - Select files

Use this button to select the VDB file that will be used. In the case of an animated sequence, only select one of the files from the sequence, and the entire animation will be automatically loaded.,

 

Object - Reload from disk

Use this button to make the Corona Volume Grid object reload the file/sequence from your disk. 

 

Object - Animation - Enable animation

This option will enable/disable the reading of the VDB animated sequence.

 

Object - Animation - Mode

Use these options to set the animation mode for the VDB animated sequence. You can use any of the following available options:

  • Repeat - The VDB animation will playback like a loop.
  • Ping Pong - Using this option, the VDB animation will play forward, and once it reaches the end, it will continue playing the animation but as if it was going backward.
  • Freeze out of range - When selecting this option, once the VDB animation reaches the end, it will freeze using the last frame.
  • Hide out of Range - When selecting this option, once the VDB animation reaches the end, it will hide after the last frame.

 

Object - Animation - Frame offset

Use this option to offset the VDB animation starting time (you can use either positive or negative values).

 

Object - Animation - Speed multiplier

Using this option will speed up or slow down the VDB animation playback.

 

Object - Animation - Load nearest if missing

When using this option, if a file from the VDB animation sequence is missing, it will try loading the nearest available file to continue playing. E.g., If there is a VDB animation sequence consisting of 10 frames and the 4th frame is missing, this option will read the 5th frame as it was the 4th frame, and then it will read the 5th frame as usual.

 

Object -  Viewport display - 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! 

 

03_C4D_VolumeGrid_Object_ViewportType-BoundingBox.png
04_C4D_VolumeGrid_Object_ViewportType-PointCloud.png
Viewport display type = Bounding Box Viewport display type = Point Cloud

 

Object -  Viewport display - Quality

This option will control the density of the point cloud preview. 

 

Warning: The point cloud preview can be slow when a large file is loaded, and the quality percentage is increased (for most cases it is suggested to keep it under 25%).,

 

05_C4D_VolumeGrid_Object_ViewportDisplay_PointCloud-5percent.png
06_C4D_VolumeGrid_Object_ViewportDisplay_PointCloud-100percent.png
Viewport display quality = 5% Viewport display quality = 100%

 

 

Rendering

The Rendering options control how the volume grid object will be processed to display it accurately or not.

vrendering.jpg

 

Rendering - Interpolation

This option lets you decide about the speed to quality ratio. It is similar to filtering used in many applications when dealing with 2D textures. 

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

09_C4D_VolumeGrid_Rendering_Interpolation-None.jpg

08_C4D_VolumeGrid_Rendering_Interpolation-Linear.jpg

Rendering Interpolation = None Rendering Interpolation = Linear

 

Rendering -  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 a higher possibility of artifacts showing up. Lower values mean better quality but slower rendering. To get reasonable render times, the step size value should be set to as high as possible until ray marching artifacts are visible ("slices" visible inside the object).

10_C4D_VolumeGrid_Rendering_StepSize-0_1.jpg

11_C4D_VolumeGrid_Rendering_StepSize-10.jpg

Render Interpolation = Linear
Step Size = 0.1
Render Interpolation = Linear
Step Size = 10

 

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

12_C4D_VolumeGrid_Rendering_FlipFrame-Disabled.jpg

13_C4D_VolumeGrid_Rendering_FlipFrame-Enabled.jpg

Flip Frame = Disabled Flip Frame = Enabled

 

Rendering -  Motion blur & Frame interpolation

Decides how motion blur is computed.

 

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

 

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

 

 

Emission

Toggles the 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. 

vemissions.jpg

 

15_C4D_VolumeGrid_Emission-A.jpg

16_C4D_VolumeGrid_Emission-B.jpg

Emission Disabled
Absorption Enabled
Scattering Enabled
Emission Enabled
Absorption Enabled
Scattering Enabled

 

Emission - 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 the case of using the "constant" mode for the emission, the entire bounding box of the volume grid object will start glowing. 

The "Constant" channel is useful, for example, for scattering light when creating smoke - you can set constant scattering color to have the same type of scattering inside the whole medium. Then its thickness will be controlled only by the absorption properties.

17_C4D_VolumeGrid_Emission_Channel-Temperature.jpg

18_C4D_VolumeGrid_Emission_Channel-Constant.jpg

Emission channel set to "Temperature" Emission channel set to "Constant"

 

Emission -  Scale

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

19_C4D_VolumeGrid_Emission_Scale-1.jpg

20_C4D_VolumeGrid_Emission_Scale-0_1.jpg

Emission scale set to 1 Emission scale set to 0.1

 

Emission -  Tint

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

21_C4D_VolumeGrid_Emission_Tint-White.jpg

22_C4D_VolumeGrid_Emission_Tint-Blue.jpg

Emission tint color: White Emission tint color: Blue (H=228, S=100, V=100)

 

Emission -  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. The use of "Texture" or "UV(2D)" space mode is not supported.

23_C4D_VolumeGrid_Emission_Map-Noise_Object_UI.png
24_C4D_VolumeGrid_Emission_Map-Noise_Texture_UI.png

25_C4D_VolumeGrid_Emission_Map-Noise_Object.jpg

26_C4D_VolumeGrid_Emission_Map-Noise_Texture.jpg

Noise map set to work in Object Space Noise map set to work in Texture or UV(2D) Space
(not supported)

 

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 VDB file. It is then affected by scale and tint parameters. 
  • Channel mapping - uses custom settings from the "Channel color mapping" tool.
    Please scroll down to the "How to use channel color mapping" section below to learn more about it.
  • Blackbody - simulates color emission of a blackbody at a given Kelvin temperature (useful for fire simulations).

 

 

Absorption

Decides how far light can travel inside the object before it is fully consumed. For better results, enable the Scattering property.

vabsorption.jpg

 

Absorption - Channel

Selects the channel (grid) present in the OpenVDB file that will be used for absorption. Usually, it should be set to "smoke"  or "density" (it will depend on how this channel has been named when creating the simulation) 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. 

28_C4D_VolumeGrid_Absorption_Channel_A.jpg

29_C4D_VolumeGrid_Absorption_Channel_B.jpg

Channel used: "Constant" Channel used: usually "Smoke" or "Density"

 

Absorption -  Scale

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

30_C4D_VolumeGrid_Absorption_Scale_A.jpg

31_C4D_VolumeGrid_Absorption_Scale_B.jpg

Emission = Disabled
Absorption Scale = 0.5
Emission = Disabled
Absorption Scale =5

 

Absorption -  Tint

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

32_C4D_VolumeGrid_Absorption_Tint_A.jpg

33_C4D_VolumeGrid_Absorption_Tint_B.jpg

Emission = Disabled
Absorption tint = White (default)
Scattering = Enabled
Emission = Disabled
Absorption tint = Blue (H=200, S=100, V=100)
Scattering = Enabled

 

Absorption -  Map (Shader)

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. The use of "Texture" or "UV(2D)" space mode is not supported.

34_C4D_VolumeGrid_Absorption_Map_Noise-Object_UI.png
35_C4D_VolumeGrid_Absorption_Map_Noise-Texture_UI.png

36_C4D_VolumeGrid_Absorption_Map_Noise-Object.jpg

37_C4D_VolumeGrid_Absorption_Map_Noise-Texture.jpg

Absorption Shader = Noise working in Object space. Absorption Shader = Noise working in Texture or UV(2D) space. (Not supported)

 

Absorption - Enable Channel color mapping 

Uses custom settings from the "Channel color mapping" tool. Please scroll down to the "How to use channel color mapping" section below to learn more about it.

 

 

Scattering

Decides how light is scattered inside the volume. 

38_C4D_VolumeGrid_Scattering_UI.png

 

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

39_C4D_VolumeGrid_Scattering_Disabled.jpg

40_C4D_VolumeGrid_Scattering_Enabled.jpg

Emission = Disabled
Absorption = Enabled
Scattering = Disabled
Scattering Channel = Constant
Emission = Disabled
Absorption = Enabled
Scattering = Enabled
Scattering Channel = Constant 

 

Scattering -  Scale

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

41_C4D_VolumeGrid_Scattering_Scale_0-1.jpg

42_C4D_VolumeGrid_Scattering_Scale_1.jpg

Emission = Disabled
Absorption = Enabled
Scattering Scale = 0.1
Emission = Disabled
Absorption = Enabled
Scattering Scale = 1

 

Scattering -  Tint

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

43_C4D_VolumeGrid_Scattering_Tint_White.jpg

44_C4D_VolumeGrid_Scattering_Tint_Blue.jpg

Emission = Disabled
Absorption = Enabled
Scattering Tint = White (default)
Emission = Disabled
Absorption = Enabled
Scattering Tint = Blue (H=200, S=70, V=100)

 

Scattering - Map (Shader)

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.

45_C4D_VolumeGrid_Scattering_Map_Noise-Object_UI.png
46_C4D_VolumeGrid_Scattering_Map_Noise-Texture_UI.png

47_C4D_VolumeGrid_Scattering_Map_Noise-Object.jpg

48_C4D_VolumeGrid_Scattering_Map_Noise-Texture.jpg

Scattering Shader = Noise working in Object space. Scattering Shader = Noise working in Texture or UV(2D) space. (Not supported)

 

Scattering -  Directionality

This is used to adjust the directionality of the scattering. A value of 0 (zero) produces isotropic ("diffuse") scattering. Positive values produce forward scattering. Meanwhile, negative values will produce backward scattering. The default value of 0 is suitable for most media, except for clouds, where higher positive numbers will produce the effect of "silver lining"

49_C4D_VolumeGrid_Scattering_Directionality_Negative0-7.jpg

50_C4D_VolumeGrid_Scattering_Directionality_Positive0-7.jpg

Emission = Disabled
Absorption = Enabled
Scattering Scale = 1
Scattering Directionality = -0.7
Emission = Disabled
Absorption = Enabled
Scattering Scale = 1
Scattering Directionality = 0.7

 

Scattering -  Single bounce only

This option should be enabled unless disabling it is absolutely necessary. When enabled, only a 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.

51_C4D_VolumeGrid_Scattering_SingleBounce-On.jpg

52_C4D_VolumeGrid_Scattering_SingleBounce-Off.jpg

Single bounce only = Enabled. Single bounce only = Disabled.

 

Scattering - Enable Channel color mapping 

Uses custom settings from the "Channel color mapping" tool. Please scroll down to the "How to use channel color mapping" section below to learn more about it.

 

 

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.
53_C4D_VolumeGrid_Example_1.jpg

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. The emission scale is set to 5 to boost the 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.
54_C4D_VolumeGrid_Example_2.jpg

Example 3

We want to achieve steam:

  • We do not need emission for this example, so it is left disabled. 
  • Absorption is enabled; however, its scale is lowered to 0.005 to make the steam transparent.
  • The scattering scale is set to 1 to make the steam appear brighter.
55_C4D_VolumeGrid_Example_3.jpg

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).
56_C4D_VolumeGrid_Example_4.jpg
 

 

 

How to use the Channel Color Mapping tool?

The 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 fire. 

The channel mapping tool allows for mapping floating point values stored in the channel to colors. The mapping is computed as follows:

57_0_C4D_VolumeGrid_ColorChannelMapping_UI.png

  1. First, the floating values are scaled by the "Input scale" to fit into [0,1]. You 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 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.

  3. The curve scales the color computed from the gradient. Note that the curve input is not the color from the gradient but the "input-scaled" floating value from the channel (e.g., the result of operation stated in point A). ,

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

 

Suggested workflow (based on emission):

  1. Place a Corona Volume Grid object and load your VDB file in the Object tab.
  2. Set the emission enabled and set the channel to temperature.
  3. Set the emission mode to "Channel mapping".
  4. Open the "Channel color mapping" rollout. 
  5. Press the "Auto-scale" button to adjust the scaling value automatically.
  6. 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 rightmost)

      58_C4D_VolumeGrid_ColorMapping_Guide_00.png

    • You can add a new color by clicking right under the gradient bar, and you can remove any color by drag & drop the desired color out of the gradient area.

  7. 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.
    59_C4D_VolumeGrid_ColorMapping_Guide_01.png
    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.
    60_C4D_VolumeGrid_ColorMapping_Guide_02.png
    Moving the top-right point towards the bottom of the graph will make the whole effect less intensive.
    61_C4D_VolumeGrid_ColorMapping_Guide_03.png
    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).
    62_C4D_VolumeGrid_ColorMapping_Guide_04.png
    You can also add points in other places of the curve to control the in-between values, and you can switch between "Spline", "Cubic" and "Linear" point types.
    • To add a new point to the curve, simply hold down the Control key on your keyboard while you left-click on any part of the curve.
    • To delete any added point, just select the point you want to remove and hit the delete key on your keyboard.
    • To change any point type from linear, click on the arrow on the upper left corner of the graph, and go to the "Interpolation" list to choose the point type that you're looking for.
    63_C4D_VolumeGrid_ColorMapping_Guide_05.png
    (click on the image to enlarge)
     
    64_C4D_VolumeGrid_ColorMapping_Guide_05_B.png
    At this point, adjusting the "Input scaling" value will make the overall effect more or less intensive.
    65_C4D_VolumeGrid_ColorMapping_Guide_06.png
    Click on the images to enlarge.

  8. If you adjust the Emission scale parameter, it will work similarly to the "Input scaling" inside the channel color mapping tool but will adjust the intensity of the effect after the overall color and visibility have 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 the Render Settings > Corona > 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 render 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 located at the Render Settings > Corona > Performance. This will improve the quality of the light penetrating the light-scattering part of the object (such as smoke, steam, etc.).

  • In the Corona Volume Grid Object's settings, go to the Rendering tab and set the 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 a lower emission scale will always render faster, as less light will be generated, which will generate less noise.

  • Objects with a 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 the Scattering tab at the Volume Grid object's properties. 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