This page may include unlocalized contents


Volume Color Attribute

 

Table Of Contents

Overview

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

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

 

Example Graph

In the example node graph below, a Volume Color Attribute is used to load a color channel and drive the Scatter Color directly. The Volume Color Attribute can be displaced by driving the Position Offset parameter with something like a Maxon noise.

 

 

Parameters

Sample

The Sample Channel loads a color VDB grid to drive the Volume Scalar Attribute. A VDB grid is loaded by typing its name into the channel field, for example, typing "color" directly into the field to load a volume's color channel. If a non-color grid is loaded, like a scalar grid used for density or temperature, it will appear in grayscale.

This field is case sensitive.

Sample Channel: "color"
Grid Type: color
"density"
scalar
"temperature"
scalar

 

Controls the base color used in all voxels, including the color of empty voxels. This can be used to set a constant color throughout the VDB. In most situations, this should be left at the default value of black so that the empty voxel stay empty.

In the examples below the density is displaced differently than the scatter color, in areas where the two grids do not overlap the color channel's default color becomes visible, black by default. In the last image on the right the color channel is displaced identically to the density channel, because the two are in sync there is no area where the default color becomes visible and therefore it has no effect.

Default Color: Black
Color Displacement: Disabled
Blue
Disabled
White
Disabled
Black
Displacement matches Density

 

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.

If you want the same displacement on multiple volume components, like color and density, 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. In the example below, note how displacing a volume can make it appear less dense.

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