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

Single and Multiple Collision Siblings issues #48468

Closed
Tracked by #45333
Mercadud opened this issue May 5, 2021 · 4 comments · Fixed by #50262
Closed
Tracked by #45333

Single and Multiple Collision Siblings issues #48468

Mercadud opened this issue May 5, 2021 · 4 comments · Fixed by #50262

Comments

@Mercadud
Copy link

Mercadud commented May 5, 2021

possible duplicate : #41522

Godot version:
Godot 3.3 stable

OS/device including version:
rx5700 xt
Kernel Version: 5.12.0-1-MANJARO
GLES3

Issue description:
When Meshes create single convex collision siblings, Godot adds a TON of points to the collision shape, when it shouldn't
But clicking 'create multiple convex collision siblings' reduces the amount of points tremendously even though it still only creates 1 collision shape anyways.

side note: both of them show errors in the output

Steps to reproduce:
Import model (should have at least a couple vertices)
create either the single or multiple convex collision sibling

Minimal reproduction project:
MeshThing Issue.zip

edit: It may be because the object has a lot of vertices

@Calinou
Copy link
Member

Calinou commented May 5, 2021

edit: It may be because the object has a lot of vertices

I would recommend using a simplified version of the original mesh for convex shape generation.

@Mercadud
Copy link
Author

Mercadud commented May 5, 2021

Yes, I noticed that it's fine using simpler meshes with less vertices.

Quick question: if you create a collision shape with both the single and multiple version and they both end up making a single shape, are they supposed to act the same way?

@Calinou
Copy link
Member

Calinou commented May 5, 2021

Quick question: if you create a collision shape with both the single and multiple version and they both end up making a single shape, are they supposed to act the same way?

No, as they use different generators (Quickhull for a single shape, VHACD for multiple shapes).

VHACD may end up generating only a single shape if there isn't a good reason to split the mesh into multiple shapes.

@pouleyKetchoupp
Copy link
Contributor

pouleyKetchoupp commented Jun 7, 2021

#48907 would help with this case by removing duplicate vertices, although it would still create a convex hull with several hundreds of vertices.

The multi-convex algorithm which uses VHACD works better for simplifying meshes, so in the single convex case, I wonder if we could:
-First do a pass with VHACD
-If several convex hulls are generated, gather all vertices together and do a second pass with QuickHull (replaced with Bullet's convex hull generator in 3.4)

Edit:
Actually, as an option we could even use VHACD and set it up to generate only one convex hull, it seems to work very well to simplify meshes.

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

Successfully merging a pull request may close this issue.

4 participants