Studio Yotsuba
Back to Node List

Clip Loop Fit

clip_loop_fit

Appends the first key state at the clip length (frame D) so exported frames 0..D-1 stop just before returning to the start

Reviewed
Guide available

Input Ports

NameTypeDescription
Clip
clip
AnimationClip
AnimationClip document to loop-fit
Progress
progress
Float
Optional normalized progress (0.0-1.0). Leave unconnected to follow the animation time.

Output Ports

NameTypeDescription
Clip
clip
AnimationClip
Loop-fitted AnimationClip document
Layer
layer
RecordedLayer
RecordedLayer bridge view of the fitted clip
Value
value
Map
Evaluated fitted clip values at the requested time
Summary
summary
Text
Short summary string

Overview

Automatically adjusts a clip so it joins seamlessly in a loop. It copies the initial state to the end to eliminate the jump from the last frame to the first. Place it near the end of a repeating motion such as a walk or idle animation.

Usage tips

  • Place it immediately after the clip: keyframe_clip → clip_loop_fit → clip_apply_*. Even if you did not account for looping while recording, you can close the clip afterward with this node.
  • If the recorded final pose differs greatly from the initial pose, this effectively adds a "return" motion at the end. If the return is too abrupt, adjust the end of the recording closer to the initial pose.

Related nodes

  • keyframe_clip — the clip to adjust
  • clip_mixer — you can also fit the loop after mixing
  • clip_apply_path / clip_apply_image — apply the adjusted clip

Technical details

Internally, the node uses loop_fit on RecordedLayer to add each track's initial state at the end of the duration. It is a helper for making short loops join cleanly at the clip stage.

Examples

  • Pass the output of KeyframeClip through ClipLoopFit, then send it to ClipApplyPath / ClipApplyImage.

Closure, not periodic wrapping

Clip Loop Fit adds the first sample at the duration endpoint so the endpoints match. It does not wrap evaluation times outside the duration. Use a looping progress source when periodic playback is required. progress is normalized 0–1 and evaluates progress × duration (frames). Exporters (keyframe_clip spritesheets and animation_render) sample frames t=0..D-1 of a D-frame duration, so the last frame of a loop-fitted clip stops just before returning to the start (loop rule D7).

Back to Node List