30 lines
758 B
Plaintext
30 lines
758 B
Plaintext
* The OBJ file format
|
|
|
|
OBJ is a file format for 3D models. It is line based with every line
|
|
starting with an identifier for what the line describes. A file looks like this:
|
|
|
|
``
|
|
# comment
|
|
o name of object
|
|
|
|
# list of vertices
|
|
v 1.000000 1.000000 -1.000000
|
|
...
|
|
|
|
# list of texture coordinates (0.0 to 1.0)
|
|
vt 0.875000 0.500000
|
|
...
|
|
|
|
# list of vertex normals
|
|
vn 0.0000 1.0000 0.0000
|
|
...
|
|
|
|
# face elements. these consist of indices of the previous groups. this face
|
|
# element consists of the fifth, third, and first vertex (first number), and
|
|
# these vertices are coupled with the first, second, and third texture
|
|
# coordinate (second number) as well as the first vertex normal (third
|
|
# number). note that these indices start on 1, not 0.
|
|
f 5/1/1 3/2/1 1/3/1
|
|
...
|
|
``
|