Wavefront .obj file
≈ 5 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
OBJ (or .OBJ) is a geometry definition file format first developed by Wavefront Technologies for The Advanced Visualizer animation package. It is an open file format and has been adopted by other 3D computer graphics application vendors. The OBJ file format is a simple data-format that represents 3D geometry alone – namely, the position of each vertex, the UV position of each texture coordinate vertex, vertex normals, and the faces that make each polygon defined as a list of vertices, and texture vertices. Vertices are stored in a counter-clockwise order by default, making explicit declaration of face normals unnecessary. OBJ coordinates have no units, but OBJ files can contain scale information in a human readable comment line.
OBJ (or .OBJ) is a geometry definition file format first developed by Wavefront Technologies for The Advanced Visualizer animation package. It is an open file format and has been adopted by other 3D computer graphics application vendors. The OBJ file format is a simple data-format that represents 3D geometry alone – namely, the position of each vertex, the UV position of each texture coordinate vertex, vertex normals, and the faces that make each polygon defined as a list of vertices, and texture vertices. Vertices are stored in a counter-clockwise order by default, making explicit declaration of face normals unnecessary. OBJ coordinates have no units, but OBJ files can contain scale information in a human readable comment line.
Material template library
The Material Template Library format (MTL) or File Format is a companion file format to .OBJ, also defined by Wavefront Technologies, that describes surface shading (material) properties of objects within one or more .OBJ files. A .OBJ file references one or more files (called "material libraries"), and from there, references one or more material descriptions by name. files are ASCII text that define the light reflecting properties of a surface for the purposes of computer rendering, and according to the Phong reflection model. The standard has widespread support among different computer software packages, making it a useful format for interchange of materials. The MTL format, although still widely used, is outdated and does not fully support later technologies such as specular maps and parallax maps. However, due to the open and intuitive nature of the format, these can easily be added with a custom MTL file generator. The MTL format defines a number of formats. # others use 'Tr' (inverted: Tr = 1 - d) Tr 0.1 Transparent materials can additionally have a Transmission Filter Color, specified with "Tf". # Transmission Filter Color (using R G B) Tf 1.0 0.5 0.5 # Transmission Filter Color (using CIEXYZ) - y and z values are optional and assumed to be equal to x if omitted Tf xyz 1.0 0.5 0.5 # Transmission Filter Color from spectral curve file (not commonly used) Tf spectral .rfl A material can also have an optical density for its surface. This is also known as index of refraction. # optical density Ni 1.45000 Values can range from 0.001 to 10. A value of 1.0 means that light does not bend as it passes through an object. Increasing the optical density increases the amount of bending. Glass has an index of refraction of about 1.5. Values of less than 1.0 produce bizarre results and are not recommended. Multiple illumination models are available, per material. Note that it is not required to set a transparent illumination model in order to achieve transparency with "d" or "Tr", and in modern usage illum models are often not specified, even with transparent materials. The illum models are enumerated as follows: 0. Color on and Ambient off 1. Color on and Ambient on 2. Highlight on 3. Reflection on and Ray trace on 4. Transparency: Glass on, Reflection: Ray trace on 5. Reflection: Fresnel on and Ray trace on 6. Transparency: Refraction on, Reflection: Fresnel off and Ray trace on 7. Transparency: Refraction on, Reflection: Fresnel on and Ray trace on 8. Reflection on and Ray trace off 9. Transparency: Glass on, Reflection: Ray trace off 10. Casts shadows onto invisible surfaces illum 2 # base_value = brightness, gain_value = contrast -o u [v [w]] # Origin offset (default 0 0 0) -s u [v [w]] # Scale (default 1 1 1) -t u [v [w]] # Turbulence (default 0 0 0) -texres resolution # texture resolution to create -clamp on | off # only render texels in the clamped 0-1 range (default off) # When unclamped, textures are repeated across a surface, # when clamped, only texels which fall within the 0-1 # range are rendered. -bm mult_value # bump multiplier (for bump maps only) -imfchan r | g | b | m | l | z # specifies which channel of the file is used to # create a scalar or bump texture. r:red, g:green, # b:blue, m:matte, l:luminance, z:z-depth.. # (the default for bump is 'l' and for decal is 'm') For example, says to use the red channel of bumpmap.tga as the bumpmap bump -imfchan r bumpmap.tga For reflection maps... -type sphere # specifies a sphere for a "refl" reflection map -type cube_top | cube_bottom | # when using a cube map, the texture file for each cube_front | cube_back | # side of the cube is specified separately cube_left | cube_right
See also
FDM printing file formats glTF Object file OFF (file format) Relocatable Object Module Format STL (file format) PLY (file format) is an alternative file format offering more flexibility than most stereolithography applications.
References
Text derived from https://en.wikipedia.org/w/index.php?oldid=1366682720 under CC BY-SA 4.0; modifications have been made.