Houdini 20.5 Nodes Dynamics nodes

Volume Source dynamics node

Imports SOP source geometry into smoke, pyro, and FLIP simulations.

On this page
Since 17.0

The Volume Source node imports SOP data into DOP fields and geometry. This node is capable of merging an arbitrary number of SOP volumes and VDBs with fields, as well as importing and destroying simulation particles.

Note

If instancing is enabled, volumes corresponding to instance k are suffixed with “_k”. For example, density volume for the second object should be named density_1 (as cluster numbers normally start at 0).

A DOP object’s instance is deduced from its init_cluster data. This data can be created automatically by enabling instancing on the Smoke Object.

Parameters

Initialize

Configures the microsolver according to the selected preset.

Activation

Controls whether or not the source will be applied.

Input

Specifies where to fetch the SOP volumes from. Context geometries refer to SOP nodes attached to inputs of the containing DOP network, while the SOP option can be used to direct Volume Source to an arbitrary geometry node.

SOP Path

The path of the SOP node containing the geometry that is to be imported.

Transform

The source geometry can be transformed to account for differences between transforms of the input SOP and a reference object. None will prevent any corrective transform from being applied. Into This Object will ensure that the object-level transform of the input SOP is accounted for. Into Specified Object will first transform the input SOP into the space of Transform Object before sourcing takes place.

Transform Object

The reference transformation object. When Transform is set to Into Specified Object, the input SOP will first be transformed into this object’s space before sourcing is carried out.

Volumes

Create Missing Fields

When enabled, merging into a non-existent DOP field will cause this node to create a field of the appropriate rank and name.

Field to Match

When Create Missing Fields is enabled, fields that need to be created will match the size and sampling of this DOP field.

Enlarge Fields to Contain Sources

Each Target Field will be enlarged to enclose its respective Source Volume when this option is enabled. When using the Blend operation, target and weight fields will be enlarged to enclose both the source volume and weight.

Enlarge by Full Tiles

When enabled (along with Enlarge Fields to Contain Sources), size increases to each field will be carried out in multiples of 16 voxels.

Operations

The number of volume merging operations to perform.

Clamped

When enabled, only parts of the Target Field that fall within the active region of Source Volume are modified.

Note

Active region for a native Houdini volume is defined to be the area inside its bounding box. VDBs, on the other hand, may have an arbitrary active region. The VDB Visualize Tree SOP can be used to visualize the active voxels of a VDB primitive.

Field Rank

Rank of the target field.

Note

It is extremely important to identify data type for fields that the DOP object does not already contain. In these cases, a new field is created with rank governed by value of Field Rank (assuming Create Missing Fields is enabled).

Source Volume

Name of the SOP volume or VDB to merge. For vector fields, this can be a single vector VDB or a space separated list of three scalar volumes or VBDs.

Weight

Name of the SOP scalar volume or VDB containing the weights for Source Volume; applicable only when the Operation is set to Blend.

Target Field

The DOP field that is to be modified.

Weight

Name of the weight field for the destination; applicable only when the Operation is set to Blend.

SOP Mask

Name of the SOP scalar volume or VDB by which Source Volume is multiplied before merging with the Target Field.

DOP Mask

Name of the DOP field by which the Source Volume is multiplied before merging with the Target Field.

Absolute

When this option is enabled, negative mask values are interpreted as 0 and positive values are interpreted as 1.

SDF

When this option is enabled (along with Absolute), negative mask values are interpreted as 1 and positive values are interpreted as 0.

Source Scale

A multiplier applied to the source values before merging.

Use Timestep

Normalizes the Scale against the timestep and the canonical frame rate of 24. This ensures that sourcing is performed to the same real extent, regardless of the simulation timescale.

For example, with the default frame rate of 24, normalization causes the Scale to be used as is for every frame. If frame rate is increased to 48, effective scale will be halved per frame, resulting in the same amount of additive sourcing.

Operation

The merging operation.

Copy

Values in the Target Field will be overwritten by those in the Source Volume.

Add

Result is the sum of values in Target Field and Source Volume.

Subtract

Result is the difference between values in Target Field and Source Volume; the difference can optionally be clamped against zero by enabling Avoid Negatives.

Multiply

Result is the product of values in Target Field and Source Volume.

Divide

Values in the Target Field will be divided by the corresponding values in the Source Volume.

Maximum

Result is the larger of the values in Target Field and Source Volume. For vector fields, comparison can be performed length-wise by enabling Use Vector Length.

Minimum

Result is the smaller of the values in Target Field and Source Volume. For vector fields, comparison can be performed length-wise by enabling Use Vector Length.

Average

Result is the average of values in Target Field and Source Volume.

Pull

Values in the Target Field are pushed towards the corresponding entries in Source Volume, in accordance to settings of Acceleration Strength, Deceleration Strength, and Direction Strength.

