-
Notifications
You must be signed in to change notification settings - Fork 136
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
UV texture map appears to be wrong #43
Comments
Hi, If there is something wrong I think it's in the uv map of the model but not the texture mapping code. Can you share the model, textures, and expected results? |
Hi, I understand your concern. However, I have tried many obj/mtl with texture and not one loads correctly. For example a Free obj from CGTrader: https://www.cgtrader.com/items/234469/download-page. If you load it in meshlab you can see the expected result (note that you might need to edit file paths in the mtl file). You can load it with the pose estimation tutorial with this camera setup:
|
Looks like a bug in the obj loader. Let me check. |
Looks like obj textures conventionally have (0, 0) at lower left, so I need to flip y coordinate to obtain correct uv mapping. I added a flag "flip_tex_coords" in load_obj and set the default to true (similar to Mitsuba). Now the rendering matches MeshLab's result: Let me know if the latest commit fixed your problem or not. |
I was suspecting something like this. Perfect it works now, thank you! |
Hello,
I have been trying to load a model with a non trivial texture Map (Kd_map), I think there is a problem with the texture mapping. To be sure I altered the chessboard texture of the teapot with asymmetries and rendered it with redner, I also opened the same model with the modified texture in meshlab, and saw that the mapping were really different. I've tried to reverse "(1-x)" the uvs_pool when loading the obj file but I couldn't get the same mapping as in meshlab so it appears more complex than that.
The text was updated successfully, but these errors were encountered: