Can someone here help a 3d noob out? I am working with the three.js cookbook, specifically 04.14-create-custom-uv-mapping I obviously am missing something in my limited understanding of obj/mtl files.
I understand everything but one confusing point. In the obj file it has a
usemtl Material
for 1 face and then
usemtl Material_NONE
for the remaining 5 faces. I understand the texture being on face 1, but I am really confused as to why it is on the other 5 faces since in the mtl file it does not reference a texture file (there is no map_Kd entry for Material_NONE
like there is for Material
). What am I missing in my understanding??
It looks to me like Material_NONE has no texture and therefore the other 5 faces should not have any textures (since none were specified in the MTL file.
Please help me understand this.
MTL file
# uvmap.mtl
newmtl Material
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd /Users/jos/git/threejs-cookbook/assets/textures/debug.png
newmtl Material_NONE
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
OBJ file
# uvmap.obj
#
mtllib uvmap.mtl
o Cube
v 1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -0.999999
v 0.999999 1.000000 1.000001
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 -1.000000
vt 0.007479 0.803149
vt 0.412073 0.803149
vt 0.408812 0.995782
vt 0.004218 0.995782
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
usemtl Material
s off
f 1/1 5/2 6/3 2/4
usemtl Material_NONE
f 1/5 2/6 3/7 4/8
f 5/5 8/6 7/7 6/8
f 2/5 6/6 7/7 3/8
f 3/5 7/6 8/7 4/8
f 5/5 1/6 4/7 8/8