concept question multibody

Post Reply
gdlk
Posts: 62
Joined: Fri Oct 24, 2014 7:01 pm

concept question multibody

Post by gdlk »

Hi!

I am a little confuse about the multibody topic. Currently I am using normal rigid bodies connected by constraints, however sometimes I read that you can also use a multibody for the same thing... so I would like to know when is better use a multibody approach respect the other case? ( from the gdc presentation it looks like I must use multibody approach if I have a visible gap in the first approach, but I think it could be more reasons...)

Also, if I use the multibody approach, can I use it with the MLCP/Dantzig solver or necessarily should use the btMultiBodyConstraintSolver?? (with the btMultiBodyConstraintSolver, the capacity to deal with large mass ratios is lost?? )

Thanks!!
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: concept question multibody

Post by Erwin Coumans »

Good questions :)

If you are happy with the simulation quality and performance of btRigidBody and its btTypedConstraints, you don't need to use btMultiBody. btMultiBody can be useful for higher quality ragdolls and robots, if joint gap (= lack of constraint solver convergence) becomes an issue.

At the moment, btMultiBody can only use the btMultiBodyConstraintSolver, which uses the btSequentialImpulseConstraintSolver, but I plan on making it more generic so that you can use any constraint solver in combination with btMultiBody.
gdlk
Posts: 62
Joined: Fri Oct 24, 2014 7:01 pm

Re: concept question multibody

Post by gdlk »

great!, thanks!! =D
Basroil
Posts: 463
Joined: Fri Nov 30, 2012 4:50 am

Re: concept question multibody

Post by Basroil »

Erwin Coumans wrote: At the moment, btMultiBody can only use the btMultiBodyConstraintSolver, which uses the btSequentialImpulseConstraintSolver, but I plan on making it more generic so that you can use any constraint solver in combination with btMultiBody.
Would that include the ability to stack constraints or would that end up causing circular dependencies? Main reason I ask is because on pretty much every other solver you can put a "motor" constraint and then a "friction" constraint to avoid having to redefine the constraint equations (and I'm not even sure that it would work out at all), but I can't seem to get it to work the same way with multibody because of parenting.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: concept question multibody

Post by Erwin Coumans »

You can already add a motor constraint to individual joints of a btMultiBody, using btMultiBodyJointMotor. Have you tried that?
Basroil
Posts: 463
Joined: Fri Nov 30, 2012 4:50 am

Re: concept question multibody

Post by Basroil »

Erwin Coumans wrote:You can already add a motor constraint to individual joints of a btMultiBody, using btMultiBodyJointMotor. Have you tried that?
I think my main code base was pretty old and didn't have jointmotor in it, I'll try testing it with the current 2 body 2 joint motor method I've been using lately.
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: concept question multibody

Post by benelot »

Is there a reason why you can not add all the same constraints to the multibody as you can with normal rigidbodies? I am missing the btGeneric6DofSpringConstraint, because I need the springs and stiffness.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: concept question multibody

Post by Erwin Coumans »

The btGeneric6DofSpring2Constraint only works for 6DOF btRIgidBody.

The btGeneric6DofSpring2Constraint needs to be rewritten to support btMultiBody, taking more than 6-degree of freedom into account. I plan on doing that and created an issue for this: https://github.com/bulletphysics/bullet3/issues/439

Also, it is best to use btGeneric6DofSpring2Constraint instead of the btGeneric6DofSpringConstraint (notice the 'Spring2' part).
Post Reply