Motion Capture guide for dummies (by a dummy)

Motion Capture guide for dummies (by a dummy)

Postby Danimal » 18 Mar 2015, 22:10

Eugeneloza asked about how to use motion capture (MOCAP from now on) to animate models, so ill expose it here for everyone interested to see.

Firstly, there are no mocap files for anything non human, so forget about anything non-bipedal (know of some good CC0 or CC-BY source? then please tell me), secondly, you need to have a good knowledge of Blender, i wont explain how to join skeleton to model or make a Nla track.

The best CC0 source of mocap files comes from Carnegie-Mellon, you must download the "Daz-friendly version" that has patched a lot of things, its over 1GB in 100MB long or so files

https://sites.google.com/a/cgspeed.com/ ... on-capture

Next download bvhacker, the tool needed to process them into usable:
http://davedub.co.uk/bvhacker/

What to do now? check "cmu-mocap-index-text" contained in all files to get an idea of what to find or find fast what you need, say you need a Walk animation, there are literally dozens of them, but after browsing trough them all, they all look the same, and could be categorized into a few types that repeat time and again, so get one walk animation you like and forget about the other walk animation. Overall i just created a few walks (big person, zombi, stiff person, woman, man... ) over 25 different ones with 2 or 3 in each group.
Special actions are more scarce, so you will only find a few files of swordmanship or gun firing.

So, you liked "120_03 - Mickey cast spell" mocap (being folder 120 one of the most cartoony and interesting), next is copying it somewhere else to preserve the originals, maybe now its a good time to create some new folders to categorize all the actions you need; i created "walk, run, attack, death, emotions, dance and idle" to fill as you process the files.
Going back to 120-03, install Bvhacker, its old and not maintaned anymore but has almost all needed options; open mocap file and it will show something like this:
Image

Steps:
- Prepare-> Set T position (if your models have a starting T position, if not, avoid)
- Hit "XYZ" button, or individually to clamp the mocap to the axis, "Y" clamping is a must or else the animation will fail later at Blender; Warning, Y clamping will mess up certain animations, you may need to use Y slider to fine tune those without clamping it. This will made the animation dummy be half buried into the ground.
Image
- Hit 1/2 Sample button until FPS counter is near 30.0 fps, the mocap has too much animation information, this will cut it to a good size; less than 30 will make the animation choppy and jumping.
- Hack-> straighten neck may be needed in some cases, it depends of your 3D model
- Now you can save it.
* Special cases: "the dummy is not looking towards me" hit rotation mode, use X Y sliders until it does (Warning! the programmer swapped them, X works over Y and vice-verse, that made me crazy for a bit); if that doesnt work, desist on that mocap file, the programmer never finished how to fix a certain kind of rotation, its useless, believe me.
Image

Next: Blender
Here you have a decision to make, use the skeleton that will be imported or re-target to your own bones, i strongly recomend using the imported skeleton so i wont explain re-targeting which is more time consuming and complex.
First step:
File -> Import -> Motion capture (bvh)
Change Scale from 1.0 to 0.15 (left corner) or try until it is as close as possible to your model in size (this depends on how big your model is)
Choose the imported skeleton and hit Ctrl + A -> rotation, scale, position <- If you skip this step EACH TIME you import an animation you are screwed up later
Now, join the skeleton and your model, if you dont know how to do this forget about mocap for now and start learning more Blender. You can modify the skeleton lightly to fit your model, big modifications of the skeleton will mess the animation.

Now to the good part, how to properly use it, this will import the whole animation, most likely with useless parts, its possible to cut it in Bvhacker but blender gives far more finesse, look for a nice cicle, that is, where the model animation position ends were it started or very close, remember that full cicle starting and ending frames, turn it into a NLA track, NLAs are really useful, for example, you can make several attack animations by cutting down a long sworplay animation.

