Jump to content
Sign in to follow this  

Mocap / add locomotion

Recommended Posts

I'm working on a project that is using data from a Rokoko mocap suit. The raw data that I get from the suit has the hip joint static and all the other joints move relative to that. In their capture app, they provide a way to add locomotion by setting when each foot is planted and then internally calculating the resulting hip motion. But I don't love the way that their app is solving the motion. I loose some of the finer detail in the captured motion and everything starts to feel a little loose and float-y.

I'm wondering if anyone has ideas about how to build a custom setup in Houdini that does the same thing. I've got some ideas, but this seems like something you might have to do in building crowd sims, so I thought I'd see if this is a problem that already has a solution before I go off and re-invent the wheel.

I've attached a project below to show the same clip with and without the post-processed locomotion.

Thanks in advance for any ideas.


Share this post

Link to post
Share on other sites

For anyone interested in this admittedly niche question, I spent some time earlier this week setting up a solve for this. I haven't fully tested it, but it's a start. Since there's still so little KineFX info online, figured I'd post it here in case it helps anyone... Personally, I learned some cool new stuff about how to manipulate motion clips that I thought was very handy.

I tried two different routes, one of which I abandoned midway through, but which still has some useful applications.

In both, I used a stabilize joints SOP to set the foot plants manually (you can do this procedurally as well, but most of the time I prefer to do it manually). Then, instead of actually stabilizing the joints, I just wrote out attributes. As a side note, I wish there was a way to set up another stabilize joints SOP downstream that would re-use those attributes, but I couldn't figure out a way to do that and the goal here was to only set the foot plants once and then have everything calculate from there.

Direction 1: On each frame where a joint was planted, I calculated the vector it moves between that frame and the previous frame and I offset the planted joint by the inverse of that vector to stabilize it. I then added that vector to an offset variable that updates each frame so that I've got a record of how much I'm moving the feet joints to stabilize them and I add that back into the newly created locomotion joint (you could add this movement directly to the hips, but for testing it was a little easier to see what was happening on a new, static joint). That transferred the x and z-axis motion of the feet while they are planted to the locomotion joint and moves the hips in space.

From there, the plan was to go back and do a second pass to lock down the feet. But I started thinking that it was a mistake to start with the hip movement. Instead I should lock down each foot completely and then transfer some portion of both offsets to the hip. Plus, after diving inside the stabilize joints SOP to try to answer a different question I, I started to realize that maybe there was a better way to approach the whole process of cleaning up the mocap data:

Direction 2: Is the same basic idea, except that I convert the mocap into a motionclip and then just do the same basic procedure of offsetting the stabilized joints, recording that offset to a variable and then adding that offset to the hip joint so that the hips better follow the planted feet. Converting to a motionclip meant not having to rely on a simulation (although the original solver was very fast). But it also meant that once you'd created the motion clip, there's all kinds of other smoothing and filtering you can do at that point which was much simpler to do.

Anyway, hope it's useful.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this