Seeking advice for modelling a human skeleton

Post Reply
ajw
Posts: 2
Joined: Tue Apr 14, 2020 2:15 am

Seeking advice for modelling a human skeleton

Post by ajw »

Hi there, I'm trying to create an articulated body representing a (simplified) human skeleton. The focus is more towards real-time character animation, as opposed to say, super-accurate biomechanical simulation. I'm new to this library (and physics engines in general) so I'm trying to understand the best way to go about it. I'm creating a btRigidBody to represent each bone, and adding joint constraints between the bones. From what I can tell though, there are two ways to define the joints:
  • Add a bunch of independent constraints
  • Use the btMultiBody type
Is either of these approaches likely to be more performant and/or more stable?

I'm also wondering about the maturity/robustness of btMultiBody and related features, as I've read comments in a few places that it's still somewhat experimental. Most of those comments are a few years old though, so I'm wondering whether it's considered more mature now?
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Seeking advice for modelling a human skeleton

Post by drleviathan »

I haven't played with multi-body much, but it is definitely more performant than non-multi-body when it comes to high numbers of constraints. Multi-body constraints are well satisfied (stiff and accurate): I base this statement on videos I've seen of other people's simulations.

If you add too many constraints to a non-multi-body collection they will start to get "soft": the constraints are not well satisfied and can even go unstable. This because each constraint is solved independently in sequence. The solver may iterate more than once, but it still solves them one at a time. Dunno what is "too many" for your current hardware and timestep. About six years ago for me the stable limit was somewhere around a system of 10 constraints on a single i7 core at 1/60th second substeps.

Shorter substeps will help accuracy and stabiliy. Also, you can increase the number of max iterations of the solver. I didn't play with those two knobs when I was experimenting a long time ago. With tuning I wager you could push 20 or 30 stable constraints in real-time on good modern hardware, but that is only a guess.
Post Reply