|On this page|
Samples a specific volume primitive. Returns 0 if
input_index is out of range, or the given primitive is not a volume
This node is only available in the geometry context.
volumesample() functions on points outside of a volume box will extend the sign distance field if the volume boundary is SDF. The distance to the bounding box is added to the streaked bounding box value.
The following diagram shows how the SDF extension works.
Constant values mean there is a value that all outside samples are set to (usually 0). So even if the border voxel is 1, as soon as you peak outside it is 0.
Streak means the boundary value is held into the surrounding area. So an out-of-bound sample is clamped to the volume and the value samples. This means a value of 1 at the boundary will streak into the surrounding space.
Repeat means space is tiled with the volume.
The following examples include this node.
This example creates a torus of paint which is dropped on the Grog character. The Grog character is then colored according to the paint that hits him. This also shows how to have additional color information tied to a fluid simulation.