-
Notifications
You must be signed in to change notification settings - Fork 220
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
Some charts are flipped after packing #121
Comments
Not an issue when using MeshDecl instead of UvMeshDecl |
Seems I was mistaken. Issue still persists, getting the log after setting Flipping is no issue if I think the flipping of the charts happens in the swap here, xatlas/source/xatlas/xatlas.cpp Lines 8583 to 8593 in f700c77
|
I also encountered the same problem。I found that the vertex order of the flipped triangular surface is arranged counterclockwise。 |
Description
Using the included .obj and .mtl and changing the
example_uvmesh.cpp
so it does not loop the same shape 10 times but only use input shapes. The resulting images show many instances where a chart is flipped. Issue persist even when setting xatlas chart options to fix winding.The input mesh is a single shape, 125 arrayed triangulated boxes with unique materials. The uvs for each disconnected geometry is overlapping.
Steps to reproduce
Commenting out the lines 211, 212 & 232
Then editing line 226, so
shapes[s]
instead ofshapes[i]
Adding the following lines at 239,
With the .obj and .mlt extracted to folder of example_uvmesh.exe, and running
The resulting .tga output will show that some of the charts are flipped randomly.
overlapping_uvs.zip
I have also tried changing line 125 in xatlas.cpp to
And to have it compile change line 9713 in xatlas.cpp from
to the following,
I might have misunderstood the purpose of fixUnwinding as I assumed it would solve the issue of charts being flipped so happy to learn of any other setting that might solve this.
The text was updated successfully, but these errors were encountered: