-
Notifications
You must be signed in to change notification settings - Fork 302
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
Texture coordinates are flipped vertically #13
Comments
Yup it's not a good workaround, thanks for sending over your models I'll check it out soon. |
I changed the converter to flip the uv coordinates vertically. I may have had some cases where the obj defined it's uv's as 0.0 as bottom and 1.0 as top, but it seems that most exporters do the opposite. Feel free to test your model, it works for me now. |
Thanks, it now works as expected. (Actually, I only noticed this because I'm also trying some OBJ-to-GLTF conversion, stumbled over this issue, wanted to compare it to the "reference" OBJ2GLTF implementation ... and saw that it produced the same result. Indeed, there seems to be no strict convention about texture coordinates in OBJ, but the one in the example seems to be more common) |
This has already been mentioned in #6 . The recommendation there was to flip the input image vertically. But this seems to be a dubious workaround.
Attached is a file that contains the Duck, as an OBJ. This OBJ is displayed properly in http://www.open3mod.com/ and http://meshlab.sourceforge.net/ . Converting it with OBJ2GLTF results in the second attached file (where I only fixed CesiumGS/gltf-pipeline#114 in the shader manually). In this glTF, the texture coordinates are flipped vertically. (I only checked this with my own glTF viewer, but it properly displays Duck model from the glTF samples, so something must be wrong with the converted one...)
DuckObj.zip
DuckGltf.zip
The text was updated successfully, but these errors were encountered: