Volume Fog Effects

 

There are many ways to create fog in OctaneRender®, such as using the Environment medium found in the Texture and the Daylight environment nodes. You can also use 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.

 

Standard Fog Without Using A VDB File

Creating fog without a VDB file requires a Daylight Environment or a Texture Environment node connected to the Environment pin on the render target. You can add and experiment on the different kinds of medium nodes available, but with the scattering quality that characterizes fog in the real world, it is most practical to use the ScatteringDefines how fast light gets scattered when traveling through the medium. medium. Adjusting the Density in the Scattering node will help to achieve a desired effect.

Volume_Fog_Effects_Fig01_SE_v2022.jpg

Figure 1: A Texture environment connected to a Visible Environment pin to hide the Daylight environment

 

Using A VDB File

There is no standard setting for using a VDB file because the settings depends a lot on the volume geometry's size, the most important attributes to tweak are the Density and the Volume Step Length. Check the maximum values for Absorption, Scattering, and Emission that is in the VDB itself. For this example, those values are 10, 10, and 10, respectively.

3

Figure 2: AbsorptionDefines how fast light is absorbed while passing through a medium., Scattering, and Emission settings

 

The fog will be so dense at the value of 10, while the Step Length mean distances covered within the volume (smaller steps within the volume grid mean more details are covered). So step length also depends on the actual size of the volume geometry. The default is 4m, you have to decrease the steps if your volume is smaller than 4m. Considering the size (e.g., abs/scat/emis: 10,10,10) is important especially if you want to use some absorption and scattering ramps because the ramps will have a Max Value attribute and this should not be greater than the size of your volume.

4

Figure 3: The Absorption and Scattering Volume Gradient settings

 

In the example above, the max value = 5. So if max size is 10 (as indicated in abs/scat/emis: 10,10,10), this means it’s picking halfway through the ramp at some point in the violet shade for both scattering and absorption, but remember that scattering and absorption works in the complementary way, so just for the purpose of this example, halfway in the fog would appear greenish.

complementary

fog_test1

Figure 4: The scene results from the settings in Figure 3