Blender Motion Kit is a set a scripts that allows to export
animation to bvh file format
Blender Motion Kit was introduced in Blender 2.40 RC1, because in this
version, IK solver wasn't providing access to armature's data while IK
Solver was working. In 2.40,
It allows to use animation produced by IKSolver into Blender game engine through the use of body parts controlled by ipo.
Blender Motion Kit contains the following scripts:
script that export animated empty-based chain to a bvh file.
a script that quickly build empty-based chain upon a parented
bvh_import script of campell Barton for 2.40 RC1 (Campbell Barton is
reworking his own script in a better way than mine for official 2.40
Release .. so please use preferably Blender's official bvh_import
Blender Motion Kit relies on the principle that, even though we can't
information from bones (in 2.40 RC1), we can still attach
to bones, and then get bones rotation and position information from
these empties. Thus .. a typical IK Baker session is divided into 3
After creating the armature you want to animate .. create
for each bone of your armature and attach them to the bone. This step
is eased by the use of Arm2Empty.py script
After animating your armature ... export it to bvh format
to IKBaker.py script
once your animation is exported into a bvh file ..you can
it by using bvh_import.py script
TO INSTALL THIS KIT ?
Copy IKBaker.py, Arm2Empty.py
into the ".blender/scripts"
directory of your Blender installation.
In a Script window, go to the "Script" menu
and click on "Update
USE THIS KIT ?
Here's a little tutorial showing the key step of an IK Baker session..
Create your armature
In a 3D view, press Space, Add-->Armature, Ctrl-LMB
to add bones. If you want to add a bone at a specific point of the bone
chain .. select this point while in Edit Mode on the armature .. and
Ctrl-LMB click to add bone.
Run Arm2Empty.py script
In a Script windows, go to menu
You should get somehting like that : (for each bone of you armature ..
an empty was created with the same name, location and rotation of the
Leave Edit Mode and Create contraints upon empties so that
follow their associated bone
<>Press Tab, select an empty by RMB-clicking on it, Press
Contraints panel .. click on Add Constraint --> Copy Location.
OB: field .. entrer the name of your armature .. a field BO: appears ..
enter the associated Bone name (the same as the empty's name). Do the
same to add a Copy Rotation constraint upon the same empty
Repeat the previous operation for every created empty ..This is the
fastidious step in the process ... you have to add 2 constraints to
every newly created empty .. but don't worry .. once it is done .. you
can use this work for every animation you want to bake.
The following image shows the contraint configuration for a given empty
(named Bone in the figure)
Note that the name of the bone to which the empty is constrained is the
same as the empty's name
At this point I recommand that you save your work (Ctrl-S) .. it was
fastidious not to risk a complete lose..wasn't it ?
We are now ready to animate our armature ..
Add IKSolver on an end effector of your armature ..
Select your armature by RMB-clicking on it .. Press Ctrl-Tab to enter
Pose Mode .. Select a end effector bone .. it becomes blues .. Press
Ctrl-I to had a IK Solver contraint upon this bone.. in the appearing
menu , select To New Empty .. (that's just an example .. you could also
use a Without Target IK Solver contraint)
In our example .. we use a 3 bones long IK chain ..
At this point, you can test your IK chain by grabing the empty created
in the previous step .. you should see bone and their attached empties
moving while you're grabing the target Empty.
We now have an armature that we can animate through the IKSolver. Let's
see how to make the animation.
Animate the target empty.
Enter Object Mode (Ctrl-Tab) .. select the empty by RMB-clicking on it
.. insert a key frame animation (I--> LocRot) .. go 10 frames
(UpArrow) .. Grab the empty to a new location (G key .. move mouse and
LMB-click on a new location) and insert an other animation key
LocRot) .. Check your animation (press Alt-A and Esc) ..
Configure animation length ..
Press F10 to go to Scene Parameters .. in the Anim Panel.. set up Sta
and End field so that they cover your whole animation.
Run IKBaker.py script
Select your armature by RMB-clicking on it ..In a Script windows .. go
to Script-->Export-->IK Capture (.bvh). A file selector
to allows to choose target bvh file location and name .. (the defaut
name is the one of your .blend file with a .bvh extension) .. Click on
Export BVH .
You now have a .bvh file representing your animation .. to load it ..
follow the steps below
Open a new Blender session .. and run
Save your work (Ctrl-S) .. start a new session (Ctrl-X) .. Go to menu
File Import --> IK Capture (bvh)..in the box appearing .. click
ARE THE LIMITATION OF THIS SCRIPT ?
Armature must be made so that each bone's head corresponds to
parent bone's tail .. there can't be some hole in the chain.
If your Blender file contains several aramatures .. there must not be
any common name between these armature.