Skip to content

Using meshoptimizer code | Import model, optimize model, export optimized model #525

Answered by zeux
Sturmik asked this question in Q&A
Discussion options

You must be logged in to vote

This code doesn't recompute or reorder any attributes like normals, so it would make sense to me that you're getting the wrong rendered output - this code is effectively merging vertices with the same positions but different attributes like normals as it doesn't pass anything but positions into meshopt_generateVertexRemap, but the mesh in question still contains normal/UV data that is not reindexed correctly.

There's two options here:

  1. You can use meshopt functions without rebuilding vertex data as it would be simpler - for example, you can run optimizeVertexCache and optimizeOverdraw without running the other steps. These would preserve vertex data as is without any modifications, but ma…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Sturmik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants