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?
Friction resolving optimizations
-
- Posts: 316
- Joined: Fri Jul 01, 2005 5:29 am
- Location: Irvine
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.
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.
-
- Posts: 9
- Joined: Sat Jan 06, 2007 9:34 am
-
- Posts: 861
- Joined: Sun Jul 03, 2005 4:06 pm
- Location: Kirkland, WA
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
"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
-
- Posts: 23
- Joined: Fri Dec 08, 2006 10:16 am
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.
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.