How to rotate joints/limbs like a real human would

ezgif-1-30bd4ac62c

My task is to transfer human motion to a model in threejs. I have a series of recorded positions of joints from a human motion. I’ve converted positions to rotations for respective joints/limbs, and applied to the 3d objects in the model.

As you can see in the .gif, the positions don’t contain the exact rotation of human body. There are constraints, such as the knees can not face backward, elbows can not face forward, etc. My questions is, how to express these constraints in geometry, and adjust the rotations calculated from positions, therefore make the model move like a real human would.

Suggestions are welcome

hi, did u find a solution to this problem?

This is a huge and complex topic… and crosses many disciplines… rigging, inverse kinematics, rigid body dynamics/constraints/collision, character ragdolls, and more.
imo the best solution is to use a physics engine and a ragdoll character constructed of limbs and joints… Some physics engines (like ammo/havok) then allow you to set constraints on each joint… like rotational limits, angular limits, whether the limbs should collide with connected limbs, etc. It’s a huuuge topic, and pretty tricky to get something that works as well as animations authored by an artist.
To use physics simulations requires setting up a whole environment with gravity, and masses for the limbs, and there aren’t a lot of ways to author those setups without writing a lot of code and experimenting. . so you may want to re-evaluate your use case and see if it can be implemented by using regular animations, authored in a modeller like blender/maya.

If you look at current AAA games, even they have a hard time achieving procedural ragdolls that don’t do janky stuff like having bones that flip, or torsos that twist > 180 degrees etc…
So if you’re really committed to figure it out… Be prepared to spend a lot of time learning a lot of stuff. :slight_smile: And if you can pull it off, you can probably turn it into a library that people will find useful. :slight_smile: