Rigify and Game Engine

I’m having a problem,actually two problems, and I really need help… I’m fighting it for hours now… Since it’s my 1st attempt to rigify and BGE i’m not sure what i do wrong. I know this move is crappy and i’m going to change it but i want to solve this problem 1st. Ok… to the point.

  1. The animation i did looks different in anim player and different in game engine. In BGE my character doesn’t bend his feet. Also when i start “game” from idle pose animation for both idle and walk (activate by right arrow) looks totally different from when i start it from walk pose (change action in Action Editor from idle to walk). His feet are like frozen in position i have selected in time line. I hope you know what i mean :smiley:

  2. After changes in pose mode and if i save the file and re-open it says object is missing from scene. The rig from last layer just disappear. I’ve noticed that in object properties tab meshes of this rig are named on red. After i move them and simply ctrl-z they are no longer red… And now i can save and leave blender :smiley: Other way i loose rig from last layer. Is it bug or i totally messed something ?

I hope everything i said is clear :slight_smile: If not please ask.

Thank you

.blend file - http://www.speedyshare.com/qWpW2/download/BGE-platform-test-2c.blend

P.S. I’m using 2.69

Chances are that the rigify addon adds things that are not supported by the BGE (like the default IK solver).

Your best bet is to rig the mesh manually while the engine is set to ‘Blender Game’, all the basic features should be supported

Makes me think that an addon to bake IK to FK for the game engine would be really useful…

The BGE has supported some kind of IK solver since 2.49 (through the ITASC library committed by Ben2610), but I’ve heard that it’s generally a bit slower than basic FK and is not used a lot.

It is sad what you guys telling me… :confused: … so sad … I hoped I forgot to check some kind of check-box or add something to Game Logic … Maybe there is a hope? Since you can export it to Unity maybe there is a way to use Rigify in BGE somehow ? Any way to bake actions into key-frames to character model ? Implement somehow the .py that Rigify uses in Logic? Really only way you think is not to use IK ? :frowning:


I’ve faced a similar problem some time ago and here’s my solution:

If anyone’s interested I’ve found a solution to my problem.

So here’s how to use rigify for game rigs:

-Load up your character
-Load up the rigify rig, match the meta_rig to your character
-Generate the rig, hide/move/get rid of the meta_rig
-Select the newly created rig, under the rig section in the properties window switch to layer 18 (where the DEF bones are)
-In Edit mode, select all the bones, go to Armature->Bone Settings->Deform (this will untick the deform option for all of these bones)
-Go to layer 20 (where the ORG bones are), select all of the bones except the four heel bones and the four base finger bones, repeat Armature->Bone Settings->Deform
-In Object mode parent the model to the rig, auto generate weights (I have to do this twice for some reason - the first time around the automatic weights won’t generate, only the empty vertex groups).

Now, with the root bone you have nice 51 bones to export to whatever format you want.
If you’re going for mobile I suggest you keep your bone count below 60 (delete most of the fingers from the meta_rig before generating for instance) - some devices can handle a lot more, the new Unreal Engine has 75 somehow, but many devices will show errors when you have more bones (like the new nexus tablet).

Since then I made some changes:
I have four files for this (at least) in the first one I use rigify to set up my model with the rig (I call this one _rig). In the second one (_anim) I make my animations. The third one is a temporary file (_temp), to bake my actions in. And the fourth is the final one where I store the baked animations and the simplified rig (I remove all the non-deforming bones - some need to be enabled for selection in the outliner, which leaves 51 bones). each time I’m exporting an animation to my final file I open my _anim file, save it as _temp, select all my “ORG” bones (the new deforming bones) and bake (OBJECT -> ANIMATION -> BAKE ACTION: ONLY SELECTED, VISUAL KEYING, CLEAR PARENTS, CLEAR CONSTRAINTS, POSE), I then save the _temp file and append my action to the final file.

I’ve found that when I used just the rigify rig without doing this, the BGE lags in GLSL mode with normal maps on an animated model.