Controling armature articulation in gameEngine w pyhton?

Game Engine, Players & Web Plug-in, Virtual Reality, support for other engines

Moderators: jesterKing, stiv

Post Reply
Posts: 1
Joined: Thu Dec 12, 2002 10:58 pm

Controling armature articulation in gameEngine w pyhton?

Post by chrisjengle » Thu Dec 12, 2002 11:10 pm

Does anybody have any advice on how to program inverse kenematics into the game engine. I'm about halfway through an extensive book on python and I'm wondering if I can even access the positions of armature with python in the game engine or weather it would require lower level C programming skills, I'm also starting to look at the University of pennsylvainia paper on the subject of inverse kenematics. Am I approaching this the right way? :shock:

Posts: 30
Joined: Wed Oct 16, 2002 9:47 pm

good question

Post by d0pamine » Sat Dec 14, 2002 8:02 pm


Short answer: will take at least some c programming to modify the game engine to allow this.

Long answer:
Version 2.25 has a setChannel() method for the action actuator, so you can set relative position and orientation of a bone. I haven't fully tested it yet, but if it works it would give you a big advantage. However, to do IK you are going to need to find out where in world coordinates your bone or target is, so you can compute what setChannel callls are needed to bring it close to the target. I don't think that is possible now since there is no getChannel() that would give you at least a start. Looking at the code, this was planned but not finished.

However, the good thing is that you should be able to add the necessary functions in the game engine because the game engine uses the armature objects "directly", i.e. very little translation between the IK system in regular blender and real-time. In fact, I don't see why one couldn't readily run the IK system in the game engine. Would slow things down a bunch, but perhaps there are settings that could make this do-able for simple chains.

Good luck!

Posts: 166
Joined: Wed Oct 16, 2002 6:52 am

Post by Saluk » Sat Dec 14, 2002 8:48 pm

Can you get armature/bone positions from one of the non-interactive Blender modules? You can use the non-interactive modules just fine in gameblender for reading information, the problem is if you try to use them to change something, you have to restart the scene for changes to have effect. But if you can get the armature info from somewhere in the Blender module, you might be able to get it going with setChannel...

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests