zeux / meshoptimizer

Mesh optimization library that makes meshes smaller and faster to render
MIT License
5.6k stars 480 forks source link

Avoid hole creation #656

Closed Makio64 closed 8 months ago

Makio64 commented 8 months ago

On some models with extrem simplification ( example to make LoD ) the current algorithm create a lot of holes, is there a way to avoid it?

Example on this model : https://sketchfab.com/3d-models/the-bust-of-napoleon-bonaparte-a177bf0e121641bea6cf1d58ad3efc5b

image

image

zeux commented 8 months ago

This is a duplicate of #346.

zeux commented 8 months ago

(these are not topological holes, but due to shading the overlap of the resulting triangles looks like a gap in the geometry)

Makio64 commented 8 months ago

@zeux It's close as 'not planned'

I can give it a try as it's a necessary feature for us to use it in production : can you let me know what was the biggest difficulty you encountered and which part I should patch ?

I also thought about another approach making a secondary pass with IA trained to flip back the 'missing' face, do you think it's a good idea to?

Thanks !

zeux commented 8 months ago

"not planned" is just a GitHub issue default shorthand for:

image

Further progress on this issue can be tracked via #346 - it's important to avoid duplicate issues for the same problem, and this one is already well described in that issue. The flipping situation was improved in previous version but further improvements are needed to fully prevent this.