Houdini 20.0 Nodes Geometry nodes

MotionClip Cycle 2.0 geometry node

Smoothly loops a section of a MotionClip

On this page
Since 19.0

This SOP takes as input a MotionClip (eg. from MotionClip) and a frame range. It outputs a clip containing the specified number of repetitions, blending between each of them.

State

This viewport state allows you to visualize a MotionClip or its evaluated poses over time using a color ramp, and it is available for every MotionClip SOP node that outputs a MotionClip.

MotionClip viewport state interaction

You can select individual joints from the current pose in the MotionClip viewport state. For the selected joints, you can then use the Evaluate Pose mode to view just the current pose, its selected joints, and the motion trails for those joints.

rFoot and lFoot joints selected, Mode = Evaluate Pose, Color = White to Red
MotionClip viewport state toolbar

Mode

Determines the MotionClip information that is displayed in the viewport.

MotionClip

Displays all the MotionClip’s poses.

Mode = MotionClip

Evaluate Pose

Displays a single MotionClip pose at the current time.

Mode = Evaluate Pose

Transparent MotionClip

When turned on, the MotionClip’s poses are displayed as fainter lines, making it easier to see the scene behind the MotionClip, as well as the evaluated pose.

Color

Applies the selected color ramp preset to the MotionClip’s visualization in the viewport. This color ramp helps to visualize changes to the MotionClip or individual poses over time.

Mode = Evaluate Pose, Color = White to Red

Extend Color

Determines how the poses outside of the MotionClip’s defined animation start and end range are visualized in the viewport.

Hold

Holds the color values at the ends of the range.

Mode = MotionClip, Color = Plasma, Extended Color = Hold

Gray

Poses outside the animation start and end range are colored gray.

Mode = MotionClip, Color = Plasma, Extended Color = Gray

Hide

Hides the poses outside the animation start and end range.

Mode = MotionClip, Color = Plasma, Extended Color = Hide

Parameters

Cycle

Frame Range

Specifies the start/end/increment of the range of frames to be cycled.

Cycles Before

The number of cycles to output before the specified range.

This does not need to be an integer, it can output a fraction of a cycle.

Cycles After

The number of cycles to output after the specified range.

Locomotion

These parameters manage how the locomotion of the MotionClip will be computed and cycled.

Sequence Cycles

The method used to sequence the cycles.

By Shifting Between Cycles

Each cycle will begin where the previous cycle ended.

By Blending Velocity

The velocity of each frame of the input MotionClip will be blended and used to sequence each frame of the output MotionClip.

Mirror Odd Cycles

Every other cycle will be reversed.

Locomotion

The method used to determine the locomotion of the MotionClip and cycle it.

None

The locomotion will not be computed and the MotionClip will be cycled without translating or rotating it between cycles.

Existing Locomotion

The locomotion will be obtained from the __locomotion__ point of the MotionClip. This point should be created by the Extract Locomotion node.

Compute Locomotion

The locomotion of the MotionClip will be computed by this node.

Locomotion Source

The source of the locomotion of the MotionClip.

Joint

A joint in the skeletons of the MotionClip will be used as a reference for extracting the locomotion.

Center of Mass

The center of mass of the skeletons of the MotionClip will be computed and used as a reference for extracting the locomotion.

This parameter is only available when Locomotion is set to Compute Locomotion.

Locomotion Joint

The name of the joint in the input MotionClip which will be used to compute the locomotion and to translate and rotate the clip between cycles.

This parameter is only available when Locomotion Source is set to Joint.

COM Joint

Name of the COM joint in the input skeleton to use as reference for extracting the translation and orientation.

This parameter is only available when Locomotion Source is set to Center of Mass.

Configuration Attribute

The name of the configuration point attribute from which to read the mass and local_com attributes from. See /nodes/sop/kinefx__configurejoints.html.

This parameter is only available when Locomotion Source is set to Center of Mass.

Shift Cycles

The number of frames by which to shift the subsequent cycles.

If the value is 0, each cycle will start at the same position and orientation that the previous cycle ended.

If the value is negative n, each cycle will be shifted so that it starts at the same position and orientation as the skeleton was n frames before the last frame of the previous cycle.

If the value is positive n, each cycle will be shifted so that it starts at the same position and orientation the skeleton would have been n frames after the beginning of this cycle, had it not been shifted.

This parameter is only available when Sequence Cycles is set to By Shifting Between Cycles.

Tip

If you want the cycles to continue moving forward between cycles, try setting this to 1.

Tip

When using the Overlap Sequences blend method, try setting the value of this to '1 - ch("region")' so that the first frames involved in the blend overlap.

Apply Locomotion

The animation will be shifted by its locomotion.

This parameter is only available when Locomotion is set to Existing Locomotion.

Translation

These parameters manage how the position of the locomotion of the MotionClip will be computed and cycled.

When Sequence Cycles is set to By Blending Velocity, only Shift Axes is available.

These parameters are only available when Locomotion is set to Compute Locomotion.

Match Translation

The method of choosing the joint which will begin at the translation where the previous iteration left off.

None

Do not match translations.

Locomotion Joint

The joint provided in the Locomotion Joint parameter will be chosen.

Custom Joint

The joint provided in the Translation Joint parameter will be chosen.

Translation Joint

This joint will begin at the translation where the previous iteration left off.

Shift Axes

Choose on which axes to shift the cycles.

Orientation

These parameter manage how the orientation of the locomotion of the MotionClip will be computed and cycled.

These parameters are only available when Locomotion is set to Compute Locomotion.

Method

Specify around which axes to match the orientation. See below for details on the parameters for each of these options.

