This shows you the differences between two versions of the page.
— | extendedobj [2023/03/19 13:58] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Extended Wavefront OBJ format ====== | ||
+ | |||
+ | ===== About ===== | ||
+ | |||
+ | Obj is a simple 3d file format. | ||
+ | Antiryad Gx importer and exporter use extended format when importing and exporting Wavefront OBJ files to break some limitations.\\ | ||
+ | Some new specifications are based on adoptions found on other softwares. | ||
+ | |||
+ | ===== Format ===== | ||
+ | |||
+ | < | ||
+ | #Comment begin with sharp symbol. | ||
+ | |||
+ | #External material library. | ||
+ | #Library can be embedded in the OBJ file, | ||
+ | # in this case mtllib should reference an obj file (ex: current obj file name, this work with Blender 3d) | ||
+ | # instead of a mtl file <span style=" | ||
+ | mtllib filename | ||
+ | |||
+ | #Animation frames per second <span style=" | ||
+ | fps s | ||
+ | |||
+ | #Object | ||
+ | o [name] | ||
+ | |||
+ | #Object group | ||
+ | g [name] | ||
+ | | ||
+ | #List of vertices | ||
+ | v x y z [w] | ||
+ | | ||
+ | #Current vertex color, several colors per vertex is allowed <span style=" | ||
+ | vc r g b a | ||
+ | |||
+ | #Current vertex joint weights (0.0 to 1.0), 4 weights per vertex are available <span style=" | ||
+ | vw0 weight objectname\\ | ||
+ | vw1 weight objectname\\ | ||
+ | vw2 weight objectname\\ | ||
+ | vw3 weight objectname\\ | ||
+ | |||
+ | #List of texture coordinates 0 | ||
+ | vt u v [w] | ||
+ | |||
+ | #List of texture coordinates 1 to 3 <span style=" | ||
+ | vt1 u v [w]\\ | ||
+ | vt2 u v [w]\\ | ||
+ | vt3 u v [w] | ||
+ | |||
+ | #List of normals | ||
+ | vn x y z | ||
+ | |||
+ | #List of faces | ||
+ | f v/vt/vn v/vt/vn v/vt/vn ... | ||
+ | |||
+ | #Light <span style=" | ||
+ | l name x y z r g b radius | ||
+ | |||
+ | #Animation of current object or light using position (x y z), axis pivot vector (vx vy vz)\\ | ||
+ | and angle (a) in radian, repeat for each frames <span style=" | ||
+ | a x y z vx vy vz a | ||
+ | |||
+ | #Current material to use | ||
+ | usemtl name | ||
+ | |||
+ | #Material | ||
+ | newmtl name | ||
+ | |||
+ | #Ambient color | ||
+ | Ka r g b | ||
+ | |||
+ | #Diffuse color | ||
+ | Kd r g b | ||
+ | |||
+ | #Specular color | ||
+ | Ks r g b | ||
+ | |||
+ | #Alpha (dissolve) factor | ||
+ | d f # | ||
+ | |||
+ | # | ||
+ | illum m #m=[0;10] | ||
+ | |||
+ | #Specular exponent | ||
+ | Ns v # | ||
+ | |||
+ | #Sharpness reflections | ||
+ | sharpness v # | ||
+ | |||
+ | #Ambient texture map | ||
+ | map_Ka [options] filename | ||
+ | |||
+ | #Diffuse texture map | ||
+ | map_Kd [options] filename #Generally same as map_Ka | ||
+ | |||
+ | #Specular texture map | ||
+ | map_Ks [options] filename | ||
+ | |||
+ | #Specular highlight texture map | ||
+ | map_Ns [options] filename | ||
+ | |||
+ | #Alpha texture map | ||
+ | map_d [options] filename | ||
+ | |||
+ | #Bump texture map | ||
+ | map_bump [options] filename | ||
+ | bump [options] filename | ||
+ | |||
+ | # | ||
+ | disp [options] filename | ||
+ | |||
+ | #Stencil decal texture map | ||
+ | decal [options] filename | ||
+ | |||
+ | </ | ||