|On this page|
The Volume Merge operation flattens the scalar data in a collection of volumes into a single base volume. This is useful for converting many overlapping volumes into one large volume for more efficient rendering. For example, you can stamp hundreds of thousands of volumes into a single volume for faster rendering, and flatten hierarchies into a low-res base. You can also create a Frustum volume that ensures only voxels in your camera’s field of view are created.
If you have a lot of overlapping volumes you can turn on the Clamp Maximum option. This allows the merging to stop early when that maximum is reached. However, in this early-exit, the maximum is before Post-Add, Post-Mul.
This node currently only works with standard Houdini volumes. It does not work with VDBs.
The volume primitives in the first input to be written to.
The volume primitives to flatten in from the second input.
Each voxel of the base volume in the source group will be merged with the corresponding voxels of the volumes in the merge group according to this merge method. A refers to the first input’s value, B refers to the second input’s value. If there is no second input, the first input will be used.
The copy operation will take the volume with the highest primitive number, when more than two volumes are being merged.
result = B
result = A + B
result = A * B
result = max(A, B)
result = min(A, B)
result = (A + B) / numvolumes
Clamp at Volume Boundary
While volume primitives can have boundary conditions, for efficiency it is often best to simply ignore any out of bound volumes. If clamping isn’t done, all of the volumes need to be evaluated for every voxel, which quickly gets prohibitively expensive with many volumes.
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.
Clamp Minimum, Maximum
The final result is clamped optionally to these ranges.
This example shows how to detect the overlapping regions of many incoming volumes procedurally using Volume SOP and Volume Merge SOP.