foot contact correction in mocap — anyone found a non-terrible workflow?

197 views 11 replies

Been deep in mocap cleanup hell this week and foot sliding is still the thing that makes me want to throw my laptop. Got a reasonably clean Rokoko session, body motion looks good, but the feet are skating on any slow walk or gradual weight shift. Classic.

My current approach: identify contact frames manually, lock a foot IK target to world space for those frames, bake it back down, clean up the blend in/out by hand. It works but it's slow and doesn't scale at all when I'm processing a lot of takes.

Tried MotionBuilder's auto-contact detection and it's honestly hit or miss. It catches clean hard-surface contacts fine, but anything with a gradual shift, a slow creep, a cautious step, either gets missed entirely or creates these horrible micro-locks that look worse than the original slide.

I've been thinking about writing a Python script that:

  • detects contact frames by velocity threshold on ankle/toe bones
  • auto-places locked IK targets at those frames
  • smooths the transition in/out with a configurable blend window

But before I go down that rabbit hole, is there something obvious I'm missing? A MotionBuilder plugin that handles this well? A Blender addon worth trying? Or is everyone just doing this manually and I'm the sucker trying to automate it?

Also curious whether anyone's had luck with the contact detection threshold specifically. Right now I'm tuning it by eye on a per-session basis which feels wrong.

something that's helped me a lot before touching any IK pinning: doing a tangent cleanup pass in the graph editor first. mocap data imported into blender tends to have auto-tangent handles with tiny overshoot artifacts around keyframes. nothing visible on its own, but when you layer IK constraints on top, the constraint ends up fighting these micro-bounces and the foot looks slightly floaty even at full constraint weight.

flatten the tangents specifically on the frames you've identified as contacts (switch to linear or constant just for those keys) before setting up any pinning. takes maybe 10 minutes on a full session and the constraint behavior gets noticeably cleaner. the foot actually stays where you put it instead of drifting a few millimeters over the next two frames and making your whole pin feel soft.

Replying to NebulaRunner: Something that helped me a lot before touching any IK pinning: doing a velocity ...

the velocity approach is underrated and i took it one step further and built a "contact probability" curve by normalizing the inverse of foot velocity. values near zero speed map to near 1.0 contact confidence. when you plot that across a whole session, foot sliding shows up as noise during what should be clean, flat contact windows. way easier to read at a glance than raw velocity numbers.

wrote it as a blender script: world positions per frame, frame-to-frame delta, normalize and invert. maybe 90 minutes to write and i've used it on every session since. absolutely worth the time.

Replying to FluxStone: the velocity approach is underrated and i took it one step further and built a "...

velocity alone got me in trouble for a while. a slowly sliding foot still has near-zero velocity right before it starts properly sliding, so my contact detector was firing on "almost planted" frames and pinning the foot slightly too early. switched to tracking the derivative of velocity (basically acceleration) and got cleaner results: if speed is low and dropping, that's probably genuine contact. if it's low but stable or rising, the foot is still in transition.

also ended up thresholding x and z axes separately because feet can have near-zero vertical velocity while still sliding horizontally, and the single-value approach was silently missing those entirely. spent an embarrassing amount of time wondering why contact detection worked perfectly on landing impacts but totally failed on shuffling footsteps before i caught that.

facepalm slow motion
Replying to AuroraRunner: One thing that sped up foot cleanup a lot for me: before touching any IK constra...

This is the right order of operations and I wasted a full day learning it the hard way. Trying to identify contact frames while also wrangling IK constraints means you're constantly second-guessing yourself: is the foot looking wrong because the contact frame is off, or because the IK is fighting the FK data? Separating the passes removes that ambiguity entirely.

One thing I added: I keep a simple per-take annotation file alongside each clip, just plain text with frame ranges where each foot should be planted, and reference it during the IK pass instead of re-identifying contacts from the viewport. Sounds tedious but having it written down made the constraint pass noticeably faster since I wasn't constantly scrubbing back and forth to verify what I'd already figured out.

finally organized notes productivity

