Volume Medium


Volume MediumA shading system designed to render volumes such as smoke and fog. is used to add color and other qualities to a VDBDreamworks’ open-source C++ library housing the data structures and tools implementation for storing and manipulating volume data, like smoke and other amorphous materials. The purpose of OpenVDB is mostly to have an efficient way to store volumetric data in memory and on disk. It has evolved into a more general toolkit that also lets you accomplish other things, such as fracturing volumes, converting meshes to volumes and vice versa. However, it does not include a computational fluid dynamics solver, and therefore it cannot procedurally generate smoke or fire. OpenVDB is fully integrated as a library in OctaneRender. For more information about OpenVDB, please see http://www.openvdb.org/. file. VDBs are a generic volume format that is used to create effects such as smoke, fog, vapor, and similar gaseous objects. VDBs are usually generated and exported from other 3D software packages such as Houdini. There is also a number of VDB files available for download on line at www.openvdb.org/download. VDBs can be a single frame or an animated file sequence.


Figure 1: The parameters for the Volume Medium.


To use a VDB in Octane right-click in the Node Graph Editor and use the pop-up menu to add a Volume node (Figure 2). Use the file browser to locate the VDB file on your local drive.


Figure 2: To bring a VDB file into an Octane scene add a Volume node.


Then attach a Volume Medium to the VDB node and the VDB node to a Render Target (Figure 3). When the render target is selected it will be visible in the viewport, you may need to zoom out to see it if the volume is very large.


Figure 3: A Volume Medium is connected to a VDB file which is then connected to a Render Target



Figure 4: A VDB file rendered in the Octane Viewport


The Volume Medium Parameters

Density - This parameter multiplies against ScatteringDefines how fast light gets scattered when traveling through the medium..

Volume Step Length - Depending on the surface, you may need to adjust this parameter. The default value is 4, but if the volume is smaller than this, you need to decrease the value. Decreasing this value decreases render speed, and increasing the value causes the ray marching algorithm to take longer steps. If Volume Step Length exceeds the volume's dimensions, then the ray marching algorithm takes a single step through the whole volume. To get the most accurate results, keep Volume Step Length as small as possible.

Volume Shadow Ray Step Length - Step length that is used by the shadow ray for marching through volumes.

Use Volume Step Length for Volume Shadow Ray Step Length - Uses Volume Step Length as the Volume Shadow Ray Step Length as well.

Sample Position DisplacementThe process of utilizing a 2D texture map to generate 3D surface relief. As opposed to bump and normal mapping, Displacement mapping does not only provide the illusion of depth but it effectively displaces the actual geometric position of points over the textured surface. - Allows a texture to control a volume's sample positions displacement.

AbsorptionDefines how fast light is absorbed while passing through a medium. - Specifies the absorption color texture.

Absorption Ramp - The Absorption color ramp that defines the color's range when using a Volume Gradient node. 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 Max value of the ramp. This value normalizes the values of the volume grid keeping them between 0 and 1 so that the colors on the ramp can be mapped to the volume grid appropriately. The maximum value of grids sometimes differ greatly throughout VDB sequences from one frame to the next. If you set a Max value too high or too low, you will only see a subset of the colors in the gradient that you specify.

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 when connected to a Volume Gradient node, but instead it maps colors to the light as it scatters within the volume.

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. This parameter can be controlled using the Schlick Phase Function node to determine forward or back scattering.


Figure 5: A comparison of Phase settings.


Emission - This sets the volume emission to accept volumetric emission modes. For emission, the Medium node can have either a Blackbody Emission node or a Texture Emission node.

When using the Blackbody Emission node, make sure that the emission grid data contains temperatures in Kelvin. VDBs often have unit-less temperatures with arbitrary ranges such as 0 - 1 or 0 - 45, as is the case with some sample VDBs from openvdb.org. Typical temperature values range between 0 - 6500, where lower values create longer wavelengths, and higher values create shorter wavelengths. 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. Once volume gradients are implemented, you can control the color more precisely.

Emission Ramp - The Emission color ramp.