Now you got one animation in, want to know something good? as the skeleton is already joined to the 3d model, any other mocap you import following the explained process will instantly be applied to your model without any other change (erase the new imported skeleton and keep the one you modified, the new animation is saved regardless), you can switch imported animations easily, to do that, open "Dope sheet" mode into a blender window, in the combox, switch from "Dope sheet" to "Action editor", a new combox will appear, in there you can switch all imported mocap animations. Only used animations will be saved when you exit blender, the rest are lost. With this you can easily prepare all animations you need for a given game model or perhaps the whole uncut animation is what you needed; that is a matter of what you are using it for.

An example of a model i animated using this way:

youtu.be/LQRmZQU2yW0

Room to improve: you can add more bones to the initial ones, since mocap doesnt include fingers, mouth or eyes animations, it depends on how detailed you want the final result, you may also want to smooth animations with the graph editor.

Final notes: in the library i told about , there are not any death animations, so i had to get creative and cut animations of people sitting or falling down. So if you dont find something on it straigh away you can look for a similar action. Also, if you have a kinect you can make your own captures!
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

Re: Motion Capture guide for dummies (by a dummy)

Postby eugeneloza » 19 Mar 2015, 09:27

THANKS A LOT!!!
User avatar
eugeneloza
 
Posts: 500
Joined: 22 Aug 2014, 12:15
Location: Ukraine

Re: Motion Capture guide for dummies (by a dummy)

Postby Bertram » 19 Mar 2015, 14:06

Added a link to it from the wiki: :D
https://github.com/OpenDungeons/OpenDungeons/wiki
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Motion Capture guide for dummies (by a dummy)

Postby oln » 19 Mar 2015, 15:51

Maybe this should be in the general forums, as it's not opendungeons-specific and could probably be of use for others.
User avatar
oln
 
Posts: 1020
Joined: 26 Oct 2010, 22:16
Location: Norway

Re: Motion Capture guide for dummies (by a dummy)

Postby Danimal » 19 Mar 2015, 15:53

who can move it?
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

Re: Motion Capture guide for dummies (by a dummy)

Postby hwoarangmy » 19 Mar 2015, 16:41

IMHO, it would also be nice to copy it to our wiki (instead of a link). If nobody does it before, I will try to do it tonight
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Motion Capture guide for dummies (by a dummy)

Postby hwoarangmy » 19 Mar 2015, 21:14

The page is here:
https://github.com/OpenDungeons/OpenDun ... ture-Guide

I couldn't upload images so far. @Bertram do you know a simple way to do that ?
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Motion Capture guide for dummies (by a dummy)

Postby Bertram » 21 Mar 2015, 13:33

I couldn't upload images so far. @Bertram do you know a simple way to do that ?

Yep, clone the wiki repo, using the write URL and push images there:

{l Code}: {l Select All Code}
git clone git@git://github.com:OpenDungeons/OpenDungeons.wiki.git master


Once that is done, you can use image links like I used in this page:
https://github.com/OpenDungeons/OpenDun ... n-OD-style

Hope this will help. :)

Best regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Motion Capture guide for dummies (by a dummy)

Postby hwoarangmy » 21 Mar 2015, 18:18

Bertram {l Wrote}:Yep, clone the wiki repo, using the write URL and push images there:

{l Code}: {l Select All Code}
git clone git@git://github.com:OpenDungeons/OpenDungeons.wiki.git master


Once that is done, you can use image links like I used in this page:
https://github.com/OpenDungeons/OpenDun ... n-OD-style
What a hack :cool:
I wouldn't have guessed that. Can't believe there is no easier way to upload an image (but from what I've googled, it seems like there isn't).
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Motion Capture guide for dummies (by a dummy)

Postby hwoarangmy » 22 Mar 2015, 21:45

For the record, the how to have been copied to:
https://github.com/OpenDungeons/OpenDun ... ture-Guide
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Motion Capture guide for dummies (by a dummy)

Postby Bertram » 23 Mar 2015, 11:06

Cool, thanks for the page migration. :)

What a hack :cool:
I wouldn't have guessed that. Can't believe there is no easier way to upload an image (but from what I've googled, it seems like there isn't).

Yeah, I still wish there would be one and maybe github will make it easier one day. :)
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Who is online

Users browsing this forum: No registered users and 0 guests