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

Reduce number of vertices in each convex hull #37

Open
neemoh opened this issue Nov 8, 2023 · 5 comments
Open

Reduce number of vertices in each convex hull #37

neemoh opened this issue Nov 8, 2023 · 5 comments

Comments

@neemoh
Copy link

neemoh commented Nov 8, 2023

I was wondering if there is a way to reduce the number of vertices of each convex hull.

Compared to VHACD I get a lot more vertices per convex hull with COACD. Although I am quite impressed with the quality of the decomposition of COACD, the high number of vertices will affect collision checking too just like having too many convex hulls.

Here is an example. Compare for instance the VHACD2 MEDIUM case that has 8 convex hulls with 369 vertices and the COACD LOW case that has a similar 7 convex hulls but with 10 times more vertices:

image

@SarahWeiii
Copy link
Owner

Thanks for bringing up the issue! I'll look into improving it when I have a moment to spare.

@SarahWeiii
Copy link
Owner

btw you can turn off the pre-processing if your input is manifold
if it is not, one quick way to fix the problem is to manually remesh + simplify the input

@neemoh
Copy link
Author

neemoh commented Nov 22, 2023

Thanks for the hint Sarah. Taking some time off now, and will check when back in the office in a couple of weeks. Will the pre processing affect the number of output vertices?

Unfortunately, manual re meshing of the input won't be a great option, because we need something that works with little intervention from users. The VHACD has a parameter to specify the maximum number of vertices per convex hull (we use the default 64). Would such a parameter be feasible to have in COACD?

@SarahWeiii
Copy link
Owner

oh sorry for the late reply. The results are convex hulls of the original mesh so the pre-processing can reduce the output vertices.
I planned to add some automatic pre-processing but haven't finished. It can help reduce the vertices but cannot specify the maximum number of vertices per convex hull.

@neemoh
Copy link
Author

neemoh commented Jan 29, 2024

That is great to hear! I think one can live without specifying the exact number of vertices. However, being able to reduce the number of vertices is really crucial to speed up collision-checking, which is a common use of composite convex hulls.

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

No branches or pull requests

2 participants