Houdini 20.5 Nodes Geometry nodes

Projectile Motion geometry node

Inserts periods of projectile 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 projectile 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 trajectories.

When the period of projectile 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 projectile motion is unaltered.

Controls are available to adjust the position and length of time of the projectile motion. Each period of projectile motion also has a set of parameters in the Transition section to smooth out the motion path into and out of the projectile motion.

State

The Projection Motion viewport state allows you to visualize and adjust a projectile motion path.

Projectile Motion viewport state toolbar

Projectile

The active projectile motion section.

Targeting Method

The projectile motion property that stays constant when moving the start or end position of the arc.

Life

When changing the start or end position, the time to reach the target is unchanged.

Height Plane

When changing the start or end position, the projectile motion height stays the same, but the time to reach the target changes.

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 projectile motion section.

Interactive motion path displayed for current projectile 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 projectile motion begins.

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

Hold

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

Trim Motion Path Before First Section

When turned on, the portion of the motion path that preceeds the first projectile 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 projectile 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 projectile motion ends.

If there is animation after the projectile 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 projectile motion ends.

Hold

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

Extend

The skeleton keeps moving along the arc of the projectile after the end of the projectile motion path.

Trim Motion Path After Final Section

When turned on, the portion of the motion path that follows the final projectile 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 projectile motion section. When Post Behaviour is set to Extend, this causes the final projectile motion section to continue indefinitely.

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

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 projectile motion path.

When physics is added to an animation, the timeline of the original animation is compressed or extended during the period of projectile motion. This is to ensure that the animation following the projectile motion is the same as what it would be without projectile 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 projectile 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 projectile motion. Higher values result in a faster loss of energy and a shorter travel distance. A drag of zero produces a symmetric arc.

Gravity

Sets the force that attracts the skeleton toward the ground. If you want straight paths from the start position to the target position that are not affected by gravity, set all the components to zero.

Bake

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

Bake To

The projectile motion sections are created in this Projectile Motion SOP. Defaults to the current Projectile 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 projectile motion sections are created between these keys.

Frame Start/End

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

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

Bake All

Creates projectile 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 projectile 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 projectile motion section between frames 10 and 20.

Projectile Sections

The number of projectile motion sections added to the animation.

Create Projectile Motion

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

Range to Replace

The period of the input animation that is replaced with projectile 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 projectile motion is the same as what it would be without projectile motion. This compression/extension is reflected in the Source Time Attribute.

Note

The Start Position and Target Position of the projectile motion defaults to the start and end points on the projectile motion path corresponding to this range.

Shift Animation Before Projectile

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

Note

This parameter is only of use when the start position of the projectile motion has changed (Start Position is turned on).

Shift Animation After Projectile

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

Note

This parameter is only of use when the end position of the projectile motion has changed (Target Position is turned on).

Maintain Input Speed

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

Note

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

Prefer Short Path

When turned on, and there are two potential paths to the target, the trajectory that reaches the target in the shortest time is chosen.

This parameter is available when Maintain Input Speed is turned on.

Life

The number of frames the skeleton is in flight.

If Maintain Input Speed is turned off (which makes this parameter available) and Life is turned off, the number of frames the skeleton is in flight is equal to the Range to Replace.

This parameter is available when Maintain Input Speed is turned off.

Positions

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

Start Position

The initial position of the projectile motion.

Target Position

The final position of the projectile motion.

Transition

These parameters are used to create smooth transition regions into and out of the projectile 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 projectile 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 projectile motion path.

Transition In

The number of frames to remove from the motion path before/after the start of the projectile 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 projectile motion before creating a smooth transition region.

Inputs

Skeleton

The animated skeleton to undergo projectile motion.

Motion Path

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

Outputs

Skeleton

The animated skeleton with periods of projectile motion.

Motion Path

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

See also

Geometry nodes