One thing that really improved my cleanup workflow: treating contact identification as its own completely separate pass, disconnected from any IK work. Before touching constraints, I export the vertical position curve for each foot joint and find the local minima. Those are your candidate contact windows. Then I verify the foot is also moving slowly horizontally during those same frames to confirm it's actually planted and not just at the bottom of a step cycle.

The result is a frame-accurate contact map that answers "when is this foot down" before I open MotionBuilder or touch a single IK key. The actual pinning pass becomes almost mechanical because all the judgment calls are already resolved. I do this in a spreadsheet, which sounds archaic, but it means I'm never making decisions and doing work simultaneously, just executing against a plan.

The workflow that actually helped me with Rokoko foot sliding was doing the contact pinning pass in MotionBuilder before taking the data anywhere else. Set up IK effectors on the feet, keyframe-pin them at the contact frames, and let the solver handle the leg geometry. It's not perfect, but the residual cleanup afterward is way smaller. You're fixing small oscillations instead of whole-leg drift. Doing that same work manually in Blender's graph editor is rough because correcting one rotation value cascades through the whole leg chain and you end up chasing it forever.

Also worth double-checking: make sure you're exporting at the session frame rate. I had an entire session I thought had foot slide that was actually a 60fps-to-30fps bake interpolating straight through contact frames. Lost two hours to that one.

facepalm slow motion

Something that helped me a lot before touching any IK pinning: doing a velocity analysis pass first. Compute the world-space velocity of each foot bone frame-by-frame and mark where it drops close to zero. Those are your actual contact frames, and they're usually more reliable than trying to identify them visually on the curve editor.

In Blender you can script this fairly quickly. Iterate the action's FCurves for the foot location channels, compute finite differences between adjacent sample values, and either write the results to a text block or use them to insert markers directly on the timeline. The velocity data also makes it obvious when the capture itself had a problem. You'll see frames where foot velocity spikes mid-contact, and no amount of IK pinning will fix that cleanly. Better to know before you spend an hour on it.

Replying to NebulaDusk: This works well if you have a MotionBuilder license, but for those stuck in Blen...

tbh this is the approach i've been using too but the "key the empties at contact frames" step is where it falls apart for me speed-wise. have you tried baking the full IK action on the empties first to get a dense keyframe set, then deleting everything that isn't a contact frame? still manual but at least you're working from baked positions instead of trying to estimate where the foot actually landed. makes the cleanup feel less like guessing and more like editing.

Replying to VaporWren: The workflow that actually helped me with Rokoko foot sliding was doing the cont...

This works well if you have a MotionBuilder license, but for those stuck in Blender, a passable substitute is baking IK constraints on the feet. Set up IK constraints targeting empties, key the empties at the ground contact frames where the foot should stay planted, bake the full action with the constraints active, then remove them. You still have to identify and mark contacts manually, but at least you're not adjusting rotations frame by frame.

Not as clean as proper MB pinning, but it gets the sliding down to a level that's actually fixable in cleanup rather than looking completely broken on playback.

Has anyone tried routing mocap data through Cascadeur specifically for foot contact cleanup before taking it anywhere else in the pipeline? I started doing this about six months ago and it's become permanent. The physics-based foot pinning tools feel more interactive than anything I've used in MotionBuilder for this specific task, and since it imports and exports FBX cleanly, it doesn't require major pipeline surgery to add.

The AutoPhysics pass is hit or miss on complex motion, but the manual contact pinning tools are fast once you know them. Curious if others have tested it with Rokoko data specifically. My sessions have been coming in pretty clean, so I'd be interested to hear how it holds up on noisier captures.

One thing that sped up foot cleanup a lot for me: before touching any IK constraints, do a dedicated pass in the graph editor just to identify and mark the frames where each foot should be fully planted. Select the foot bone, look at the world-space Z translation curve, and find the local minima that correspond to actual contact. Mark those frame ranges explicitly before you do anything else.

Once you know exactly which frames are contact frames, all the correction work has a clear target. You're not scrubbing through the viewport trying to feel where the slide begins — you have specific ranges to work within. IK pinning or manual curve flattening is much more targeted that way. Doesn't remove the work, but removes a lot of the guessing about where to start.

Moonjump
Forum Search Shader Sandbox
Sign In Register