New to Bullet - some questions

Stefan Rilling
Posts: 4
Joined: Wed Aug 08, 2007 2:18 pm

New to Bullet - some questions

Post by Stefan Rilling »

Hello,

as i am quite new to Bullet, i have som questions for which i hope someone with more experience could give me an answer:
- Is it possible to set the density of the surrounding media or do i have to adjust this using the damping factors?
- Is air drag simulation included?
- I played around with the constraint demo, but i could not manage to build rigid joints / constraints between two objects. Is ist possible to do this (stable) with Bullet?
- I assume that the units used in Bullet are SI units, but i could not find a source to verify that
- I have problems to set different restitution factors to different objects. In the appBasicDemo, i call the setRestitution function with the values 0.0 and 1.0, but it doesn' t take any effect.

I would be glad if someone could help me with these issues.

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

Re: New to Bullet - some questions

Post by Erwin Coumans »

Stefan Rilling wrote:Hello,

as i am quite new to Bullet, i have som questions for which i hope someone with more experience could give me an answer:
- Is it possible to set the density of the surrounding media or do i have to adjust this using the damping factors?
- Is air drag simulation included?
Only damping, or provide your own system.
- I played around with the constraint demo, but i could not manage to build rigid joints / constraints between two objects. Is ist possible to do this (stable) with Bullet?
It should work fine, as long as you avoid large mass ratios (attaching a very heavy object to a light object). Can you elaborate on the issue? You can disable collision between object that share joints/constraints, you can see this in the ragdoll demo. Have you tried the ragdoll demo?
- I assume that the units used in Bullet are SI units, but i could not find a source to verify that
Most physics systems are unit-free. If your gravity is in inches, units are in inches. However, Bullet works best if your units are in meters, and you keep object sizes in that range (0.2 to 10 units) for convex shapes. Triangle meshes can be much larger, but individual triangles should best be kept smaller then 10 units, to avoid accuracy problems.
- I have problems to set different restitution factors to different objects. In the appBasicDemo, i call the setRestitution function with the values 0.0 and 1.0, but it doesn' t take any effect.
Not sure what is happening here. Restitution is an approximation, and gets affected by penetration resolution, so don't expect extremely accurate results. Some solver updates might have affected restitution. Can you try to set the solver mode to 'SOLVER_RANDMIZE_ORDER'?

Code: Select all

constraintSolver->setSolverMode(btSequentialImpulseConstraintSolver ::SOLVER_RANDMIZE_ORDER );
Hope this helps,
Erwin
AlexSilverman
Posts: 141
Joined: Mon Jul 02, 2007 5:12 pm

Re: New to Bullet - some questions

Post by AlexSilverman »

Just some confirmation on the restitution behavior initially reported by Stefan. I am using a btSequentialImpulseConstraintSolver in the default mode in Bullet v2.61 and none of my restitution values affected the simulation until I set the mode to SOLVER_RANDMIZE_ORDER. Now everything works properly.

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

Re: New to Bullet - some questions

Post by Erwin Coumans »

- I have problems to set different restitution factors to different objects. In the appBasicDemo, i call the setRestitution function with the values 0.0 and 1.0, but it doesn' t take any effect.
This should be fixed in Bullet 2.62, please check.

Thanks,
Erwin