102 lines
2.1 KiB
Plaintext
102 lines
2.1 KiB
Plaintext
|
# Cube OBJ File with Sky Map Texture Mapping
|
||
|
# Each face of the cube is mapped to a 1/6th segment of the sky map texture.
|
||
|
|
||
|
mtllib cube_sky.mtl
|
||
|
|
||
|
# Vertex Positions
|
||
|
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 -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 -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 -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 -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 -1.000000
|
||
|
v 1.000000 -1.000000 -1.000000
|
||
|
v 1.000000 -1.000000 1.000000
|
||
|
v -1.000000 -1.000000 1.000000
|
||
|
|
||
|
# Texture Coordinates
|
||
|
# Assuming the sky map is a horizontal strip with six equal sections.
|
||
|
|
||
|
# Front Face UVs (0/6 to 1/6 of the texture width)
|
||
|
vt 0.000000 0.000000
|
||
|
vt 0.166667 0.000000
|
||
|
vt 0.166667 1.000000
|
||
|
vt 0.000000 1.000000
|
||
|
|
||
|
# Back Face UVs (1/6 to 2/6 of the texture width)
|
||
|
vt 0.166667 0.000000
|
||
|
vt 0.333333 0.000000
|
||
|
vt 0.333333 1.000000
|
||
|
vt 0.166667 1.000000
|
||
|
|
||
|
# Left Face UVs (2/6 to 3/6 of the texture width)
|
||
|
vt 0.333333 0.000000
|
||
|
vt 0.500000 0.000000
|
||
|
vt 0.500000 1.000000
|
||
|
vt 0.333333 1.000000
|
||
|
|
||
|
# Right Face UVs (3/6 to 4/6 of the texture width)
|
||
|
vt 0.500000 0.000000
|
||
|
vt 0.666667 0.000000
|
||
|
vt 0.666667 1.000000
|
||
|
vt 0.500000 1.000000
|
||
|
|
||
|
# Top Face UVs (4/6 to 5/6 of the texture width)
|
||
|
vt 0.666667 0.000000
|
||
|
vt 0.833333 0.000000
|
||
|
vt 0.833333 1.000000
|
||
|
vt 0.666667 1.000000
|
||
|
|
||
|
# Bottom Face UVs (5/6 to 6/6 of the texture width)
|
||
|
vt 0.833333 0.000000
|
||
|
vt 1.000000 0.000000
|
||
|
vt 1.000000 1.000000
|
||
|
vt 0.833333 1.000000
|
||
|
|
||
|
# Faces
|
||
|
usemtl SkyMapMaterial
|
||
|
|
||
|
# Front Face
|
||
|
f 1/1 2/2 3/3
|
||
|
f 3/3 4/4 1/1
|
||
|
|
||
|
# Back Face
|
||
|
f 5/5 6/6 7/7
|
||
|
f 7/7 8/8 5/5
|
||
|
|
||
|
# Left Face
|
||
|
f 9/9 10/10 11/11
|
||
|
f 11/11 12/12 9/9
|
||
|
|
||
|
# Right Face
|
||
|
f 13/13 14/14 15/15
|
||
|
f 15/15 16/16 13/13
|
||
|
|
||
|
# Top Face
|
||
|
f 17/17 18/18 19/19
|
||
|
f 19/19 20/20 17/17
|
||
|
|
||
|
# Bottom Face
|
||
|
f 21/21 22/22 23/23
|
||
|
f 23/23 24/24 21/21
|