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

SoftBody support in GodotPhysics 3D #46937

Merged
merged 1 commit into from
Mar 20, 2021

Conversation

pouleyKetchoupp
Copy link
Contributor

@pouleyKetchoupp pouleyKetchoupp commented Mar 12, 2021

List of changes:

  • Fixed SoftBody surface update with new rendering system
  • Added GodotPhysics implementation for SoftBody
  • Added support to get SoftBody rid to interact with the physics server
  • Added support to get SoftBody bounds from the physics server
  • Removed support for unused get_vertex_position and get_point_offset from the physics server
  • Removed SoftBody properties that are unused in both Bullet and GodotPhysics (angular and volume stiffness, pose matching)
  • Added RenderingServerHandler interface to PhysicsServer3D so the physics servers don't need to reference the class from SoftBody node directly

Notes:

  • SoftBody creation and simulation is mostly based on Bullet soft bodies and internal soft body queries use the dynamic BVH implementation from Bullet introduced in Add a Dynamic BVH implementation. #44531.
  • The solver for Body / Soft Body pairs is based on what is done for Body / Body pairs with a few specific changes to work with soft body nodes. There's probably room for optimization but the collision response seems to work well for now.
  • SoftBody collision with ConcavePolygonShape is currently buggy. GodotPhysics allows backface collision and that doesn't play well with small particle collision (they can be pushed through faces by the solver and sometimes along the face plane because of an extra bug). This will be addressed in a separate PR.

@pouleyKetchoupp pouleyKetchoupp added this to the 4.0 milestone Mar 12, 2021
@pouleyKetchoupp pouleyKetchoupp requested a review from a team March 12, 2021 15:39
@pouleyKetchoupp pouleyKetchoupp requested review from a team as code owners March 12, 2021 15:39
@pouleyKetchoupp pouleyKetchoupp force-pushed the soft-body-support branch 4 times, most recently from 9160a39 to e174aeb Compare March 12, 2021 17:32
- Fixed SoftBody surface update with new rendering system
- Added GodotPhysics implementation for SoftBody
- Added support to get SoftBody rid to interact with the physics server
- Added support to get SoftBody bounds from the physics server
- Removed support for unused get_vertex_position and get_point_offset
from the physics server
- Removed SoftBody properties that are unused in both Bullet and
GodotPhysics (angular and volume stiffness, pose matching)
- Added RenderingServerHandler interface to PhysicsServer3D so the physics servers don't need to reference the class from SoftBody node directly
@pouleyKetchoupp
Copy link
Contributor Author

Just pushed a fix in BodySoftBodyPair3DSW to calculate impulses applied on rigid bodies properly according to their angular velocity.

@akien-mga akien-mga merged commit fa681d0 into godotengine:master Mar 20, 2021
@akien-mga
Copy link
Member

akien-mga commented Mar 20, 2021

Thanks! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants