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

Creating Mesh Shapes with custom TriangleSplitter or customized AABBTreeBuilder #1468

Open
vblanco20-1 opened this issue Jan 20, 2025 · 1 comment

Comments

@vblanco20-1
Copy link

In my project, i need to generate voxel meshes at runtime, which need collision. Those meshes are a regular 3d grid (surface-nets). Ive benchmarked the default TriangleSplitterBinning with the default MeshShape logic, and that one is a bit too slow. Ive modified the code to use TriangleSplitterMean, and that makes the generation significantly faster for the kinds of meshes i generate (my triangles are all almost the same size due to being a grid, so binning by centroid gives optimal results).

The thing is, there is no option or property to switch the binning logic. On my version of the library for the project, ive directly modified the code on MeshShape.cpp to use the other splitter, but thats only to test the others.

Is there a plan to add something to MeshShapeSettings or MeshShape constructor that would allow this sort of customized build logic? Or a known way to side-step this.

@jrouwe
Copy link
Owner

jrouwe commented Jan 20, 2025

I can add a setting for it. I've been tempted many times to just delete those other splitters (as they're inferior) but this is indeed a good use case.

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