Blend

Result stored in the Target Field is (s * v + d * w) / (v + w), where s, v, d, w represent values of the source, source weight, target field, and target weight, respectively. Additionally, the values of source weight are added to the target weight field.

None

The Target Field is left untouched.

Use Vector Length

With vector fields, when Operation is set to Maximum or Minimum, this option can be enabled to signal that comparisons are to be done using lengths of the vectors, rather than component-wise.

Avoid Negatives

When Operation is set to Subtract and this option is enabled, negative results will be changed to zero.

Acceleration Strength

Controls how strongly the Target Field's values are pushed towards the Source Volume. Applies for the voxels in which the Source Volume has larger values than the Target Field.

Deceleration Strength

Controls how strongly the Target Field's values are pushed towards the Source Volume. Applies for the voxels in which the Source Volume has smaller values than the Target Field.

Direction Strength

When enabled, controls how strongly the Target Field's vectors are pushed to align with Source Volume's. This option can only be used with vector fields; when disabled for vector fields, guiding is performed independently for each component of the Target Field.

Note

Acceleration Strength and Deceleration Strength apply to the vector lengths when this option is enabled.

Particles

Source Particles

Add the points from the input SOP to the simulation object’s geometry.

Group

Only points in this Group will be imported into the DOP geometry.

Time Offset Scale

Offset any new particles by adding their scaled velocity multiplied by a random portion of the current timestep. This can help ensure the emitted stream of particles appears regular even at lower simulation substeps.

Global Seed

The seed used to randomly offset the particles by their velocities. Also used for random seeding of particle life expectancies.

Life Expectancy

If enabled, set the particles' life attribute to control how long the particle will live. If sourcing particles to the FLIP Solver, then Apply POP Solver and Reap Particles must be enabled on the solver for this attribute to have an effect.

Life Variance

Particles will live the number of seconds in Life Expectancy, plus or minus this number of seconds. Use 0 for no variance.

Kill Inside SOP

Kill any particles within the specified SOP SDF primitive. If Source Particles is enabled, only particles added in the current timestep are eligible to be killed. If Source Particles is disabled, all particles are eligible to be killed.

Kill Inside DOP

Kill any particles within the specified DOP SDF. If Source Particles is enabled, only particles added in the current timestep are eligible to be killed. If Source Particles is disabled, all particles are eligible to be killed.

Stream Name

Any emitted particles will be placed in this group.

Instancing

Instancing

When performing clustered simulations it is important that each cluster receives its own individual sources. For the merged SOP primitives, the cluster number is affixed to the name of the volume that is sourced (following an underscore).

This option controls if this cluster identification is performed. Auto Detect will attempt to determine it based on the instancing settings of the Smoke Object. However, sometimes one wishes to use the same source across many instances, in which cases Instancing should be set to Off.

Inputs

First Input

This optional input can be used to control which simulation objects are modified by this node. Any objects connected through this input and which match the Group parameter field will be modified.

If this input is not connected, this node can be used in conjunction with an Apply Data node, or can be used as an input to another data node.

All Other Inputs

If this node has more input connectors, other data nodes can be attached to act as modifiers for the data created by this node.

The specific types of subdata that are meaningful vary from node to node. Click an input connector to see a list of available data nodes that can be meaningfully attached.

Outputs

First Output

The operation of this output depends on what inputs are connected to this node. If an object stream is input to this node, the output is also an object stream containing the same objects as the input (but with the data from this node attached).

If no object stream is connected to this node, the output is a data output. This data output can be connected to an Apply Data DOP, or connected directly to a data input of another data node, to attach the data from this node to an object or another piece of data.

Locals

channelname

This DOP node defines a local variable for each channel and parameter on the Data Options page, with the same name as the channel. So for example, the node may have channels for Position (positionx, positiony, positionz) and a parameter for an object name (objectname).

Then there will also be local variables with the names positionx, positiony, positionz, and objectname. These variables will evaluate to the previous value for that parameter.

This previous value is always stored as part of the data attached to the object being processed. This is essentially a shortcut for a dopfield expression like:

dopfield($DOPNET, $OBJID, dataName, "Options", 0, channelname)

If the data does not already exist, then a value of zero or an empty string will be returned.

DATACT

This value is the simulation time (see variable ST) at which the current data was created. This value may not be the same as the current simulation time if this node is modifying existing data, rather than creating new data.

DATACF

This value is the simulation frame (see variable SF) at which the current data was created. This value may not be the same as the current simulation frame if this node is modifying existing data, rather than creating new data.

RELNAME

This value will be set only when data is being attached to a relationship (such as when Constraint Anchor DOP is connected to the second, third, of fourth inputs of a Constraint DOP).

In this case, this value is set to the name of the relationship to which the data is being attached.

RELOBJIDS

