Obj 파일 parser 제작 가이드라인
Starting character / word | Meaning |
# | Comment line |
v | Defines vertex points in 3D space, with coordinates of( x, y,z,w), w is optional |
vt | Define texture coordinates (u,v,w) where w is optional |
vn | Defines normals (x,y,z) |
f | Defines a face, composed of index of vertex/texture/normal. Note that texture and normal is optional. If both texture and normal are absent f 1 2 3 If texture exists, but normal absent f 1/3 2/2 3/4 If texture is absent, but normal exists f 1//3 2//2 3//4 if all them exist f 1/2/3 2/3/2 3/2/4 each face can contains more than 3 elements |
mtllib | Materials that describe the visual aspects of the polygons are stored in external .mtl files. The .mtl file may contain one or more named material definitions. |
o | Object name |
g | group name |
usemtl | Defines a material to use, this material will continue to be used until another usemtl line (corresponding material is saved in .mtl file) |
s | Smooth shading |
mtllib | Point to an external .mtl file that saves the object materials |
출처 : http://web.cse.ohio-state.edu/~hwshen/581/Site/Lab3_files/Labhelp_Obj_parser.htm