Volumetrics in Octane
Overview and Volume Object Deep Dive
About this Guide
Part 1 of this guide gives an overview of what volumetrics are. Part 2 covers the ways Octane implements volumetrics. Part 3 gives a workflow for how to load in and texture external .vdb files, and Part 4 goes over generating simple volumes in Octane itself.
This guide touches on, but does not go in-depth into volume lighting (Spectron), environmental lighting and SDF data.
Working with volume data is one of the more processor-intensive tasks for any 3D engine, so having a newer GPU with as much VRAM as you can get will definitely help with this. Don’t run anything else in the background while you’re working with large VDB files.
There are also times where you’re going to have to force the Live Viewer to update to see the results of certain actions (usually when it comes to grid mapping or other vdb-related things rather than texturing). It’s recommended that you pause the Live Viewer, then hit the R button to clear all the data out, and then hit the Octane button to reload everything.
This guide is also available in 📥 PDF format here.
Part 1: Volumetrics Explained
Usually when geometry is created in a 3D app, it’s made up of a two-dimensional sheet of polygons wrapped in 3D space to form a thin shell. Punch out a polygon from this mesh, and there’s nothing inside. This method of creating geometry is fast, efficient, and easy on the system resources. It’s great for opaque materials like metal or stone.
What happens if the object is supposed to be transmissive, though, like glass or wax?
For that to be believable, the light rays need to bend, split, scatter, absorb, and otherwise stop going in a straight line to simulate what happens when real light travels through a real-world version of that kind of material.
Since typical geometry is made up of a hollow shell of polygons, and there’s no data defining what’s inside it, a render engine needs to take a look at the shape of the object’s shell and calculate how the light might travel through it.
In an Octane material, the Transmission channel needs to have either a color or float value for Octane to process light traveling through the object with that material applied. The Transmission type also should be set to Specular to see any of the effects we’re going to cover next.
Simple Transmissive Effects
Both of the following simple effects are easy to calculate without Octane needing to know what’s inside the shell of the object.
Refraction: This refers to how light bends as it travels through a transmissive object, and distorts things inside or behind it. Octane takes a look at the normals of the surface geometry and calculates how light will come out the other end using the Dielectric IOR (Index of Refraction) setting. The default is 1.3 which is the IOR of water. 1.0 is air, ~1.5 is glass, ~2.4 is diamond. The higher the value, the more distortion there is.
Dispersion: This real-world phenomenon splits light into its component colors and redirects the different wavelengths, giving the material kind of a rainbow look to specific parts of it. All real-world transmissive materials do this to some extent (usually in a very subtle way), and knowing the proper dispersion value can add a lot to the realism of a material.
For more complex effects, more information about the makeup of the inside of the geometry is needed. Octane uses mediums to do this. A medium creates a volumetric area inside the boundaries of an object that contain properties that will absorb and/or scatter the light in a specific way as it travels through the object.
Materials with a medium node (Absorption, Scattering, Random Walk) attached to it can be applied to standard thin-sheet geometry, and will create an area inside the geometry that allows light to bounce around or absorb.
Scattering bounces light around within the object which creates a hazy, semi-translucent effect (think jade, skin, milk, and wax). The more dense the medium, the more light scatters and the cloudier it gets until it looks solid. Thinner objects (or parts of objects) look more transparent because the light doesn’t have a chance to bounce around much before exiting the other side. Thicker objects look more solid because the rays are more likely to get caught up and exit at different angles.
Absorption absorbs specific light wavelengths (colors) as it travels through the medium. Shorter wavelengths (red/orange/yellow) absorb faster than longer ones (green/blue/purple).
Absorption can be driven by a gray value or a color. In the example above, the absorption color is #BC3F19 (orange). The light it lets through unobstructed is the inverse of that (bluish-greenish like water). Invert absorption is turned off here, otherwise it would only let orange light through and it would look like juice or something instead of water. The rods lose color as those wavelengths get absorbed and go toward blue/green as they get deeper into the water.
Absorption is physically accurate, so the physical size of the object makes a big difference in how the effect looks (think a swimming pool compared to a glass of water).
Mediums can be broken up a bit by applying noise to certain channels (the radius channel of the Random Walk medium, for example), but if the goal is to get realistic looking clouds, fire, fog, smoke and the like, there needs to be a lot more fine-tuned control over both the interior and boundaries of the object.
The best way to really control and art direct areas that change throughout the inside (or volume) of the object is to actually build a block of “solid” geometry. This type of object is called a voxel grid.
A 2D bitmap image file (PNG, TIFF, EXR, etc) is essentially a grid of a set size (1920x1080, 1500x1500, etc) made up of pixels. Each pixel contains a color value and may also have extra data like an alpha channel. The more dense the grid (the more pixels in the image), the more detailed the image is, and the more memory and processing power the image takes to store and manipulate.
A voxel grid is a 3D version of this, measured in the scene units. Voxels are 3D pixels. Like their 2D counterparts, they contain color data, but they can also have special parameters like density, fuel, velocity and temperature which can be mapped to controls in the medium to get realistic looking fire, smoke, fog, etc.
Since each voxel is its own self-contained unit, each one can influence light in a different way all the way through the volume of the object. In a real puff of smoke, different areas throughout the interior of the puff have different densities depending on the forces affecting them. When a simulation program creates that puff of smoke, it simulates all the forces affecting the smoke in all three dimensions, cuts it up into a voxel grid, and determines the properties of each voxel. Engines like Octane then read that grid in and map it to a property in the medium that basically textures it.
A vdb file can have several of these grids, similar to layers in an EXR file. A fire simulation might have an emission grid that controls the flame portion, a density grid that contains data about the density of the smoke, and an absorption grid that contains data about the absorption. Each of these grids can be mapped to a different attribute in the volume medium (we’ll cover this in the Importing VDB files section).
The more voxels there are in a grid, the more detail is produced, and the harder it is on system resources. Voxels work in 3 dimensions, so the size and processing requirements rise at an exponential rate. Large vdb files can be in the gigabytes, and what seems like small changes can have a huge impact on the speed and iteration time. Voxel grids are typically found in resolutions like 128x64x128 (about a million voxels), or 384x384x128 (about nineteen million voxels).
How are Voxel Grids Generated?
Octane itself can generate a basic voxel grid for something like a bank of fog, faraway clouds, or a volumetric spotlight. It doesn’t have any simulation tools and forces like advection or turbulence, so there are limits to what it can make.
The real power comes from its ability to load in sets of voxel grids (density grid, heat grid, etc) created by other simulation apps and plugins such as Turbulence FD, X-Particles, Houdini, and even Cinema 4D itself in more recent versions. One or more of these grids are stored as a vdb (volume database) file when they’re exported from other apps. A series of vdbs can be loaded in for animated simulations.
Embergen (included with an Octane subscription) can generate volumetric simulations in realtime and export them as .vdb files which can then be used in Octane.
You can download some examples here: https://jangafx.com/software/embergen/download/free-vdb-animations/
Part 2: How Octane Handles Volumes
Octane first needs to determine the area of the scene where there is volumetric data. This can be within a piece of geometry with a volumetric material applied to it, in a special voxel grid container that either generates voxels or loads in external data, in a special type of light, or in the whole environment (HDRI or Daylight) itself.
After that, a medium needs to be attached to an object or placed in a material to tell Octane how light reacts throughout that particular volume.
Octane has a few different medium types for different applications. The Scattering, Absorption, and Random Walk mediums are for materials and environments. There’s also a special Volume Medium that’s used with vdb files or a generated voxel grid.
The Octane Environment tag (HDRI/Texture Environment) and the Octane Daylight Tag (Daylight/Planetary rigs) both typically work with scattering mediums, though you can use an absorption or random walk medium instead.
There’s a handy button in the Medium tab of these objects to Add Fog. This attaches a Scattering Medium to the environment that creates a global fog or haze. It’s pretty basic and limited (you can’t control the height of the fog, for instance), but it’s great for adding some ambience to a scene.
The two settings with the largest impact on the look are the Medium Radius in the Medium tab of the DayLight or HDRI Environment tag, and the Scattering Density in the medium itself in the Shader tab. Get the lighting set first, then play with these two values to get the look you’re after.
There’s also a phase setting that alters the direction of how the rays bounce around in the scattering medium. The default is 0.8 - try 0.9 and 1.0 for different looks.
The Octane Volume Object
The Octane Volume Object is what Octane uses to either generate or load in voxel grids.
The Volume object is located in the Objects menu in the Live Viewer. As of this writing it comes in three flavors in this menu: Octane Fog Volume (also known as Generator), Octane Vdb Volume (also known as VDB Loader) and sdf.
All three of these are the same Octane Volume Object, just with different settings. The three types can be toggled between at any time in the Type dropdown in the Main tab.
Octane Fog Volume (Generator)
This mode creates a basic voxel grid mainly used for local blocks of fog and easy, not very art directable clouds. It can be broken up with noise and displacement, and feathered off so it doesn’t look like a cube, but doesn’t have any simulation tools like advection, heat, or fuel to create fire or realistic smoke simulations.
Octane VDB Volume
This mode is for importing and manipulating external vdb files, and then assigning the different voxel grids contained within them to the absorption, scattering, and emission channels of the Octane Volume Medium. It can either be used with a single file or an animated sequence.
Octane SDF Volume
SDF (Signed Distance Field) is a method for taking voxels and making solid surfaces out of it. This implementation in the 2021 release isn’t really worth going into, but the Vectron SDF implementation in the 2022 release looks pretty great, so stay tuned for a breakdown of it in a future guide.
The Octane Spotlight is a Spectron-based volumetric light that is hooked up to a Volume Medium to produce fog/smoke/haze within the light cone. In the interest of keeping this guide focused, we’re not going to cover this in detail this time.
The Importance of Lighting and Settings
Volumes use scattering and/or absorption to determine how light passes through them. Because of this, it’s EXTREMELY important that the light in the scene is set up properly, since it can have a huge impact on the overall look of the volume. It’s a really good idea to get a lighting setup going that’s at least close to correct for your scene before even bringing in a volume object. Obviously this can be tweaked more as needed, but if you’re working with a volume in something close to a daytime environment with a sun and sky, and then drop it into a night scene with dim artificial lights, you’ll likely have to go back and alter a lot of parameters in the volume and medium to make sure it still looks right.
There are some cases where the Direct Lighting (DL) kernel does pretty well with volumes, but more often than not, the Pathtracing (PT) kernel is a better choice.
Typically the number of max samples needs to be reasonably high (256/512 for lookdev, maybe as high as 8192 in some cases for finals depending on the lighting) in order to calculate all the rays bouncing around in the environment.
The Scatter Depth in the pathtracing kernel may also need to be boosted up a bunch to get better looking scattering effects. Start with 16 during lookdev, and drop it later to try to save some render time.
In the Camera Imager, there’s a special option for Volume Denoising - this can save a ton of time and allow for fewer Max samples, but if the samples are too low, there will still be bad artifacts.
There’s also a Max overlap volumes setting. The lower this value is, the faster volumes will render (to a point), but if there are overlapping volumes, they’ll look worse. Try to match this to the number of volumes you have in a scene.
GI Clamp will make a difference with how light interacts within a volume - this will likely have to be set higher than scenes with no volumes (or caustics). Start with 100 for lookdev. If things are rendering too slow or you’re getting fireflies or other grainy artifacts, try dropping this to 10 to see if it resolves it. Once you’re pretty far into the project, try raising it to 1000 or lowering it to 1 to see if it changes anything. If you can get away with 10 or 1 without it compromising the look, it’ll speed the render up.
When doing lookdev, work at a smaller size than you’ll need for the final - each sample pass will change the lighting slightly, so as you get toward the part of the process where you want to see what the final will look like, you’ll get there much faster if you’re working at half or quarter resolution. You can either do this in the render settings, or in the Live Viewer by using the first number box directly to the right of where it says “PT” or “DL” in the dropdown. try 0.25 or 0.5 (quarter or half resolution). The second box is like a magnifier - it won’t save render time, it’ll just zoom in or out of the image.
Part 3: Importing VDB files
VDB files created by apps and plugins like Embergen and TFD can be imported into the Volume Object when it’s set to VDB loader mode in the Main tab.
VDB files can get very large (sometimes gigabytes), so be sure you have enough disk space available.
In general, start with low values across the board, and ramp up slowly as needed to avoid crashes and slow iteration times.
This section is an overview of the VDB workflow, and is meant for a reference once you understand what all the settings do. If this is your first time through the guide, feel free to skip this and then come back to it later as needed.
- Create an Octane VDB object from the Objects menu in the Live viewer
- VDB tab> Load in the file, hit calculate if it’s an animated sequence of vdb files to set the frame information and digits field. If it’s a single, still VDB file, don’t worry about this.
- Get “close enough” lighting set up and optimize render settings for volume lookdev
- VDB tab> Get the physical size right (import units and then Coords tab to tweak scale & rotation if needed)
- Set the Voxel Display if needed (higher sub sampling means better viewport performance)
- Medium Tab>use a preset like fog (no emission) or fire (emission) to get the right nodes hooked up to the Volume Medium
- VDB tab> Map the grids appropriately - usually density for scattering/absorption, flames for emission
- Medium Settings> Set the Volume Step Length to increase either the detail or render speed (try 1, 0.5, or 0.1 on smaller sims, or 4, 8, or 16 on larger ones)
- VDB tab> Play with scale of each grid mapping channel until the density is roughly correct. Sometimes emission needs to be set pretty high like 50.
- Medium>Volume Medium>Emission (if the vdb is emissive)> Set power in texture emission and color in volume gradient
- Medium>Volume Medium>Scattering & Absorption - change colors and/or add ramps if needed.
- Tweaktweaktweaktweaktweak until it looks right.
The first thing that needs to be addressed are the files themselves. The topmost field (File) tells the object which vdb(s) it will be using.
If it’s just a single file, it can be loaded in as normal.
If it’s an animated series of VDB files, then always pick the first file in the sequence (usually frame 000), and then hit the “Calculate” button. This will look in the directory and determine how many frames are in the sequence, and how many digits are in the number sequence. If the # of digits doesn’t match your file structure, make sure to correct that or the file may not load at all.
After that, an Offset can be chosen to determine when in the timeline the vdb sequence starts. This is just the number of frames before the first vdb file appears in the sequence.
Loop will load a vdb from the sequence on every frame and loop around when it’s done. Offset in this case will offset the looped animation so it can start part-way through the vdb sequence on frame 0 of the timeline.
Lighting and Settings
Get the lighting for the scene roughly correct - pick an appropriate HDRI for your scene and/or put in some area lights. This doesn’t need to be perfect, but since the lighting has such a large effect on volumes, the more work you do up front, the easier it will be to tweak later. Set lookdev settings as described in the previous section.
The next step is to get the physical size right. The density of the volume, as well as the properties like Emission, Scattering and Absorption all rely heavily on proper scale, and all of these values will be very different depending on the size of the volume.
To make the volume roughly the correct size, the Import Unit dropdown can be set to a number of different units. Small simulations like candle smoke will probably be in decimeters or meters. Medium simulations like a campfire or smokestack will probably be in meters or maybe decameters. Clouds will likely be in Hectometers or Kilometers if they’re pretty large.
There’s no telling how the sim was exported if you didn’t do it yourself, so you may have to try a few before you get the right general size.
In recent versions, there are also Imperial units, including the furlong if your volume needs to be about the size of the part of a field that an ox can plow without a rest (happens more than you’d think).
Once the overall scale is determined, the size can be fine-tuned using the Scale coordinates (S.X, S.Y, S.Z) in the Coordinates tab.
Different apps export files using different XYZ coordinate systems as well - the vdb object may have to be rotated if that’s the case.
Voxel Display (Viewport)
There’s a section in the middle of the Vdb tab that allows you to display the voxels in the viewport. These settings have no effect on the render, they’re just for visualization.
This is pretty intense on the CPU - especially when the vdb file is high res - and it may slow your system down considerably even if you have very powerful hardware.
Setting Sub sampling to a higher value can speed things up quite a bit (see the example above - testing was done on a Corei9-11900H). Working at 6fps is pretty sluggish, and 0.5fps is infuriating.
VDB channel swaps between the different grids in the VDB file. You can see the names of each grid in the text field below the Import Units dropdown. Usually grid/channel 0 is density, which is often the most helpful one to see in the viewport.
Dialing in the look
Setting Up the Proper Inputs in the Medium
As we learned earlier, a medium is needed to be able to display voxel data. Octane uses a special type for volume objects called a Volume Medium, which contains inputs for emission, scattering, and absorption.
The VDB Volume object comes stock with one of these volume mediums, and it’s set up for smoke/fog by default by connecting light gray RGB Spectrum nodes to Absorption and Scattering. The Fog preset button at the top will get you back to these default settings.
The emission inputs are left empty by default. If the vdb has a flames grid, fire won’t render without adding an emission node. An easy way to get a texture emission node and Volume Ramp in to control the colors is to hit the Fire preset button.
Note that these presets will also wipe out all the other settings like grid mapping and volume step length, so only use the presets before you start messing with other settings.
Right now, stop what you’re doing, and hit the Stop and Reset Render Data (the R button in the Octane Live Viewer) to make sure the Live Viewer renders correctly.
When Octane loads in a vdb, it looks for the different data types that the vdb contains (usually density, but sometimes flames or temperature). Each of these data types are stored in their own grid.
If you look in the box under Import Units and scroll down a bit, you can see the different grids contained in the vdb, what they’re called, and their resolution.
Octane takes each of these grids and maps them to a property of the volume medium (Absorption, Scatter, Emission) - hence “grid mapping”. You can control which of these grids map to which property with the dropdown boxes.
A typical Fire/Smoke Sim will usually have the Absorption mapping and Scatter mapping set to density because those two traits are associated with the smoke part of the sim, and the Emission mapping set to flames because that’s what’s emitting light and has all the cool flamey looking curls and details.
Other types of sims will have other channels that need to be mapped appropriately. Some interesting effects can be had by setting the Emission mapping to Fuel or one of the other unique channels the vdb software created data for.
Getting the Level of Detail Right
Volume Step Length
This is a global setting for all of the grids in the VDB, and it affects all the other settings, so it’s a good idea to get it dialed in first. It’s also one of those settings that has the largest impact on the overall look.
Volume Step Length is located in the Volume Medium attributes. If you’re using C4D’s attributes manager, go into the Medium tab of the volume, and then drill down into the Volume Medium. If you’re using nodes, highlight the teal Volume Medium node.
Step Length controls how much detail is pulled out of each voxel. The lower the value, the more detail it produces, and the longer the render times are. It’s not insignificant either - this setting could mean the difference between seconds per frame and minutes per frame, so be careful with it.
This setting is measured in scene units, so it’s directly affected by how large the volume is. Volumes with import units of meters or centimeters will need lower values than ones measured in kilometers or decameters. A giant sim with a tiny step length will probably make your computer weep like a baby until it finally crashes.
Get this value as low as you can before you see a large performance hit, or no longer see a difference in the render, and then stop there.
This is also located in the Volume Medium settings. Once the Volume Step Length is set, you can change the overall density here of the whole simulation. Most of the time, it’s best to leave it at 100, and then individually adjust the grid mapping scales (next step) to fine tune how intense the different parts of the simulation are.
Grid Mapping Scale Settings
These three values are located in the vdb tab of the Volume Object (not in the Volume medium settings). They control the density scale of Absorption, Scatter, and Emission separately.
The emission mapping scale value is the one to start with (if the vdb has emission), since it will affect the lighting of the rest of the simulation. This amplifies the emissive portions of the volume (usually mapped to flames, sparks or other glowy bits) Don’t be afraid to crank this value up to 50 or even 100 to really start to see the effects.
The scatter mapping scale value multiplies the scattering effect which makes the smoke seem more opaque.
The absorption mapping scale multiplies the absorption effect, which makes the smoke eat more light as it enters the volume, so it appears darker.
Getting the Colors Right
Now that the density is about right, it’s time to tweak the colors. This is easier in the node editor, since all of the different places to change the color can be quickly altered without having to dive up and down levels.
Once again, we’ll start with emission, since this affects the lighting for the density and absorption. If you used the Fire preset, this created a texture emission with a power of 1 and a volume gradient ramp with an orange to yellow color.
The Texture Emission node controls the power of the light. Once the emission scale from the previous step is set, this can be used to tweak the emission power (helpful if you’re using bloom/glare in post).
An RGB spectrum node can be fed into the Texture input of the Texture Emission node if an overall color cast to the emission is desired, but typically colors are better dealt with in the Emission Ramp instead.
Noises or other textures can also be fed into the Texture input to break up the emission more.
The Emission Ramp input is how the emissive portion of a volume gets colored. Octane uses a special Volume Gradient node (different than the normal Octane Gradient node) that maps colors based on the emission intensity. This node, like any other gradient in Octane, has presets available if the little right arrow next to the word “Gradient” is twirled down. The Flame presets at the top can be a great starting point.
Real life flame colors are determined by how hot it’s burning and what the fuel is. Google is your friend here - look at the type of flames you’re after and pick colors accordingly.
Once the colors are set, the Max Value slider can be used to quickly crush or expand the gradient if needed so that you don’t need to go back and re-adjust the density or change the knots too much. In the example above, the default value of 35 was fine for the red/orange flames, but needed to be lowered to 7.5 for the rainbow gradient to get all the colors in.
Scattering and Absorption Inputs
As we learned earlier, scattering controls how much the light bounces around inside of the volume. Absorption controls how much the volume absorbs light as it enters it. Both of these values are highly dependent on the overall density of the volume, which is why it’s a good idea to set that up first.
Both the scattering and absorption inputs take an RGB Spectrum node, meaning they can be set to any color. This color will blend with the corresponding Ramp color, and give it an overall cast (or brighten/dim it).
The scattering color controls the color of the scattering, and to some extent the transparency of the edges. If you’re using regular gray smoke, you can tweak this value to make it a little brighter or darker.
If you want colored smoke, set this to white and control the color in the Scattering ramp (covered in the next section).
Absorption becomes a little difficult to understand because by default the invert absorption checkbox is checked. While this is handy when doing color absorption (inverted means whatever color you feed into the input is what you’ll see in the render, rather than the inverse of that color which is how physical-based absorption works in the real world), it makes the black-to-white scale confusing.
In the example above, invert absorption is turned off.
Absorption set to black (HSV=0,0,0) means the light passes through it without being absorbed into the medium. In the example above, this means light passes unobstructed through the medium, and it’s essentially invisible.
White (HSV=0,0,100) fully absorbs all the light, making the dense parts solid black in this case.
When the absorption is set to blue (180,100,50), it absorbs all the blue light, and the result is the inverse of that, which is a dark reddish orange.
Scattering and Absorption Ramps
Similar to the emission ramp, both of these inputs take a Volume Gradient node which maps colors to the intensity of the scattering or absorption map.
Ok, this part is really important, so we’re going to put it in red here. Scattering and Absorption Ramps affect THE ENTIRE voxel grid. The whole grid. All of it. Even the parts that don’t have voxel data in them. This means that when you drop a colored gradient into either of these, the entire voxel grid will light up with some random color and you’ll be presented with something that looks like a solid cube with a weird color. This has a pretty easy fix, but you have to know to do it.
For the scattering ramp, make sure the leftmost knot is black. This means that any area of the simulation that has a value of 0 will not have any color - light will just pass right through it, and things will go back to normal.
The Absorption Ramp is more complicated. The rules change depending on whether you’re using inverted absorption or not.
If the leftmost knot is anything other than black or white, the vdb will look solid. If the Absorption is inverted, the RGB Spectrum node fed into the Absorption input needs to be black, and then the leftmost knot in the Absorption Ramp needs to be white. If the Absorption is not inverted, the opposite is true - The RGB Spectrum in Absorption needs to be white, and the leftmost knot in the Absorption Ramp needs to be black.
From here, go back and alter the different settings to dial it in just right.
Part 4: Generating Volumes in Octane
Simple fog/clouds can be made using the Generator option in the Type dropdown of the Octane Volume object. It doesn’t support simulation tools like advection or an emission channel to give realistic explosions, but there are some interesting effects that can be achieved with this.
Again, this section is an overview of the Voxel Grid Generator workflow, and is meant for a reference once you understand what all the settings do. If this is your first time through the guide, feel free to skip this and then come back to it later as needed.
- Drop in an Octane Fog Volume from the Objects menu in the Live Viewer
- Set the Size
- Change the Display Type to Circle
- Set the Voxel Size: (SizeX/Voxel Size) * (SizeY/Voxel Size) * (SizeZ/Voxel Size) = total number of Voxels. Try not to go over a few million total (adds up quick, so increase in small increments)
- If the sim needs to be high resolution, consider using the Voxel Multiplier to keep the viewport manageable
- Change the Display Type to box or none if the viewport starts slowing down
- Add a C4D-native Noise (not Noise4D or Octane Noise or OSL Noise) in the Texture field to break up the volume if desired
- Go into the Medium tab, drill down into Volume Medium, Set the Volume Step Length to control the amount of detail
- Back to the Generate tab in the Volume Object, set the Edge Feather if needed
- Still in the Generate tab, change the Sampler Gamma to dial in the density of the noise (if used)
- Clip the volume to a sphere (or multiple spheres) if needed by making one or more spheres children of the Volume object
- Back in the Medium, add OSL Displacement if needed
- Change Absorption and Scattering Colors
- Add Absorption/Scattering Ramps as needed
- Tweak all the settings above until happy
Grid Size/Voxel Size
Size (in cm) determines the physical bounding box of the volume container. As with everything in 3D, real world scale is usually best for making sure light interacts properly with the object.
Voxel Size sets the size of each voxel within the container. If the container size is 10 cm x 10 cm x 10 cm, and the voxel size is 1 cm, there are 1,000 voxels in the scene.
If the container size is 100 cm x 100 cm x 100 cm and the voxel size is 10 cm, there are still 1,000 voxels in the scene. It’s the same amount of data and memory as the smaller grid, but all of the other settings like step length and density will have vastly different results depending on the size and voxel density, so get that right first.
The formula to calculate the voxels is:
(SizeX/Voxel Size) * (SizeY/Voxel Size) * (SizeZ/Voxel Size) = # of Voxels
In the example above, Size X, Size Y and Size Z are all 100cm, and the voxel size is 10cm, so (100/10) * (100/10) * (100/10) = 10*10*10 = 1000 voxels.
Usually you don’t want to go too much above a couple million voxels, but it’s worth seeing what your system can handle before it crashes.
Display Type: Change this to Circle to get an idea of how dense the voxel grid is when you first start. Once it gets really dense, you can change it to box to see an overall representation of the grid, but this may slow it way down. Once the volume is the right size, and in the right place, setting it to none will stop it from bogging down the viewport.
As volumes get more complex, they start taking more and more resources to display in the viewport. One workaround is to lower the density of the sim by increasing the voxel size, and then changing the voxel multiplier. This uses the GPU to multiply the number of voxels during render time, so that it stays relatively light and fast in the viewport, but is more detailed in the Live Viewer.
The multiplication happens in 3 dimensions, so be VERY careful about cranking this up since it can quickly eat up a ton of VRAM or processing cycles and eventually crash. Start with small values (1.25 maybe) and move up in small increments (0.1).
This is where a noise can be added to break up the volume. If the voxel density is relatively low in the viewport, the Circles display is really handy because it gives a visual of what the noise looks like (see the illustration above).
Important: The Volume Object ONLY works with the C4D-native C4D Noise (black node).
Do not use the green Noise4D node here.
Do not use the green Octane Noise node here.
Do not use the blue OSL Noise node here.
Volume Step Length
This was covered in the VDB import section, but basically the smaller the number here, the more detailed the sim is, and the slower it will render. If you’re just after some local fog, keep this reasonably high. If you have a noise in the texture field with a lot of detail, lower this to make it look better.
This rounds off the edges of the volume container so those weird sharp edges along the boundaries of the voxel grid go away.
This changes the gamma of the grayscale values of the source for the fog. It’s similar to changing the density, but it does it in a different way. In the example above using Cell Noise, it’s easy to see how it darkens/increases contrast as it goes down toward 0, or lightens/loses contrast as it goes up to and above 1.
In the volume, this translates to values closer to black being more transparent and values closer to white being more opaque. The more contrast, the more fine detail, and the darker it goes, the more transparent it is in places and the more broken up it looks.
Clipping to Spheres
If you nest one or more spheres in the Volume Object, it will clip the active voxels to just the ones within the volume of the spheres. If any of the spheres go beyond the bounding box of the Volume Object, they will be trimmed off. The green checkmarks on the spheres must be enabled for this to work.
Note: This only works with spheres
Displacement can be added to the Volume Object by going to the Medium tab, diving into the Volume Medium, and then rolling down the Displacement section and hitting the OSL displacement button. This will create an OSL Texture node with a displacement preset and feed it into the displacement channel.
Clicking the Osl Texture (or selecting that node if you’re in node view) will show a window with some code and parameters at the bottom - see the illustration above on the far right.
From there, some amount of displacement needs to be added to see anything at all. Try 10 at first and adjust as needed. Once that’s set, play with the freq, displacer, and dispFreq parameters, and try out different noises in the Texture node to get various effects.
Dial in the look
Similar to the VDB import, you can go into the Medium and change the Absorption/Scattering and add ramps to change the color based on density - refer to the VDB Import section above to learn more about each of these. Note that there’s no Emission channel with generated volumes - you’ll have to use an imported VDB for that.
There are buttons at the top for Cloud 1, Random Cloud and Random OSL cloud - all of them just load in different values that were covered in this section. It’s worth having a look at them to see what they do.
That’s that for this guide - hopefully volumes have been sufficiently demystified for you, and you now feel comfortable working with them.