-
Notifications
You must be signed in to change notification settings - Fork 221
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
Wrong calculation with faceVertexCount? #135
Comments
I've created a pull request which should fix the issue. #138 |
Better fixed by #138 |
mifth
added a commit
to mifth/xatlas_fixes
that referenced
this issue
Oct 29, 2024
I think it can be fixed in the computeCharts() function. Looking at it. |
Finally, I made've final changes/fixes for Quads/NGons. My commit: Pictures: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just stumbled over a problem with FaceVertexCount, i get an invalid memory access.
A sample would be:
face0: 3 vertices
face1: 4 vertices
face2: 5 vertices
this results in a total IndexCount of 12
when adding that mesh declaration i get a invalid memory access (i use XAtlas in c# using swig).
After looking at the code i found this code:
xatlas/source/xatlas/xatlas.cpp
Line 9096 in f700c77
According to my understanding
face * faceVertexCount + i
seems to be a logic error. To explain:This seems to calculate the offset/beginning of the indices of this face and add
i
. But the problem is that it assumes that all faces before also have the same faceVertexCount, which destroys the entire purpose of having faceVertexCount be an array in the first place.Please correct me if i misunderstand the logik here, but i will provide a PR, which will change the logic here to a variable which will sum up the previous faceVertexCounts.
The text was updated successfully, but these errors were encountered: