nav2

Saturday, June 4, 2011

the mocap assignment

One of my optional modules for university this year was motion capture. The reason that I picked it over concept art and facial animation is simply the fact that motion capture technology is something rare and hard to get access to. One of the unique aspects of the University of Bradford is indeed the fact that we have a motion capture lab here.

I've been blogging about this in the past, so there is no point in introducing you the project again. Instead, what I like to do is just present you with the end result and share with you what I learned by going through this trial.
My hope is that next year students picking this module will avoid making my mistakes while capturing the data.

So here goes a short video. Please, use the pause button to read the text.



The skinny guy , holding a pair of wooden sticks is yours trully, trying this for the first time. My tutor intentionally (i bet) "forgot" to warn me about some things on the day we did this.I am thankful for that, because sorting them mistakes out later on was a valuable experience. It taught me how to correct badly shot mocap data xD

The goal? Record mocap data and sample some of it, then turn it into loop cycles that can be used in a game engine. Those sampled actions (some looping) have to smoothly blend between each other.

So lets go through this thing. First of all , HERE is a report I did for uni about motion capture technology as it is today. It looks at the limitations of the current approach and what the promises of the future might be to sort them out. Written in simple english, it should be easy for non technical people to understand it. :)

And HERE is a very very non informative and dry list of the things I did to get my loop cycle.

1. Cleaning it up in Blade-1.7.
The main problem there was really dissapearing markers. Markers switching names (especially the wrists). The software is NOT very smart at this.In fact, if you try to do things automatically, you are left with a mess most of times that leave more work to fix than doing it all manually. So I did manually. Thank god in this I didnt roll on the ground or didnt fight with the other guy in the suit from very close. Things like that are sure to leave a lot of work in this step.

This is what happens if you callibrate the character in Blade and you have not cleaned up the data completely.



Blade is known to be very unstable, but it didnt really crash on me- not really.

2.Getting the data to Motion builder 2011 and sampling loops.

Here is a honest rant on why I found MOBU to be one annoying piece of software.
Motion builder is somewhat unstable and has some usability bugs too. You would expect from such an expensive piece of software to be more polished. First of all, when you start it at first, the way it organises its windows on the screen suggests that it doesnt know what resolution your screen is and its set for a screen with very low one. So I had to move them around on every start (annoying as hell) until finding out that I can actually save myself a custom layout that will remember the new size and position. Then there was the memory leak problem. Mobu has a thing about consuming 90% of cpu while running, even when you dont actually do anything with it, even without a file loaded. Looking at the task manager I found out that if I leave it on and go get a coffee or something, there is a risk that my laptop's CPU would melt in an hour.
I had to get used to new shortcuts in order to use it. Yes I know that it has a preset that lets you use maya's shortcuts. But let me ask you something. Say you set it up with maya keyboard preset and then you have to assign markers to body parts of an actor. How do you do that then? Thats right, you can't alt and drag and drop while its using maya presets (try other modifier keys- ctrl,shift..nothing worked). You have to switch back to MOBU's presets to do that. And I tried and tried and tried to find what the assigned shortcut for that is for the maya presets. I couldnt. All I found was a guy at the official MOBU forum telling another to switch to the MOBU preset and learn that.

That is the biggest problem with motion builder - not a lot of documentation. A few pdf files, a few video tutorials on youtube and that was all. Not being able to research it properly before using it annoyed the hell out of me. So I was very much forced to try things and see if they work.

What were the advantages of Mobu and the reason people use it for this sort of work?
Mobu is very good at retargeting animation and non destructively editing it. Its all FK rig can be very useful for animation. I used it to retarget my mocap data to the character. So there are two approaches that I tried:
- using the point cloud to drive an actor and then retarget the actor to a rig, which drives the character: point cloud-->actor-->mobu rig-->charactorr
This approach proved to be more of a hassle and gave less precise results.

-Using the imported Blade skeleton to drive a mobu rig, which drives the charactorr:
Blade rig(already driven by point cloud)--some retargeting settings-->mobu rig (to layer some animation and be able to sample)--> character(end result to be exported to maya)
This second method is more precise. The first method with the actor , one has to set the actor (blue guy) to fit the point cloud. That turned out to be a pain to do because I did the silly mistake of t-posing in character (hunched and even with a fake hunchback-pillow under the black suit). My rig from maya was set to fit the character mesh- which is also in a slightly hunched pose. What I got out of that was simply one extremely hunched character- so:
Hunching actor+ hunched rig= result is too hunched, needed to reduce the hunching
hunching actor+ normal rig= better result, without that much to fix

The other thing that had to be done for this to work in an engine was to stop the actor from moving in space. I used a "inplace" modifier, which just mutes x,y,z of the root joint. I locked only X and Z.


I used its story mode to sample a couple of seconds and turn them into the final loop. In order to have a loop , one needs the action to end in the pose that it began. That was very easy to do with MOBU- just copy the pose and layer it over. It smoothly blends it. Then exporting that rig with the keyframes is easy as 123- just save it as fbx. When I imported that FBX in maya, where my character (target) rig was, because its name was the same, my already skinned character just snapped into position and started moving properly. But then watching it again and again, frame by frame, I found that there were issues with the data.



3. MAYA- more rigging work and fixing posture

1. the mocap suit hat was put on a wrong angle- instead of two front and two back markers, I had one marker for front,back,left and right. This made the rig think that my character's head is constantly twisted to a side.
2. the mocap suit right foot heel marker- because that marker wasnt leveled with the ground (like the one on my other foot), it caused the rig to think that my foot is constantly bent and going through the ground.



I fixed all these by using animation layers and also deleting some keyframes. The scissors are an automatic rig that is being driven by the hand joints.

Dont forget that this is all done very amateurishly and in a hurry. A good motion capture work is not something that someone who is learning the ropes can do.

Final verdict: This would have taken much less time and effort to just animate. Cheaper, faster, easier. Motion capture technology today is too expensive for a freelancer to use- both in time and money.

No comments:

Post a Comment