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

Optimize outputted meshes with meshoptimizer #39

Open
4 tasks
Krenodeno opened this issue Mar 14, 2022 · 3 comments
Open
4 tasks

Optimize outputted meshes with meshoptimizer #39

Krenodeno opened this issue Mar 14, 2022 · 3 comments

Comments

@Krenodeno
Copy link

Looking at zeux/meshoptimizer, we could use some optimization to assimp output geometries.

First do some tests with outputted geometries by YOGA, count the gains, and see if an integration as a lib is doable.

TODO-list:

  • Test gltf optimizer with multiple geometries, measure the gains if any
  • See if it is usable as a library to add to YOGA (python bindings)
  • Write python bindings
  • Integrate to YOGA (and option to deactivate those optimizations ?)
@Krenodeno
Copy link
Author

I've tested a input model with 942 vertices and 1560 triangles (FBX format).
The output of YOGA is a GLTF file with a 4680 vertices and 1560 triangles model.
Then I used gltfpack on this last model, turned into a 1187 vertices and 1560 triangles model.

Triangles count is preserved across the different files, but the original fbx still have the lower vertex count.
Well the optimized gltf have reduced to 25% the vertex count of the yoga output one.

@Krenodeno
Copy link
Author

I tried a simple cube: original have 8 vertices and 12 triangles.
exported with YOGA, I get 36 vertices and 12 triangles.
gltfpack gives 24 vertices and 12 triangles.

@Krenodeno
Copy link
Author

It looks like there should be some fixes to do in assimp too... But that's another topic.

In terms of vertices optimization, results are looking good. What do you think @flozz ?

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

1 participant