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

Updates to control mesh configuration #99

Merged
merged 9 commits into from
Jan 3, 2025

Conversation

Carifio24
Copy link
Member

@Carifio24 Carifio24 commented Jan 3, 2025

This PR makes a few changes regarding the mesh structure of our scatter and glTF exports. The list of changes here is:

  • Allow setting the maximum number of points (spheres) per mesh in glTF scatter exports. If the number of spheres for a given material is lower than the maximum value, all of the spheres for that material are put into one mesh. While we don't show this to the user, the points per mesh values are 1, 10, 100, 1000, 10000, 100000, 1000000, and "all points."
  • Implement this mesh chunking for voxel exports as well. In my testing, exports using more voxels per mesh are often smaller, in addition to being more performant. Thus, I didn't add an option for the user to adjust this. I suspect that this is because there are generally so many voxels that removing the buffer views and accessors actually saves more space than it costs to add the additional triangle indices to the buffer.

Overall, the effect of this is to somewhat replicate the effects of Meshopt compression. While it makes sense for a user to use compression when they can, this is helpful for cases where the user wants to load the exported file into a client that doesn't support compression extensions.

@Carifio24 Carifio24 added glTF Related to export of glTF/glB files voxel scatter labels Jan 3, 2025
@Carifio24 Carifio24 merged commit 25325c6 into glue-viz:master Jan 3, 2025
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
glTF Related to export of glTF/glB files scatter voxel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant