Simplification issues using the new meshopt_generateShadowIndexBuffer #756
-
Hi all, I've been working with meshoptimizer for a while, for simplification I was used to first get rid of duplicate vertices (by having just positions into account) and then simplify. I don't really care about normals or UVs in my usecase, so simplification really worked pretty well for that case reducing to 20% of the size.
This week I learned about meshopt_generateShadowIndexBuffer and thought it could work as a replacement and tried
But the simplifier was not able to really work more than reducing to 97% of the size. I understand that the shadow index buffer is doing the vertex weld, so I was expecting it to work in the same way plus I wouldn't need to reorder/remap the vertices (cause I need to keep the order in that phase for a different matter). But simplification is definitely not working well. Am I making sense or totally missing the point? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
That is odd. I believe these should be roughly equivalent indeed. Maybe there's a bug in Could you show the code you are using before (with generateVertexRemap) and after (with generateShadowIndexBuffer)? |
Beta Was this translation helpful? Give feedback.
Ohh. Uhh. Yes :( Thanks for bringing this to my attention! This never worked and needs some sort of tweaks.
I believe you can use
meshopt_SimplifySparse
option which should fix the issue (for your usecase you can ignore the absolute error flag even though the documentation advises it). The documentation right now states that you can use shadow index buffers as an input and that is incorrect. I will remove the mention of this from the documentation for now and add a TODO item to investigate the best option to fix this.