Houdini 20.5 Nodes Geometry nodes

Pendulum Motion geometry node

Inserts periods of pendulum motion into the middle of character animations.

On this page
Since 20.0

This SOP takes as its first input a character skeleton animation, and replaces sections of the character’s animation with pendulum motion. The motion path of the character’s center of mass can also be provided as a second input, and this is used to inform the timing and placement of the pendulum swings.

When the period of the pendulum motion does not align with the frames to replace in the original animation (Range to Replace), the timeline of the original animation is warped to ensure that the animation before and after the pendulum motion is unaltered.

Controls are available to adjust the speed, arc, and position of the pendulum motion, and a set of parameters in the Transition section can be used to smooth out the motion path into and out of the pendulum motion.

State

The Pendulum Motion viewport state allows you to visualize and adjust a pendulum motion path.

Pendulum Motion viewport state toolbar

Pendulum

The active pendulum motion section.

Pendulum Type

Simple

The pendulum follows a circular arc beginning at the start position and passing as close to the target position as possible while maintaining a constant distance from the pivot.

Conical

The pendulum rotates about the pivot perpendicular to gravity at the speed required to avoid falling due to gravity.

Motion Path

None

Displays the motion path as a white line that cannot be selected or manipulated.

Non-interactive motion path displayed

Show

Displays an interactive motion path (vibrant line with ticks on each frame) for the entire animation.

Interactive motion path displayed for entire animation

Trajectory

Displays an interactive motion path (vibrant line with ticks on each frame) for the current pendulum motion section.

Interactive motion path displayed for current pendulum motion section

Parameters

Joint Group

The group of joints that contribute to the center of mass of the skeleton. These joints and their children are moved along the motion path.

Pre Behavior

Determines where the skeleton is moved if the time on the playbar precedes the motion path’s timeline.

Free

Moves the skeleton to the start position of the original animation if there is no animation before the pendulum motion begins.

If there is animation before the pendulum motion, the skeleton moves along the motion path of the animation before the pendulum motion begins.

Hold

Keeps the skeleton at the start position of the pendulum motion path.

Trim Motion Path Before First Section

When turned on, the portion of the motion path that preceeds the first pendulum motion section is trimmed. When Pre Behavior is set to Hold, this causes the skeleton to be held at the start position of the first pendulum motion section.

This parameter is available when Pre Behavior is set to Hold.

Post Behavior

Determines where the skeleton is moved if the time on the playbar exceeds the end of the motion path’s timeline.

Free

Moves the skeleton to the end position of the original animation if there is no animation after the pendulum motion ends.

If there is animation after the pendulum motion ends (for example, if Clip Range is set to Custom Frame Range, and Frame Range is set to a more restrictive range), the skeleton continues to move along the motion path of the animation after the pendulum motion ends.

Hold

Keeps the skeleton at the end position of the pendulum motion path.

Trim Motion Path After Final Section

When turned on, the portion of the motion path that follows the final pendulum motion section is trimmed. When Post Behavior is set to Hold, this causes the animation to be held at the end position of the final pendulum motion section.

This parameter is available when Post Behavior is set to Hold.

Source Time Attribute

When turned on, adds the specified point attribute to the Motion Path output. The point attribute defines the time in the original animation that corresponds to each point on the pendulum motion path.

When physics is added to an animation, the timeline of the original animation is compressed or extended during the period of pendulum motion. This is to ensure that the animation following the pendulum motion is the same as what it would be without pendulum motion. This compression/extension is reflected in the source time attribute. If the Motion Path input has a source time attribute, that source time attribute is warped instead of the timeline of the original animation.

Additionally, the source time attribute is used with the Range to Replace parameter to determine the periods of animation to replace.

Motion Path

These parameters manage the creation of the initial motion path, and are available if nothing is connected to the Motion Path input.

Create Motion Path from Input Animation

When turned on, creates an initial motion path from the input animation.

Clip Range

Specifies the source used to define the frame range when constructing the initial motion path. The frame range is obtained from either the input animation’s clipinfo detail attribute or the Frame Range parameter.

Frame Range

The start and end of the frame range used to construct the intial motion path.

This parameter is available when Clip Range is set to Custom Frame Range.

Physical Properties

These parameters manage the physical properties of the skeleton such as mass, drag, and gravity.

Configuration Attribute

The dictionary or float point attribute on the input skeleton that defines the mass of each point. If it is a dictionary attribute, the mass key defines the mass. Additionally, the localcom key is used to define a local center of mass for each point.

Mass

The total mass of the skeleton. This reduces the effect of Drag on the pendulum motion. If the Configuration Attribute defines the mass of the points, that mass is used instead of this parameter.

Drag

Sets the air resistance for the pendulum motion. Higher values result in a faster loss of energy and a shorter travel distance.

Gravity

Sets the force that attracts the skeleton toward the ground.

Bake

Creates a default setup of pendulum motion paths between each key. Opens a Pendulum Motion Baking window with the following fields:

Bake To

The pendulum motion sections are created in this Pendulum Motion SOP. Defaults to the current Pendulum Motion SOP.

Bake From

The node with the keyed positions.

Use Frame Range from Playbar

When turned on, uses the frame range in the playbar to determine the frame range to look for keys. The pendulum motion sections are created between these keys.

Frame Start/End

The start and end frames to look for keys. The pendulum motion sections are created between these keys.

These fields are available when Use Frame Range from Playbar is turned off.

Bake All

Creates pendulum motion sections for the entire specified frame range. The frame range is determined by either Use Frame Range from Playbar or the Frame Start and Frame End values.

Bake Current Section

Creates pendulum motion for the section of animation you are currently at. For example, if you are at frame 18, and the animation has keys at frames 10 and 20, then Bake Current Section will create a pendulum motion section between frames 10 and 20.

Pendulum Sections

The number of pendulum motion sections added to the animation.

Create Pendulum Motion

When turned on, creates the pendulum motion defined by this section.

Range to Replace

The period of the input animation that is replaced with pendulum motion. If the Source Time Attribute is defined on the Motion Path input, Range to Replace is defined by the timeline of that source time attribute.

Note

The timeline of the original animation is compressed or extended during this period to ensure that the animation following the pendulum motion is the same as what it would be without pendulum motion. This compression/extension is reflected in the Source Time Attribute.

Note

The Start Position and Target Position of the pendulum motion defaults to the start and end points on the pendulum motion path corresponding to the Range to Replace.

Shift Animation Before Pendulum

When turned on, the animation before the pendulum motion is shifted so that it is followed naturally by the start of the pendulum motion.

Shift Animation After Pendulum

When turned on, the animation after the pendulum motion is shifted so that it follows naturally from the end of the pendulum motion.

Pendulum Type

The type of pendulum motion that the skeleton follows.

Simple Pendulum

The pendulum follows a circular arc beginning at the start position and passing as close to the target position as possible while maintaining a constant distance from the pivot.

The default arc rotates in the same plane as the pivot, but the Tilt parameter can be used to tilt the arc so that the pendulum does not swing along the same plane as the pivot.

Conical Pendulum

The pendulum rotates about the pivot perpendicular to gravity at the speed required to avoid falling due to gravity. The arc of this circle can be tilted using the Tilt parameter.

End at Target

When turned on, ends the pendulum motion when the skeleton reaches the target position. When turned off, the pendulum swing continues after reaching the target.

Life

The number of frames the skeleton is swinging.

If End at Target is turned off (which makes this parameter available) and Life is turned off, then the number of frames the skeleton is swinging is equal to the Range to Replace.

This parameter is available when End at Target is turned off.

Maintain Input Speed

When turned on, the pendulum motion starts with the same speed that the motion path had prior to the pendulum motion.

Note

If a period of pendulum motion precedes this section, the final speed of the preceding section is used to inform the start speed of this section.

This parameter is available when Pendulum Type is set to Simple Pendulum.

Speed

The initial speed of the pendulum. A positive value corresponds to the direction along the arc opposite gravity. If the pendulum’s arc is perpendicular to gravity, a positive value corresponds to the counterclockwise direction.

If the speed is too low to reach the target position, it will be increased to the minimum speed required to reach the target.

This parameter is available when Pendulum Type is set to Simple Pendulum, and Maintain Input Speed is turned off.

Tilt

Degrees to tilt the circular arc that the pendulum follows. The arc of the circle passes through the Start Position and as close to the Target Position as possible.

Reverse Direction

When turned on, reverses the initial direction of the pendulum swing. This is equivalent to inverting the Speed.

Pivot

The world space position of the pivot of the pendulum motion.

Pivot Group

The group of joints on the skeleton that are closest to the pivot of the pendulum motion.

Positions

These parameters are used to set custom values for the start and end positions of the pendulum motion rather than relying on the path of the input animation.

Start Position

The initial position of the pendulum motion.

Target Position

The final position of the pendulum motion.

Transition

These parameters are used to create smooth transition regions into and out of the pendulum motion path.

Interpolate

The function type used to interpolate during the transition regions.

Linear

The transition regions are a linear blend between the incoming/outgoing motion path and the pendulum motion path.

Constant

The skeleton position is held for the duration of the transition region.

Hermite

A smooth Hermite spline is used to transition between the incoming/outgoing motion path and the pendulum motion path.

Transition In

The number of frames to remove from the motion path before/after the start of the pendulum motion before creating a smooth transition region.

Transition Out

The number of frames to remove from the motion path before/after the end of the pendulum motion before creating a smooth transition region.

Components

The components of motion that are transitioned in the transition region.

Inputs

Skeleton

The animated skeleton to undergo pendulum motion.

Motion Path

The path that the skeleton’s center of mass follows through time.

Outputs

Skeleton

The animated skeleton with periods of pendulum motion.

Motion Path

The new path of the skeleton’s center of mass.

See also

Geometry nodes