Volume Scalar Attribute

 

Table Of Contents

Overview

The Volume Scalar Attribute is a shading node that allows for programmable volume shading when used with a Standard Volume shader. For example, a VDB grid can be loaded and it can be displaced with a noise shader. This can be used for many creative effects and adding detail to low resolution volumes.

This node can only be used with a Standard Volume shader.

 

Example Graph

In the example below, a Volume Scalar Attribute node is used to load a density channel and directly drive the density input on a Standard Volume shader. This density channel is displaced by three Maxon noises, each uses the same noise type but with a different seed — this ensures that the volume is adequately displaced in 3D space. The three noises are fed into a vector maker which is then fed into a Vector Change Range. The Vector Change Range has the Output Min and Max on all three axes set to -1 to +1, this centers the displacement on the volumes axis. After this, a vector multiply node is used to control the intensity of displacement on each axis.

 

 

 

Parameters

Sample

The Sample Channel loads a scalar VDB grid to drive the Volume Scalar Attribute. A VDB grid is loaded by typing its name into the channel field, for example, typing "density" directly into the field to load a density channel.

This field is case sensitive.

In the examples below different channels are loaded, the results are similar but they are not the same, note the difference in volume density for each. For example, when the temperature channel is used the edges are much softer because each channel has different values.

Sample Channel: "density" "temperature" "color"

 

Controls the base value used in all voxels within the volume bounding box, including ones that appear empty. This can be used to set a constant value throughout the VDB. In most situations, this should be left at the default value of 0 so empty voxels stay empty.

Default Value: 0 0.005 0.05 0.5

 

Controls how the voxels are displaced in scene units. The Position Offset is a vector input, the X, Y, and Z fields control how far a voxel is pushed in each direction. Displacing a volume can make it appear less dense.

If you want the same displacement on multiple volume components, like density and emission, use the same Position Offset on all components. On the other hand, different Position Offsets can be used for increased variety and control.

When using a texture for Position Offset, keep in mind the output values depending on what type of shading node is used. For example, when using a noise, by default it outputs a greyscale color from 0 to 1. Not only is this generally a small value, resulting in weak displacement, but since it starts at 0 it also means the volume will only be displaced in one direction along an axis. In order for displacement to appear centered on the volume's original position the 0 to 1 range should be remapped from -1 to +1 in all axes using a vector change range to allow displacement in all directions.

Position Offset X: 100
Position Offset Y: 0
Position Offset Z: 0
0
100
0
0
0
100
100
100
100

 

Remap Range

Controls the input range of the VDB channel.

This does not affect displacement intensity.

Old Min: 0
Old Max: 1 - 10

 

Controls the output range of the VDB channel. This controls the output into a Standard Volume shader, be certain to use appropriate values for the attribute that is being driven. For example, if using a Volume Scalar to drive temperature, the New Max should be set to something like 6500 to represent the maximum temperature of the volume.

This does not affect displacement intensity.

New Min: 0
New Max: 1 - 10