Volume mediums add color and other qualities to a fog volume or VDB file. VDBs are a generic volume format that create effects such as smoke, fog, vapor, and similar gaseous objects. VDBs are generated and exported from other 3D software programs or generated within Cinema 4D by OctaneRender®, with several presets and noises. VDBs can be a single frame, or an animated file sequence. To add a Volume object to the scene, go to Live Viewer > Objects > (Add Octane Fog Volume or Add Octane VDB Volume).


VOLUME MEDIUM CHARACTERISTICS

Regardless of the type of volume or VDB object chosen, there will be a Medium tab available, as shown in the illustration below.



volume medium




The Volume Medium tab is located in the Octane Volume and Octane VDB Volume objects. This tab contains the following attributes:


Density
The voxel density of the volume object. A larger number is more opaque and a smaller number is less dense. This Density and Volume Step Length can have a significant impact on render times, both positive and negative, depending upon their mutual settings. It is always best to consider these settings as a unit. Good practice would be to set the density lower and the step length higher to start, and then begin to dial in the look.



Volume Step Length
The Volume Step Length determines the precision of the ray marching algorithm and needs to be adjusted depending on the surface. The default value for the step length is 4. Should the volume be smaller than this, you will likely need to decrease the step length. Increasing this value will cause the ray marching algorithm to take longer steps, which will reduce the detail in the volume, but the volume will render faster. Should the step length far exceed the volume’s dimensions, then the ray marching algorithm will take a single step through the whole volume. Most accurate results are obtained when the step length is as small as possible.


Displacement
The (volume) displacement option allows for either an Octane or OSL texture to control a volume's sample position displacement. This can impart an additional level of detail within the volume shading, which can reduce the need for higher density volumes. This effect is apparent when using the volume generators and Cinema 4D noises, as discussed here.


Absorption
Specifies the absorption color texture.


Absorption Ramp
The Absorption color ramp that defines the color's range. The Absorption ramp takes the grid value as input. In the color gradient, the colors near 0 on the left side of the ramp are mapped to the lower values of the volume, which are areas of lower density. Colors on the right side of the gradient are mapped to higher grid values, where the volume density is greater. Emission and Scattering ramps operate in a similar way. When using Ramps to shade an animated VDB sequence, pay attention to the Ramp's Max, which normalizes the Volume grid values by keeping them between 0 and 1 so the Ramp colors can map to the Volume grid. The grids' maximum values are sometimes quite different throughout VDB sequences from one frame to the next. If you set a Max value too high or too low, you will see just a subset of the colors in the specified gradient.


Invert Absorption
Inverts the Absorption color so that the Absorption channel becomes a Transparency channel. This helps visualize the effect of the specified color since a neutral background shining through the medium appears close to that color.


Scattering
The scattering cross section. This channel defines how much light is absorbed over the color range.


Scattering Ramp
Acts similar to the Absorption ramp, but instead it maps colors to the light as it scatters within the volume.


Scattering Phase
Affects a volume as it would affect a Medium node and modifying the Volume Scale value scales the density values of the volume linearly.



Emission
The emission slot allows for either a Blackbody Emission node or a Texture Emission node and a volume gradient (emission ramp in Octane Standalone) to control the emission color. In order to get realistic results from the Blackbody Emission for volumes, disable Normalize in the Emission node. Lower temperatures give off less light than higher temperatures, but when normalized, the radiance emitted by all temperatures is equal.


When using the Texture Emission node, the input temperature grid is interpreted as emission power, not emission temperature. This is more linear in that the higher the temperature value, the more light it gives off at that point. 


Emission Ramp
The Emission color ramp remaps the emission volume data. Access this ramp by adding a Volume Gradient node to this slot. When using a BlackBody Emission in the Emission node slot, the Emission Ramp may need to be a very large number, far greater than the default value of 10. The typical grid to use for emission is Temperature, which stores values as a range degrees Kelvin, typically from 1,000 to 10,000. 


The ramp colors in the Volume Gradient node are used to color the emission output. Adjust the color swatches in the ramp to determine where the colors will appear within the volume, as defined by the Temperature grid. To control how much of the volume will appear to be flame, adjust the position of the color swatches on the ramp. Don't forget, in the case of smoke, to allow for the color of the smoke in the color swatches as well. 


Getting the Look

In the Volumetric Effects topic, we cover the creation of fire using Turbulence FD and the Volume Medium. In this topic, we briefly review the settings used to create a petroleum explosion with a VBD generated by Embergen, using the "New Fire" preset created by Nick Seavert of JangaFX. Notice how the absorption, scattering and emission are all nicely balanced and are working together to create the gasoline fire appearance. 



Absorption & Scattering

The following settings were used for the image. The Volume Step Length is set to a very low value to capture the details of the VDB (and, thus, will render more slowly). The Density was balanced with the Volume Step Length until the desired look was achieved (in this case, the approximate the result in Embergen). Absorption and Scattering were adjusted as shown in the illustration that follows. No absorption ramps or scattering ramps were used in this case.



absorption & scattering




Volume Gradient

The illustration that follows shows the setup for the Volume Gradient (in Octane Standalone and some other versions of the Octane plugin, this is known as the Volume Ramp.) The color palette of the ramp is what gives this image the appearance of burning petroleum. Simulating other chemicals or materials is merely a matter of choosing the proper color palette and setting up the volume gradient accordingly.



volume gradient




The Volume Gradient shows how the color swatches were arranged to get the desired distribution of color throughout the volume, again, to approximate the look as seen in Embergen. 


NOTE

Set the Max Value to 10,000 to take full advantage of the spectrum contained within the VDB. This value may be even higher for other VDB files.


VDB Considerations

VDB files rely on the interrelationships of every attribute: change one, and the results will appear quite different in many cases, requiring adjustment and balancing. It helps to establish the basic volume look before working on the volume material aspects: set the Volume Step Length first, and then the density, and then make the shader-level adjustments from there. 


The volume gradient, used in the Emission Ramp, is very important for the look of fire. Cinema 4D has some good presets to start with, and it may not be necessary to go beyond them. Try using the gradient preset Heat 3 and see how that looks.


The Emission slot requires a Blackbody Emission node, and the default values may not produce the best result. This is due to several factors, such as the simulation product that created the VDB file, the scale in which the simulation was run, and so on. Essentially, numerical values required to get the results desired may end up being very large or very small. A little trial and error, combined with experience, will be required (at first). Don't be afraid to really push the values to get to the goal.