Blender Wokflow: Using motioncapture files for character animation

Actually what I was talking about in that thread was more of a wobble (the whole character moves oddly).  Its because in those BVH files there is a root bone that HAS transforms being performed on it, and the importer doesn't take that into account (assumption was made that root bone would have no transforms). 



All you need to do is:


  • go into edit mode (editing the armature)

  • select the "hips" bone (its teeny, tiny)

  • then extrude (press e), which will create a new bone (hint: name it rootBone)

  • then in the buttons window (should be bottom), swap the parents of the bones (de-parent new bone from hips and make hips a child of new bone)

  • At this point you can (optionally) not allow deformations on the new bone by deselecting the 'deforms' button (with new bone selected)



If that doesn't get you through it let me know and I will take some screenies...

As far as the shaking goes, in the documentation it states that the higher number capture data is of better quality than the lower numbered ones.  I selected 16, which has some slight shaking (in the hands mostly) in a couple of the BVH files, but most seem pretty clean.

ok, i see, and i ment one the one hand the "shaking" of the hands, the neck or the toes… but on the other hand the "wobbling" which can be seen if you delete the translation and rotationcurves on the hipbone. This is happening after importing the model into jme as well.



Smoothing the curves (in the IPO-Curve-Editor) of the "shaking" bones reduces it a little.

What sucks is, that you are not able to call "smooth all curves" on an armatre.

You have to select one bone after another.

But im asking on blendpolis.de and blenderunderground for some hints, how to write a simple pythonscript that iterates over all bones of an armature and call "smooth IPO Curves".



good n8

adding the rootBone fixed the wobbeling… of cource i wasn't expecting something else if you said so :wink:



fine!

so i guess we can call the Workflow from blender to jme "complete", and i will write a step by step tutorial until the end of march. Time is valuable theese days, because i have some events to drive to.



A script which smoothes all the IPO-curves would be nice to have, but lets see if i get this done in a few days.

One thing i recognized by smoothing too much is, that for example the range of the steps shrink of course, because the values of the curves get altered.

But calling "smooth" one or two times should be fine.



I guess this will be pretty nice for the community, because all the "programmers" do not need modelling/animation artists necessarily.



Thanks for everything!

greetz


hm, another small problem arised…



by parenting and connecting the hip to the newly created rootBone, the xyz-movement of the hip is restricted.

But for some animations you need some slight movement of the hip. 

For example if some character should shift it’s weight from one leg to the other, the hip has some slight x movement. But if the hip is fixed at the rootbones position, it can’t move - but the legs and the spine is moving as they do with hip movement… looks strange.



Do you have an idea how to achieve that the hip is still able to move a bit?

If i don’t connect the hip to the rootBone the whole armature moves to somewhere else, because there is the difference between the restpose position and the posemode position. So this is no solution because you get problems in jme, having a huge boundingbox when the rootbone stays in position while the rest of the armature moves to somewhere else. This sucks for collisiondetectin amongst others.



I thought about limit the distance that the hip is allowed to move from the rootbone. But it seems to be impossible to use constraints (limitDistanceConstraint), because these are functions of blender and you don’t get or alter any keyframes of the action.



The same behavior appears if you NULL the x/z position of the hip in bvhacker.

An example .bvh can be found here

i know its not croped perfectly



greets