Houdini 20.5 Nodes APEX Nodes

ragdoll::Solve

Applies a ragdoll simulation to one or more characters.

On this page
Since 20.0

Inputs

skeleton: GeometryArray

The rest skeletons for each character. The skeleton geometry is expected to provide the joint limits via the configurationattrib point attribute.

collision_shapes: GeometryArray

The collision shape geometry for each character.

motionclip: GeometryArray

A motion clip for each character. The motion clip is used as the target animation for the ragdoll and also determines the ragdoll’s initial pose.

channels: GeometryArray

Geometry containing animated or static parameters for each character and their joints. Animated parameters are specified by channel primitives with a name primitive attribute. Static parameters are stored in a detail dictionary attribute named parms.

Note

The values for integer parameters are determined by rounding the evaluated channel value to the nearest integer.

The following parameters apply to the entire character:

Name

Type

Animated

Default Value

Description

globalactive

int

Yes

1

Controls whether the entire ragdoll is active. This can be used to keyframe when the ragdoll becomes active.

configurationattrib

string

No

""

A per-character override for the node’s configurationattrib parameter.

The following parameters apply to individual joints. These channel primitives or dictionary keys are expected to be named by prefixing the parameter name with the joint name (for example, LArm_active).

Name

Type

Animated

Default Value

Description

active

int

Yes

1

Controls whether the joint is simulated as an active object.

matchlocaltransforms

int

Yes

0

When turned on, the joints attempt to follow the target skeleton’s local transforms according to the Bend Stiffness and Bend Damping. This can be useful for inheriting motion from the target animation without forcing the ragdoll to match the skeleton’s world space transforms.

bendstiffness

float

Yes

5

Specifies how much the joint resists changes to its local rotation, or how strongly it attempts to match the target animation’s local transform when Match Local Transforms is turned on.

This value is equivalent to the frequency of a spring.

benddampingratio

float

Yes

1

The amount of damping that is applied when resisting changes to the joint’s local rotation, or when matching the target animation’s local transform when Match Local Transforms is turned on. A value of 0 specifies no damping, and a value of 1 provides just enough damping to prevent oscillation. Values between 0 and 1 allow oscillation (with some damping), and values greater than 1 provide increasingly damped motion that has no oscillation.

This value is equivalent to the damping ratio of a spring.

matchworldtransforms

int

Yes

0

When turned on, the joints attempt to match the target skeleton’s world transforms according to the Position Stiffness, Position Damping, Orientation Stiffness, and Orientation Damping. This can be useful for pinning specific joints to follow the target animation.

targetposstiffness

float

Yes

100

When Match World Transforms is turned on, this is the strength of the force that attempts to match the world space target position.

This value is equivalent to the frequency of a spring.

targetposdampingratio

float

Yes

5

When Match World Transforms is turned on, this is the amount of damping applied to the motion when attempting to match the world space target position. A value of 0 specifies no damping, and a value of 1 provides just enough damping to prevent oscillation. Values between 0 and 1 allow oscillation (with some damping), and values greater than 1 provide increasingly damped motion that has no oscillation.

This value is equivalent to the damping ratio of a spring.

targetorientstiffness

float

Yes

100

When Match World Transforms is turned on, this is the strength of the force that attempts to match the world space target orientation.

This value is equivalent to the frequency of a spring.

targetorientdampingratio

float

Yes

5

When Match World Transforms is turned on, this is the amount of damping applied to the motion when attempting to match the world space target orientation. A value of 0 specifies no damping, and a value of 1 provides just enough damping to prevent oscillation. Values between 0 and 1 allow oscillation (with some damping), and values greater than 1 provide increasingly damped motion that has no oscillation.

This value is equivalent to the damping ratio of a spring.

disablecollisions

int

Yes

0

Disables all collisions for the joint’s collision shape.

bounce

float

No

0.5

The elasticity of the object. If two objects of bounce 1.0 collide, they rebound without losing energy. If two objects of bounce 0.0 collide, they come to a standstill.

density

float

No

1000

The mass of an object is its volume times its density.

friction

float

No

1

The coefficient of friction for the object. A value of 0 means the object is frictionless.

This governs how much the tangential velocity is affected by collisions and resting contacts.

time: Float

The time at which to evaluate the simulation (in seconds).

timestep: Float

The length of a simulation timestep (in seconds).

configurationattrib: String

The name of the point configuration attribute to read rotation limits from, as defined by the Configure Joint Limits SOP (for example).

starttime: Float

The start time of the simulation (in seconds).

groundpos: Vector3

The position of the ground plane.

groundorient: Vector4

The orientation of the ground plane, specified as a quaternion.

groundbounce: Float

The elasticity of the ground plane. If two objects of bounce 1.0 collide, they rebound without losing energy. If two objects of bounce 0.0 collide, they come to a standstill.

groundfriction: Float

The coefficient of friction of the ground plane. A value of 0 means the object is frictionless. This governs how much the tangential velocity is affected by collisions and resting contacts.

pinroot: Bool

When turned on, collision shapes that do not have an ancestor collision shape are constrained to keep them attached to the skeleton instead of being allowed to move freely. This can be useful when simulating only a subset of the skeleton (for example, a tail).

groundenable: Bool

If set to True, enables a ground plane collision object.

forceresetsim: Bool

If set to True, forces the simulation to be reset. This causes all time steps from the starttime to the current time to be solved.

gravity: Vector3

The gravity force to apply to the simulation objects.

autoresimframe: Bool

If set to True, re-simulates the specified simulation frame if it has not been re-simulated since the last parameter change (also clears any subsequent cached frames). This allows you to quickly preview the behavior of a parameter change on earlier frames without resetting the entire simulation, done by simply rewinding to an earlier frame and playing forward. However, for expensive simulations, this additional re-simulation may be undesirable.

If set to False, parameter changes only re-simulate the current frame, so any earlier frames return their original cached results.

resetvelocities: Bool

If set to True, sets the velocity and angular velocity of each object to zero after every timestep. This can be useful for accurately following the target skeleton when interactively posing a character.

solverparms: Dict

A dictionary that specifies parameter overrides for the Bullet solver.

Outputs

skeleton: GeometryArray

The modified skeletons from the ragdoll simulation.

See also

APEX Nodes