-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Material combine mode hash table #812
Comments
I think it would be more than adequate to do what PhysX does here for mixing friction/restitution per-shape by simply using the mixing rule that has the max value rather than a look-up table/hash: https://nvidia-omniverse.github.io/PhysX/physx/5.4.2/_api_build/struct_px_combine_mode.html?highlight=pxcombinemode# They could also be compressed to a byte each and combined into a uint16 if memory was a concern. |
Rapier also has per-collider mixing rules like PhysX: https://rapier.rs/docs/user_guides/rust/colliders#friction |
To add, the above patch would like use the following instead:
|
Is there any justification for the precedence rule? It seems arbitrary. Why not have a hash table to look up the combine rule for two materials? |
There are now shape material identifiers and callbacks, so the user can mix friction and restitution however they like. #873 |
Store default on world. Each shape can have a material index 0-255 which 0 being default and using the world setting for 0-0.
I don't have a hash table now, just a hash set.
The text was updated successfully, but these errors were encountered: