OBJ File Format 2005/10/03
CAIG Lab,NCTU2 OBJ File Format A text file format First character of each line specifies the type of command #: just some comment ex: # 1760 vertices v: vertex ’ s geometric position (float) ex: v
CAIG Lab,NCTU3 OBJ File Format (Cont.) vt: texture coordinate (float from 0~1) ex: vt vn: normal vector (float) ex: vn f: polygonal face (int) f int int int … f int/int int/int int/int …
CAIG Lab,NCTU4 OBJ File Format (Cont.) f int/int/int int/int/int … ex: f f 1/1/1 2/2/2 3/3/3 4/4/4 f 1//1 2//2 3//3 4//4 Must be flat and convex
CAIG Lab,NCTU5 OBJ File Format (Cont.) g: group name ex: g body usemtl: name a material to use ex: usemtl black s: group number ex: s 4