nav2

Showing posts with label motion capture. Show all posts
Showing posts with label motion capture. Show all posts

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.

Wednesday, February 2, 2011

some models for the mocap and progress on pbank

The animation of piggy bank has gotten a bit longer than expected. The plan was 2 minutes and now its getting a little longer than 4. Truth be told, I hardly work on it lately because of all the other assignments and the part time jobs (I have two of them would you believe it). My plan is to render it when its absolutely perfect. If this was my job and I was getting my bills paid while working on it every day, I am pretty sure it would have been ready ages ago! It's the polishing that eats most of the time- getting those curves and the timing to work well. I am still relatively new to this 3d animation business, but that doesnt stop me from having high standards and be critical with the work.

You see, its not perfect and when its not perfect, I just dont render and post it. :)

It will be probably ready for the festivals this year, so anyone interested to send/suggest invite for events, please feel free to drop an email with the info.I do appreciate that sort of attention :)

The Mocap assignment
So this semester I signed up for one extra module that I believe will be a good addition to my portfolio, especially if I apply for work as an animator for video games. Motion Capture has been around for quite a while now in industry and we've all seen plenty of good ,bad and ugly examples of its use. My personal opinion about it is more or less the same as any other I've heard from classic animators. The truth is that the moCap data is often awkward when applied to the body of a character. I believe that is due to a number of reasons- one being the movement of the actor (often not an actor) not fitting the design of the character.The timing of the movement is too realistic and snappy, it has some random rubbish that needs to be cleaned up (like random gestures). It will never be able to replace good old fashioned animation, but it certainly will continue to be part of what industry needs, especially for sports games. What I hate about the majority of Mocap is just it's mediocrity and genericness.Generic people doing generic things- fighting, running with guns,doing some sports... That is why my goal with this module will be to give character to my characters, make them unique!

Speaking of the that, let me start by introducing them :

yet another character that I designed and modelled- I call him scissorman
Scissorman aka The Sepia Baron
I created this character as a tribute to classic horror game "Clock Tower".. You might notice my strange obsession with stripes is present here as well. He is kind of like a limping clown. The scissors are there to cut off the next character's head off.

rose creature concept
Plant man aka "The scarlet torn" is a character that I created a year ago. The idea for him came from my obsession with venecian masks+ Edgar Alan Poe's short story
I studied Philology back at the university of my country years ago, so that helped me develop some literary taste and some understanding of ancient to 19th century culture. Ok, enough bragging from me xD moving on

So as you imagine, I will have to model these characters. Well guess what, I already did. I want to talk a bit about the process and some tricks I developed to speed it up. Both characters took two days to model and I spent about 10 hours in total to do them both.
Starting with Z-brush, I first sculpted a high res plantman. Then retopo-ed and UV-ed it in 3d Coat. Getting him back in maya, I started adding the detail that will be on separate meshes (to ease skinning).

The hair, roses, thorns, leaves and so on was all made with CV curves in maya.

Moving on to scissorman,I did him from zspheres and there was no need to retopology, due the nature of his design- Just a bit of extra work in Maya to get the right amount of geometry where needed. I got to the conclusion that the bit that takes me the most time during modeling and is usually the most boring part is getting the topology of the hands right. So, I decided to make a set of hands to reuse in my pipeline, by just attaching them to the model. I made the first hand purely in Maya. It is as low poly as possible. Then I made 3 variations of it, each having a different number of vertices at the connection point- the wrist.



So I took one of them and just stitched it to scissorman and made some minor modifications in the shape. The topology is the best of what can be done on a non realistic character. I dont want to sound a bit arrogant by saying this and it usually happens when I am being critical, but I've seen ALOT of bad topology on hands on the internet. I know mine is no masterpiece too, but some of them real bad ones are being sold for a fortune at cg store websites. :D It's mind blowing. Have they no shame?



Moving on to UV mapping, I realized that I dont really need to use different space of one uv shell, if its going to be exactly the same as it's symmetrical counterpart. So when I uv-ed scissorman, I made sure that his left and right hands,arms, feet, and so on have the same uv shells. So after unwrapping them in Blender (of course- because its much much much better than maya at this) what I did was flip over and lay the left side uv shells over the right side ones. So the left and right hand of the character would occupy exactly the same place in UV space.

The one disadvantage of this is the obvious inability to be asymetrical with the texture.
The advantages are too good to pass on though- Not only do I have to paint only one side of the model at certain parts, but I get to give them all more UV space, more pixels for the texture!


The mocap data is going to be put into short loop sequences that can be used for a game. So the big picture is , if this works out nicely, we will be able to assemble a team of other students from gamings course and import this stuff in a mini UDK or other engine project. I am not going to go into detail about the game at this point, as it is not clear if it all will work out..