None

Do not match orientations.

Around Up Axis

Match the orientation around the Up axis of the character. The Up axis will be deduced from the viewport orientation option.

Up Axis

Specify which method to use when extracting the orientation around the Up axis. See below for details on the parameters for each of these options.

Use Joint Orientation

Extract the orientation by pulling out the Euler angles from the locomotion joint and uses those to extract orientation data around the chosen axis.

Direction Between Joints

Extract the orientation by specifying an extra joint and drawing a direction vector between the locomotion joint and the joint specified in Look At Joint. This direction vector will be projected on the relevant plane and used to determine the orientation around the chosen axis.

Look At Joint

Specify an extra joint that will act as the tip of the direction vector.

Around All Axes

Match the orientation around all axes of the character.

Custom

Customize which axis and which method you want to use for extracting the orientation of the character.

Rotation Order

Specify which rotation order to use when extracting the orientation from the character animation.

X Axis

Specify which method to use when extracting the orientation around the X axis. See the Up Axis above for details on the parameters for each of these options.

Y Axis

Specify which method to use when extracting the orientation around the Y axis. See the Up Axis above for details on the parameters for each of these options.

Z Axis

Specify which method to use when extracting the orientation around the Z axis. See the Up Axis above for details on the parameters for each of these options.

Attributes

These parameters are used to determine which attributes from the input MotionClip become animated on the output MotionClip.

For more details on what distinguishes an animated attribute from a rest attribute, see the Attributes folder on the MotionClip Evaluate SOP.

Tip

To maintain the attributes which were previously animated without adding any additional attributes to the poses, toggle Repack Attributes on, clear Rest Attributes, and set Animated Attributes to *.

Theses are the default values for these parameters.

Repack Attributes

When enabled, the attributes defined by the Rest Attributes and Animated Attributes patterns will be evaluated from the input MotionClip and packed into the output MotionClip’s poses. This will result in all of these attributes becoming animated attributes on the output MotionClip.

Rest Attributes

The attributes that should be unpacked from the rest pose of the input MotionClip. All attributes that match this pattern will become animated attributes on the output MotionClip.

Animated Attributes

The attributes that should be evaluated from the animated poses of the input MotionClip. All attributes that match this pattern will remain animated on the output MotionClip.

Blend

Method

The method of blending.

Preserve Length

Keeps the total length of each cycle the same as the length of the input MotionClip. Blends the end of each cycle to be first frame of the next cycle.

Overlap Sequences

Overlaps the end of end cycle with the beginning of the previous cycle.

Insert Blend Region

Inserts a region between the cycles where blending is done.

Blend Frames

The number of frames over which the blending is applied.

Blend Start to End

This enables blending from the end of the last cycle to the start of the first, allowing for seamless looping of the clip.

Locomotion

These parameters manage how the locomotion of the MotionClip should be blended. The parameters that affect the blend of the locomotion will be obtained from the parameters that affect the blend of a joint in the MotionClip.

Match Blend

The method of choosing the joint from which the parameters and attributes that affect the blend of the locomotion will be obtained.

None

No joint will be chosen and the locomotion will not be blended.

Locomotion Joint

If Locomotion is Compute Locomotion and Locomotion Source is Joint, the joint provided by the Locomotion Joint parameter will be chosen.

Otherwise, the __locomotion__ joint will be chosen.

Custom Joint

The joint provided by the Blend Joint parameter will be chosen.

Blend Joint

The parameters and attributes that affect the blend of the locomotion of this joint will be used to blend the locomotion of the animation.

This parameter is only available when Match Blend is set to Custom Joint.

Attributes

These parameters affect which attributes will be blended in the blend region(s) and the shape of the blend for each joint.

Point Attributes

The point attributes of the joints which will be blended in addition to the P, transform, and localtransform attributes.

Blend Mode

The mode used to determine how each joint is blended.

All Joints

All joints are blended using the same parameters.

By Joint Group

A set of blending parameters can be defined for any number of joint groups.

By Attribute

The blend shape and bias will be determined from point attributes in the rest frame of one of the two clips.

All Joints

These parameters are available when Blend Mode is set to All Joints.

Blend Type

The type of the blending function.

Linear

Linear shape.

Ease in

Smooth on entry.

Ease out

Smooth on exit.

Ease in Ease out

Smooth on entry and exit.

Bias

The bias of the blend. 0 biases toward the base and +1 biases towards the layer.

By Joint Group

These parameters are visible when Blend Mode is set to By Joint Group.

Number of Joint Groups

The number of joint groups to be blended between cycles. If a joint belongs to multiple groups, it will be blended based upon the parameters for the first group to which it belongs.

Joint Group

A group of the topology skeleton’s joints to be blended between cycles.

Blend Type

The type of the blending function for this joint group.

Linear

Linear shape.

Ease in

Smooth on entry.

Ease out

Smooth on exit.

Ease in Ease out

Smooth on entry and exit.

Bias

The bias of the blend for this joint group. 0 biases towards the beginning and 1 biases towards the end.

By Attribute

These parameters are visible when Blend Mode is set to By Attribute.

Blend Type Attribute

The name of the attribute which determines the blend type.

Bias Attribute

The name of the attribute which determines the bias.

Inputs

MotionClip

The MotionClip you wish to cycle.

Outputs

MotionClip

The MotionClip on the first input cycled the specified number of times.

Examples

SimpleMotionClipCycle Example for MotionClip Cycle geometry node

This example demonstrates how to use the MotionClip Cycle node to cycle an animation of someone jogging around a corner while maintaining the momentum of the character.

See also

Geometry nodes