Notice
Recent Posts
Recent Comments
Link
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Tags
more
Archives
Today
Total
관리 메뉴

따..딱히 공부하려고 포스팅하는 건 아니니까..!

Obj 파일 parser 제작 가이드라인 본문

그래픽스

Obj 파일 parser 제작 가이드라인

보즈리 2016. 5. 22. 02:01

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

Comments