3rd texture coordinate in Wavefront *.OBJ file
-
24-06-2021 - |
Question
What is the meaning of 3rd component in texture coords in Wavefront *.OBJ file ?
File looks like
vt 0.8490 0.1109 -0.2498
vt 0.8580 0.1235 -0.2498
vt 0.8695 0.1338 -0.2498
vt 0.8828 0.1416 -0.2498
vt 0.9135 0.1474 -0.2360
vt 0.8981 0.1457 -0.2360
vt 0.8835 0.1409 -0.2360
UPDATE Model was created in 3DS Max and source texture was PNG file. So texture is 2D
UPDATE 2
When I flip second coordinate then texture looks properly when I render it with OpenGL. 3rd coordinate
u1 = u v1 = 1 - v
w - is not used at all.
Solution 2
3rd coordinate should be ignored. Only first 2 are used to map texture.
OTHER TIPS
The model is apparently using a volume texture.
vt specify the fact that the coordonates are texture coordonates.
Read more about the Wavefront .obj format. http://www.fileformat.info/format/wavefrontobj/egff.htm
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow