Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider applying 3D friction at manifold center and using twist friction #588

Open
Jondolf opened this issue Dec 11, 2024 · 0 comments
Open
Labels
A-Dynamics Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on C-Performance Improvements or questions related to performance

Comments

@Jondolf
Copy link
Owner

Jondolf commented Dec 11, 2024

Currently, Avian applies friction at every contact point.

A common optimization for 3D friction is to only apply friction at the center of each contact manifold, weighing the points based on penetration depth. This could yield noticeable performance savings for manifolds with several contact points. However, applying friction at the center also requires an additional twist friction.

Some engines do this (Bepu, and Bullet I think) and some don't seem to (Rapier and Jolt). We should try both and experiment.

Prior Art

  • An example of computing the friction center can be found in Bepu here.
  • Erin Catto's GDC2006 presentation mentions applying friction at the center of the manifold and applying a twist friction for big CPU savings.
@Jondolf Jondolf added C-Performance Improvements or questions related to performance A-Dynamics Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Dynamics Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on C-Performance Improvements or questions related to performance
Projects
None yet
Development

No branches or pull requests

1 participant