This DOP is currently only supported by the Bullet Solver
and the Wire Solver.
The constraint network defines pairs of RBD objects that should be constrained
together.With the constraint network, SOP Geometry is specified which defines what objects should be constrained. This makes it easy to procedurally generate a set of constraint relationships, including constraints of different types. Each point in the geometry represents a constraint anchor, according to the
name
and P
attributes. Each two-point polygon represents a constraint, according
to the constraint data specified by the constraint_name
attribute.
Tip
Advanced users can use the
constraint_name
and constraint_type
attributes to dynamically change constraint types with animation or a
SOP Solver.Attributes
Constraint Attributes
You can create attributes on the geometry to customize each constraint’s behavior and type.
If a primitive attribute with the same name as a constraint property (such as
The following attributes can be used to control the type of constraint described by each primitive.
damping
) is present, the attribute value will be multiplied with the value from the constraint sub-data.The following attributes can be used to control the type of constraint described by each primitive.
Name | Class | Type | Description |
---|---|---|---|
constraint_name
|
Primitive | String | Specifies the Data Name of the constraint to create. If this attribute is not present or the name is invalid, no constraint will be created from the primitive. This attribute can be modified in a SOP Solver to change the constraint’s type during the simulation. |
constraint_type
|
Primitive | String | Specifies whether the constraint affects position , rotation or
all degrees of freedom. If this attribute is not present or has
an invalid value, the default value will be position . |
next_constraint_name
|
Primitive | String | Specifies a new value for the constraint_name attribute to switch to if the constraint is broken by the solver.
This is simpler than using a SOP Solver and allows the transition to take place at the instant the constraint breaks.
Currently, only glue constraints may be broken during the timestep by the Bullet Solver. |
next_constraint_type
|
Primitive | String | Specifies a new value for the constraint_type attribute to switch to if the constraint is broken by the solver and the next_constraint_name attribute is valid. |
propagate_iteration
|
Detail | Integer | Specifies the number of impact propagations for all glue bonds in the constraint network.
Note
In Houdini 17, the number of propagation iterations can instead be varied per glue constraint with the Propagation Iterations parameter, so this detail attribute is deprecated.
|
Feedback Attributes
The following attributes are created by the solver to provide
information about how the constraints behaved during the previous
timestep.
These attributes can be used to control when constraints are broken.
Name | Class | Type | Description |
---|---|---|---|
angle
|
Primitive | Float | The current angle (in radians) between the two anchors. |
distance
|
Primitive | Float | The current distance between the two anchors. |
force
|
Primitive | Float | This attribute stores the magnitude of the force that was applied to satisfy the constraint during the previous timestep. |
impact
|
Primitive | Float | For glue constraints, this attribute is updated by the solver with the accumulated impulses for the glue bond, as impacts occur and propagate through the network. |
torque
|
Primitive | Float | This attribute stores the magnitude of the torque that was applied to satisfy the constraint during the previous timestep. |
Anchor Attributes
The following attributes can be used to control how the anchor points are attached to objects.
Name | Class | Type | Description |
---|---|---|---|
anchor_id
|
Point | Integer | If this attribute is defined and refers to a valid point (or vertex depending
on the value of anchor_type ), then this anchor’s position will be bound to
the specified point (or vertex) on the simulated geometry specified by the
name attribute.If the value is set to -1 , then the anchor is treated as a relative offset
from the object specified by the name attribute (where the P attribute
defines the offset). If the value does not refer to a valid point (or vertex),
then the constraint is not created. |
anchor_type
|
Point | Integer | Specifies if the anchor is attached to a point , vertex or agent transform.
If no anchor_id attribute is defined and the anchor type is point or vertex , then this
attribute has no effect.
If this attribute is not defined, then anchor_id will refer to a point. |
condir
|
Point | Vector | If the number of constrained degrees of freedom is 1, this value defines the normal of a plane that the object can move along or rotate about any axis in. If the number of constrained degrees of freedom is 2, this value defines an axis that the object can move or rotate about. |
condof
|
Point | Integer | Identifies the number of constrained degrees of freedom for an anchor (0 to 3). |
local_orient
|
Point | Quaternion | If the anchor_type is agent , specifies the anchor’s orientation in the local space of the transform referenced by the name . |
local_P
|
Point | Vector | If the anchor_type is agent , specifies the anchor’s position in the local space of the transform referenced by the name . |
name
|
Point | String | Identifies the object to which the constraint is attached.
An empty name ind icates that the constraint is attached to a world space position. For RBD Packed Objects, the name point attribute from the DOP object’s geometry is used to identify which object to attach the constraint to.
This can be prefixed by the DOP Object name (e.g. object2/piece3 ) to uniquely identify the object.
For agent primitives, a transform name can be appended to the anchor name (e.g. agent2/head ) to attach the constraint to a specific transform in the agent’s rig.
For all other types of objects, the DOP object name is used. |
orient
|
Point | Quaternion | Identifies the initial world space orientation of the anchor. If
the r point attribute also exists on the geometry, this attribute
will take precedence. |
P
|
Point | Vector | Identifies the initial world space position of the anchor. |
r
|
Point | Vector | Identifies the initial world space orientation of the anchor as Euler angles. |
v
|
Point | Vector | Identifies the velocity of the world space position to which the constraint is attached. |
w
|
Point | Vector | Identifies the angular velocity of the world space position to which the constraint is attached. |
Note
For RBD Packed Objects,
the name point attribute from the DOP object’s geometry is used to
identify which object to attach the constraint to. Since multiple RBD Packed Objects may contain packed primitives with the same names, the identifier can optionally be prefixed by the DOP Object name (e.g.
When switching a setup from using an RBD Packed Object to an RBD Fractured Object, ensure that the anchor names are not prefixed with the DOP Object name so that the constraint network is compatible with both object representations.
object2/piece3
)
to avoid name conflicts and uniquely identify the object. For all other
types of objects, the DOP object name is used as the identifier.When switching a setup from using an RBD Packed Object to an RBD Fractured Object, ensure that the anchor names are not prefixed with the DOP Object name so that the constraint network is compatible with both object representations.