3

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.

Max
  • 6,286
  • 5
  • 44
  • 86

3 Answers3

2

The model is apparently using a volume texture.

Andreas Brinck
  • 51,293
  • 14
  • 84
  • 114
  • What is volume texture? Model is created in 3DS Max and it has texture as PNG file. Source texture is 2D. – Max Aug 06 '12 at 09:07
  • 1
    Not neccessarily a volume texture. Especially 3DS Max tends to put out 3D texCoords even for simple 2D mappings, depending on the UVW generation mode I guess. – Christian Rau Aug 06 '12 at 09:23
1

3rd coordinate should be ignored. Only first 2 are used to map texture.

Max
  • 6,286
  • 5
  • 44
  • 86
0

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

Coral Doe
  • 1,925
  • 3
  • 19
  • 36