merge_volumes
The combine volume compound serves the purpose of merging volumes while providing options for how the information is combined for level sets, fog density, and other data present in the objects.
volumes
Input objects fan-in port. Objects may contain only fog, or only level set or both. If there is a mix of objects with fogs/levelsets, then this logic is applied: If volA = level set + fog and volB = level set and volC = fog, then combining the three would mean that the output is a new volume with a level set which is the combination of the level sets in volA and volB, and similarly a fog which combines the fogs of volA and volC.
General
enable
If false, outputs the first volume in volumes
or an empty object if none exists.
invert_order
The order of operations is inverted.
Level Set
level_set_mode
Modes:
Union
: Generate the union of level sets A and B and C and so on (default).Difference
: Level set A minus level set B, then result minus level set C and so on.Intersection
: Generate the intersection of level sets A and B and C and so on.AlphaBlendLevelSet
: Generate the level set as (1 - alpha) x A + alpha x B.
Fog Density
fog_density_mode
Modes:
Add
: A + B (default)Subtract
: A - BDivide
: A / BMultiply
: A x BMin
: use the minimum of each corresponding value from A and B.Max
: use the maximum of each corresponding value from A and B.Average
: (A + B) / 2SoftCut
: (1 - A) x BSoftCombine
: A + (1 - A) x BAlphaBlend
: (1 - alpha) x A + alpha x B
alpha
The alpha value used in the alpha blend mode. Can be a float value or a field.
Properties
properties_mode
Properties support the modes also available for fog density, and in addition supports an Automatic
mode (default), as well as UseFirst
and UseSecond
modes.
In Automatic
mode, the properties are merged based on the level set and fog density operations.
This means when you combine fog densities, whichever operation you choose for the fog density, is also done for the other properties.
The same thing applies when you combine level sets, where:
When combining level sets using CSG operations Union
, Difference
, Intersection
, one can combine properties based on from which volume the level set voxel is chosen.
In particular a CSG operation is a min or max operation that picks a voxel from either input level set A or input level set B based on the min and max.
For properties this means that if the level set voxel from volume A is chosen in the output level set, then for all properties we similarly pick the property value
from volume A in that particular voxel to be the output and vice versa if volume B is chosen.
If there is no fog density or level set in the volume, or if there is both, Automatic
defaults to Add
.
The UseFirst
and UseSecond
modes can be used to force the output to exclusively use the properties from the first (A) or second (B) volume respectively.
Currently only types with float components (scalars, vectors, matrices) are supported.
Resolution
optimized_adaptivity
If enabled and the input volumes contain a level set then the output will only be refined where the sampling error introduced by not refining is greater than 0.1 times the detail size.
max_relative_error
The maximum difference relative to the detail size and bounding box (for signed distance fields) that is allowed in the output, compared to a non-adaptive volume, when optimized_adaptivity
is enabled.
Start by trying the default value, and then adjusting up or down from there based on the result. If the error threshold is too low, artifacts may appear when zooming in, and if the error threshold is set too high there will be less memory and computational savings.
adaptive_voxel_scale
Scales the detail size of the output volume when optimized_adaptivity
is enabled.
volume_subdivision_structure
The subdivision structure of the Bifrost volume.
- In
Automatic
mode this will usePower2
if eitheradaptivity
is enabled or any of the input volumes is `Power2. - In
Power2
mode the resolution doubles with each level in volume. - In
Power5
mode the resolution quintuples with each level in volume.