The OBJ file format is a text file format.
# a comment line
These are always ignored.
It's quite common for comment to contain the number of verticies and/or faces an object used.
v x y z
The vertex command, this specifies a vertex by its three coordinates.
The vertex is implicitly named by the order it is found in the file.
For example, the first vertex in the file is referenced as '1', the second as '2' and so on.
vt u v [w]
The vertex texture command specifies the UV (and optionally W) mapping.
These will be floating point values between 0 and 1.
They really don't tell you anything by themselves, they must be grouped with a vertex in a 'f' face command.
vn x y z
The vertex normal command specifies a normal vector.
These are rarely used because the face command will use the 'v' commands to determine the normal instead.
f v1[/vt1][/vn1] v2[/vt2][/vn2] v3[/vt3][/vn3] ...
The face command specifies a polygon made from the verticies listed.
g name
The group name command specifies a sub-object grouping.
All 'f' face commands that follow are considered to be in the same group.
usemtl name
The use material command lets you name a material to use.
'프로그래밍' 카테고리의 다른 글
vi/vim shortcuts (0) | 2015.05.07 |
---|---|
-> 연산자 -> Operator (0) | 2015.04.15 |
리눅스 쉘 단축키 Keyboard shortcuts for bash (0) | 2015.04.09 |
C++ 파일 입출력 ofstream / ifstream (0) | 2015.04.09 |
Eigen3 Library (0) | 2015.03.27 |