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

Is uneven decimation normal on some models ? #79

Closed
v3n0m42 opened this issue Nov 20, 2019 · 2 comments
Closed

Is uneven decimation normal on some models ? #79

v3n0m42 opened this issue Nov 20, 2019 · 2 comments

Comments

@v3n0m42
Copy link

v3n0m42 commented Nov 20, 2019

Hi, I integrated your optimizer for generating collision meshes by using meshopt_simplify followed by meshopt_optimizeVertexFetch. Unfortunately, on some meshes, the decimated result has some parts aggressively simplified, and some other parts have redundants triangles conserved; vertices have no attributes other than their position.
Does it come from the topology of the mesh ? My settings ?
The most noticeable come from an airport terminal, as you can see here; some parts are really reduced while others seem to be ignored.
The target error were 0.001, then 0.1 and the vertices conserved were respectively 64.5% and 63%.

Models as used (only positions for vertex attribute), exported as .OBJ:
Original Decimated

@zeux
Copy link
Owner

zeux commented Nov 21, 2019

For generating collision meshes probably meshopt_simplifySloppy is a better fit - it will not stop due to topological constraints (it also doesn't preserve attribute seams, but it sounds like you only need position data anyhow). I'll take a look at the meshes, in general I'd expect the simplifier to be stuck so early only if the meshes use flat normals and normals are included into the input data.

@zeux
Copy link
Owner

zeux commented Dec 28, 2020

I believe this is similar to #112 and simplifySloppy should indeed be used as a replacement. It doesn't have a way to control the error right now which is something that can be added, but otherwise it's a better fit; it's expected that the non-sloppy simplifier will get stuck as it won't be able to collapse around certain topology.

@zeux zeux closed this as completed Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants