Rag-doll Physics and Python

Since Blender allows programmers access to a model’s armature system, via python scripting, would it be possible to dynamically move the bones based on collision with other objects?

Would you recommend programming this physics simulation in Python or extend Python with C/C++ to handle the computations?

well, actually

the latter, but sort of
https://blenderartists.org/forum/viewtopic.php?t=28155&highlight=blode

ODE is a physics library [it doesn’t have much in the way of collision detection tho, as in it uses another library for trimesh collisions], with suport for constraints and stuff

it can do ragdolls [last I saw none of the demos had this, but search for stair dismount online if you want an entertaining example]

so, blode should simply allow you to use python to control the armature, but let ODE handle the physical responses and collision [ode is c/c++]

zero_d is right and i have actually done a ragdoll demo(though not with armatures though it would work easilly enough) just check out the thread.

MacBlender

Hmm…looks promising.

Funny thing is, I was going to do the same thing, only using Tokamak instead of the Open Dynamics Engine.

he he he… well to each their own.

MacBlender

Did you use SWIG, Boost Python, or just straight Python C API?

I used pyrexec

swig didnt’ work right cause python doesn’t liek C pointers and with pyrexec i was able to write the functions to work without a pointer.

Macblender