This value will be set only when data is being attached to a relationship (such as when Constraint Anchor DOP is connected to the second, third, of fourth inputs of a Constraint DOP).

In this case, this value is set to a string that is a space separated list of the object identifiers for all the Affected Objects of the relationship to which the data is being attached.

RELOBJNAMES

This value will be set only when data is being attached to a relationship (such as when Constraint Anchor DOP is connected to the second, third, of fourth inputs of a Constraint DOP).

In this case, this value is set to a string that is a space separated list of the names of all the Affected Objects of the relationship to which the data is being attached.

RELAFFOBJIDS

This value will be set only when data is being attached to a relationship (such as when Constraint Anchor DOP is connected to the second, third, of fourth inputs of a Constraint DOP).

In this case, this value is set to a string that is a space separated list of the object identifiers for all the Affector Objects of the relationship to which the data is being attached.

RELAFFOBJNAMES

This value will be set only when data is being attached to a relationship (such as when Constraint Anchor DOP is connected to the second, third, of fourth inputs of a Constraint DOP).

In this case, this value is set to a string that is a space separated list of the names of all the Affector Objects of the relationship to which the data is being attached.

ST

The simulation time for which the node is being evaluated.

Depending on the settings of the DOP Network Offset Time and Scale Time parameters, this value may not be equal to the current Houdini time represented by the variable T.

ST is guaranteed to have a value of zero at the start of a simulation, so when testing for the first timestep of a simulation, it is best to use a test like $ST == 0, rather than $T == 0 or $FF == 1.

SF

The simulation frame (or more accurately, the simulation time step number) for which the node is being evaluated.

Depending on the settings of the DOP Network parameters, this value may not be equal to the current Houdini frame number represented by the variable F. Instead, it is equal to the simulation time (ST) divided by the simulation timestep size (TIMESTEP).

TIMESTEP

The size of a simulation timestep. This value is useful for scaling values that are expressed in units per second, but are applied on each timestep.

SFPS

The inverse of the TIMESTEP value. It is the number of timesteps per second of simulation time.

SNOBJ

The number of objects in the simulation. For nodes that create objects such as the Empty Object DOP, SNOBJ increases for each object that is evaluated.

A good way to guarantee unique object names is to use an expression like object_$SNOBJ.

NOBJ

The number of objects that are evaluated by the current node during this timestep. This value is often different from SNOBJ, as many nodes do not process all the objects in a simulation.

NOBJ may return 0 if the node does not process each object sequentially (such as the Group DOP).

OBJ

The index of the specific object being processed by the node. This value always runs from zero to NOBJ-1 in a given timestep. It does not identify the current object within the simulation like OBJID or OBJNAME; it only identifies the object’s position in the current order of processing.

This value is useful for generating a random number for each object, or simply splitting the objects into two or more groups to be processed in different ways. This value is -1 if the node does not process objects sequentially (such as the Group DOP).

OBJID

The unique identifier for the object being processed. Every object is assigned an integer value that is unique among all objects in the simulation for all time. Even if an object is deleted, its identifier is never reused. This is very useful in situations where each object needs to be treated differently, for example, to produce a unique random number for each object.

This value is also the best way to look up information on an object using the dopfield expression function.

OBJID is -1 if the node does not process objects sequentially (such as the Group DOP).

ALLOBJIDS

This string contains a space-separated list of the unique object identifiers for every object being processed by the current node.

ALLOBJNAMES

This string contains a space-separated list of the names of every object being processed by the current node.

OBJCT

The simulation time (see variable ST) at which the current object was created.

To check if an object was created on the current timestep, the expression $ST == $OBJCT should always be used.

This value is zero if the node does not process objects sequentially (such as the Group DOP).

OBJCF

The simulation frame (see variable SF) at which the current object was created. It is equivalent to using the dopsttoframe expression on the OBJCT variable.

This value is zero if the node does not process objects sequentially (such as the Group DOP).

OBJNAME

A string value containing the name of the object being processed.

Object names are not guaranteed to be unique within a simulation. However, if you name your objects carefully so that they are unique, the object name can be a much easier way to identify an object than the unique object identifier, OBJID.

The object name can also be used to treat a number of similar objects (with the same name) as a virtual group. If there are 20 objects named “myobject”, specifying strcmp($OBJNAME, "myobject") == 0 in the activation field of a DOP will cause that DOP to operate on only those 20 objects.

This value is the empty string if the node does not process objects sequentially (such as the Group DOP).

DOPNET

A string value containing the full path of the current DOP network. This value is most useful in DOP subnet digital assets where you want to know the path to the DOP network that contains the node.

Note

Most dynamics nodes have local variables with the same names as the node’s parameters. For example, in a Position DOP, you could write the expression:

$tx + 0.1

…to make the object move 0.1 units along the X axis at each timestep.

See also

Dynamics nodes