Skip to main content

Find Best Loop

Mocap idles never loop where the recording happened to start. Find Best Loop searches the whole take for the frame window whose endpoint poses - and pose velocities - match best, then trims to that window and (optionally) runs Make Loopable to close the remaining seam. One click from raw idle recording to a cycling clip. Output suffix: *_BestLoop.

Panel: Motion → Best Loop (beside Make Loopable). Context menu: TakeForge → Find Best Loop...

How it works​

Every pair of frames at least Min Loop Seconds apart is scored by pose-space distance (all bones' local rotations and positions, root travel excluded) - and by the distance between the following frames too, so the motion crosses the loop point with matching velocity, not just a matching pose. Long takes are searched with a coarse stride first, then the winner is refined exactly.

The dialog shows the result up front:

Best window: frames 118-364 (8.2 s), endpoint mismatch 0.31

Change Min Loop Seconds and the search re-runs live. Mismatch is a per-bone RMS - roughly, values under ~1 loop invisibly, under ~5 clean up fully with Make Loopable.

Options​

OptionMeaning
Best WindowRead-only: the found window and its mismatch score
Min Loop SecondsShortest acceptable loop (default 1 s) - raise it if the found window is too short to be useful
Make LoopableBlend the trimmed clip's seam closed too (default on)
Create New AssetNew *_BestLoop copy (default) or in-place rewrite

Scripting (analysis; compose with trim_to_range + make_loopable to apply):

ok, start, end, mismatch, err = unreal.TakeForgeLibrary.find_best_loop(seq, min_loop_seconds=1.0)