Houdini 20.5 Nodes Geometry nodes

Volume from Attribute geometry node

Sets the voxels of a volume from point attributes.

On this page
Since 11.0

The Volume from Attribute SOP copies a point attribute into the voxels of volumes. This is the opposite operation of the Attrib From Volume SOP.

Parameters

Volume Group

The volume primitives in the first input to be written to.

Point Group

The points in the second input to read attribute values from.

Attribute

The name of the point attribute that will be copied to the destination volume. If this is disabled, the operation will proceed as if an attribute of value 1 is used. This is useful for creating mask from where the points are present.

If the attribute is not present, it is treated as a value of 1.

Disable If Attribute Missing

If this parameter is set and the specified attribute is not present, the operation is bypassed rather than treating it as a ghost value of 1.

Accumulated

If accumulation mode is set each particle will only affect the eight voxels whose centers that it is closest to. A trilinear interpolation will be done to scale the particle’s value for each of those voxels according to how close the particle is to the center of the voxel.

When used with the Add calculation method, this has the advantage of preserving the total value of the particle attributes.

Extrapolated

If a voxel cell is outside of the radius of any particles, it will use the value of the nearest particle. Extrapolation can be expensive when performed far away from dense particle sets.

You can also determine if extrapolation should be capped at a certain number of voxel cells or absolute distance from the particles. This allows you to fill holes in the particle data without having to extrapolate for the entire voxel volume, which can get very expensive.

The maximum of the cell extrapolation and the raw distance extrapolation is used as the extrapolation cap.

Max Extrap Cells

The number of cells to extrapolate. This value is multiplied by the maximum cell dimension and used as a distance cap for how far away from the particle system that extrapolation should occur.

Max Extrapolation Distance

The maximum distance extrapolate.

Threshold

The total weight contributed by particles to the cell are normalized if it is greater than the threshold. If the weight is less than the threshold, the particle attribute values will not be normalized and hence drop to zero.

Bandwidth

This value is only used if Extrapolation is turned off. The bandwidth is specified in cells, so the value is multiplied by the largest cell dimension.

All particles have their effective radii increased by the bandwidth value. This can ensure small radius particles are always sampled in a resolution independent manner.

Scale by Voxel Volume

Scales the particle’s value by the inverse of the destination field’s voxel volume.

This is most useful in the Accumulated mode where it ensures a particle will add the same number total units to the field regardless of field resolution. Higher resolution fields will merely receive a denser allocation.

Calculation

The value of the destination field is A, the value of the source attribute is B. The value D is written to the destination field.

Copy

D = B

Add

D = A + B

Subtract

D = A - B

Multiply

D = A * B

Divide

D = A / B

Maximum

D = max(A, B)

Minimum

D = min(A, B)

Dest Pre-Add, Dest Pre-Mul

The A in the calculation is set to A' = A * m + a, where m is the Dest Pre-Mul and a the Dest Pre-Add.

Source Pre-Add, Source Pre-Mul

The B in the calculation is set to B' = B * m + a, where m is the Source Pre-Mul and a the Source Pre-Add.

Post-Add, Post-Mul

The result that the destination field is set to is modified by result' = result * m + a, where m is the Post-Mul and a is the Post-Add.

Tip

You can use this node as a quick way to copy the pscale dependent values into a fog volume.

Examples

volumefromattrib Example for Volume from Attribute geometry node

This example shows how to use the Volume From Attrib SOP to transfer point attributes into volume voxels.

See also

Geometry nodes