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

Exception: Invalid texture coordinates: (0.017; -0.0634) #35

Open
Franz362100 opened this issue Nov 22, 2022 · 3 comments
Open

Exception: Invalid texture coordinates: (0.017; -0.0634) #35

Franz362100 opened this issue Nov 22, 2022 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Franz362100
Copy link

I used the obj data exported by 3dmax, and the following error occurred.

!> Exception: Invalid texture coordinates: (0.017; -0.0634)

@pierotofy pierotofy added bug Something isn't working help wanted Extra attention is needed labels Nov 22, 2022
@STILLMOREzzz
Copy link

I have also encountered a similar problem, which is caused by the use of udim. I still don't know how to deal with this problem.
!> Exception: Invalid texture coordinates: (2.6630 0.2584)

@phoenixbf
Copy link

phoenixbf commented Feb 2, 2023

Hi, I have encountered the same problem. Maybe a possible fix could be clamping the uv coords parsed in Obj2Tiles.Library/MeshUtils.cs in [0,1]?

if (vtx.X < 0 || vtx.Y < 0 || vtx.X > 1 || vtx.Y > 1)
  throw new Exception("Invalid texture coordinates: " + vtx);

@phoenixbf
Copy link

any updates?
The process completely stops on several OBJs. Maybe it is sufficient to clamp uv coords instead of halting completely the process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants