Friction resolving optimizations

Please don't post Bullet support questions here, use the above forums instead.
stbuzer
Posts: 23
Joined: Fri Dec 08, 2006 10:16 am

Friction resolving optimizations

Post by stbuzer »

I started to optimize friction solver.
I have 2 possible optimizations for now:
1) not only for friction - detect collision patches. But what it will
give us - may be single for several contact points friction directions.
anything more?
2) using single friction direction(theoretically twice improved performance).
Do you think it is possible(friction to be processed in the separate iterations
loop I guess)?

And what about another physics engines - do friction takes most of
contacts resolving time?
Erin Catto
Posts: 316
Joined: Fri Jul 01, 2005 5:29 am
Location: Irvine

Post by Erin Catto »

You can make a significant savings by using central friction. You might get away with using a single direction, but you will also need a friction torque to resist spinning about the normal vector.

For a box with four contact points you can go from 12 constraints to 6 or 7. This is one of the biggest savings you can make in an iterative solver.
wyd124
Posts: 9
Joined: Sat Jan 06, 2007 9:34 am

Post by wyd124 »

I am a beginner for physics simulation.
Where can I get some papers or info about friction in physics simulation?

Thank you in advance!
:?:
Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Post by Dirk Gregorius »

Search for:

"Hasegawa - Real-time Rigid Body Simulation for Haptic Interactions Based on Contact Volume of Polygonal Objects"

This describes the central friction approach Erin mentioned. You can also look at Erin's papers which should be a good start for a beginner.

http://www.gphysics.com


HTH,
-Dirk
stbuzer
Posts: 23
Joined: Fri Dec 08, 2006 10:16 am

Post by stbuzer »

Thanks for the reply, Erin.

Sorry, I was busy and hadn't implemented it yet.
I only tried to use single friction direction - this gives about 70% speed up but it may cause some instabilities because when using single friction direction, sliding movements along any other direction are missed.
I refused the second and will try to use central friction.