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

Detessellate Not Working for Some Models #72

Open
iwoj opened this issue Oct 8, 2021 · 6 comments
Open

Detessellate Not Working for Some Models #72

iwoj opened this issue Oct 8, 2021 · 6 comments

Comments

@iwoj
Copy link

iwoj commented Oct 8, 2021

For example: https://www.icloud.com/iclouddrive/0K8FOcYTy7wEBf0WRt-70LrTw#Detessellate_Test

@nicklockwood
Copy link
Owner

Can you elaborate? Is the attached model the result of detessellation, or the input?

Can you provide a code sample of how you are loading the model, and what you expect the output to be?

Also, I notice that when I preview the model in the Finder, it seems to have inverted faces - could that be related to the issue?

@iwoj
Copy link
Author

iwoj commented Jul 17, 2022

Long delayed reply: I want to use the above model as input into your detessellation method. All I'm doing is calling detessellate() on the mesh. When I invert the normals like you suggest (I use meshlab for that) and input the model again, I get the same result. Here, you can see both models have the same set of detessellated faces (with some that remain tessellated):

IMG_7331

Regardless, normals probably shouldn't affect detessellation. It's just a merging of coplanar polygons, no?

@nicklockwood
Copy link
Owner

@iwoj normals can affect detessellatioon because if two neighboring triangles face opposite directions then they are effectively not coplanar and cannot be merged into a single quad.

That said, you are right that it seems that was not the issue in this case. I believe I've now fixed the actual issue, and pushed a fix to the develop branch if you'd like to try it out.

@iwoj
Copy link
Author

iwoj commented Jul 19, 2022

It works much better now! Thanks. I'm still noticing a few models that don't detessellate and I don't think it's because of normals. Does detessellation only reduce to quads or can it create planar polygons with any number of vertices?

@nicklockwood
Copy link
Owner

It can produce any number of vertices. If you have example models that don't detessellate properly please share them and I'll investigate further.

@giln
Copy link

giln commented Sep 3, 2023

Hello,
I have a model that does not detessellate properly.
I think it has to do with normals but have not been able to pinpoint the exact problem.

Wall.scn.zip

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

3 participants