Language:
Page Info
Engine Version:

AnimDynamics

Choose your OS:

The AnimDynamics node is a small solver which can be used to provide physically based secondary animation for Skeletal Mesh assets. If your character has necklaces, bracelets, packs, wires, hair, cloth, or other items that you want to bounce around or move while the character moves, this node can provide that movement.

AnimDynamics is a very light-weight implementation that you can turn on or off with LOD or other animation settings. The processing occurs during the animation processing on the AnimGraph . It is built to be a simple and quick solver, so there are a few approximations that the solver makes to keep in mind.

  • Dynamic bones are represented by boxes only, which are used to calculate inertia of the part.

  • Collision is not calculated. However, constraints can be used to restrict movement.

AnimDynamics supports Linear, Angular and Planar Constraints. Linear and Angular Constraints can be driven by springs to provide a more bouncy feel while Planar Constraints can be used to create a plane that the part will not cross.

Chains are also supported where a Begin and End Bone in a character can be selected and a chain will be generated for those links. This is much more expensive than a single body dynamic bone as linked constraints now need to be solved and that requires many more iterations to correctly converge. Iteration counts are also configurable per-node.

Here is an example of a chain using AnimDynamics:

AnimDynamicsChain.gif

You can enable this option by checking the Chain checkbox in the Details panel of the AnimDynamics node.

There are visualization layers which can be used to show where the bodies are and their sizes.

AnimDynamicsVisualization.png

Here is an example showing the visualizer for angular limits:

AnimDynamicsaAngular.png

These can be set via the Details panel with the AnimDynamics node selected.

The core application of AnimDynamics exists within the Setup and Constraint sections of the Details panel.

SetupConstraints.png

It is in these two areas where you will tune and tweak values to create the movement you are looking for. The Bound Bone is the bone which is being affected by the node and the Box Extents section is used to create a volume that will produce inertia and drive the movement.

For example, if you want something that is going to have a slow back-and-forth style movement you may want a very tall and slightly wide box, whereas if you want something that has a little more movement but will settle into position after moving you might create a short wider box.

The Local Joint Offset is an offset used to attach the constraint to and determines the point to pivot from. If you leave this as 0, you may not see any movement as it doesn't know where to pivot from. Adjust this value until you achieve the movement you desire.

In the Constraint section, you can define the movement range which is where the visualizers help to see the range of movement. If you leave something as 0 it will not affect it. As soon as you enter a value, it will provide a range in which to move.

For a video breakdown of AnimDynamics, tips & tricks, and use cases in Paragon, see the AnimDynamics Twitch Stream below:

To quickly get started, create an AnimDynamics node inside the AnimGraph of your Animation Blueprint. There should be one node per dynamic bone or continuous dynamic chain. All of the visualization, constraint, body, and simulation settings are set on each node.

AnimDynamicsNode.png

Pin

Description

Input Pins

External Force

An external force to apply to all bodies in the simulation when checked (specified in world space).

Component Pose

The input pose to be transformed.

Alpha

A float value in the range [0.0, 1.0] to use as the alpha value to determine the weighting of the Transform applied by the SkeletalControl. A value of 0.0 gives full weighting to the input pose, while a value of 1.0 gives full weighting to the control's computed Transform.

Output Pins

Pose (Blank)

The final pose after the Transform has been applied.

AnimDynamics nodes are also affected by the LOD Threshold system introduced in 4.11. You can find the setting for this in the Details Panel for the AnimDynamics node.

perf.png

Property

Description

LOD Threshold

This is the max Level of Detail (LOD) that this node is permitted to run on. For example: if you have LOD Threshold set to 2, it will run until LOD 2, but disable itself once the component's LOD becomes 3.

Please see the Creating Dyanmic Animations how-to for a step-by-step example of using AnimDyamics.