Houdini 12 Nodes VEX nodes

Samples the value of a volume primitive stored in a disk file.

Samples a specific volume primitive. Returns 0 if primnum is out of range, the filename is invalid, or the given primitive is not a volume primitive.

Examples

Load | Launch

.../examples/nodes/vop/volumesamplefile/ParticleVolumeCollision.otl

This example demonstrates how to set attributes on a particle based on the value of a volume at the particle’s position.

To accomplish this, you can use a VOP POP to edit the particles, using the Volume Sample from File VOP to sample the volume.

In the example, particles are colored differently based on whether they are “in” or “out” of the volume, where “in” is defined in the example as “the value in the volume is > 0 at the position of the particle”, but could easily be changed.

Examples that use this node

Example forExample name
Smoke ObjectLoad | Launch

.../examples/nodes/dop/smokeobject/2dfluid.otl

Load | Launch

.../examples/nodes/pop/advectbyvolume/popexample_advectbyvolume.otl

On this page

Related topics