|On this page|
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.
The volume primitives in the first input to be written to.
The points in the second input to read attribute values from.
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.
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.
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.
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.
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.
The value of the destination field is
A, the value of the source
B. The value
D is written to the destination field.
D = B
D = A + B
D = A - B
D = A * B
D = A / B
D = max(A, B)
D = min(A, B)
Dest Pre-Add, Dest Pre-Mul
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
B in the calculation is set to
B' = B * m + a, where
m is the
Source Pre-Mul and
a the Source Pre-Add.
result that the destination field is set to is modified
result' = result * m + a, where
m is the Post-Mul and
is the Post-Add.
You can use this node as a quick way to copy the
pscale dependent values into a fog volume.
This example shows how to use the Volume From Attrib SOP to transfer point attributes into volume voxels.
The following examples include this node.
Here’s a simple example showing how you can deform a volume. First create a 3d grid of points with the box sop with divisions matching the resolution of the volume. Next, transfer the density from the volume on those points. Finally, the points can be deformed any way you want, and then you can create an empty volume and fill it with the densities from the points.
This example demonstrates how you can use the Fluid Source SOP to source and advect colours from an additional volume into a smoke simulation.