Leave Your Message

OBJ Model Format&convert other format to Obj with Opt Converter

OBJ file is a 3D model file format. Developed by Alias | Wavefront company for 3D modelling and animation software ‘Advanced Visualizer’ a standard, suitable for 3D software models between the inter-conductor, but also through Maya read and write.

    Table of Contents

    1.1 Introduction to file formats
    2.2 File characteristics
    3.3 Basic Structure

    Introduction to File Format

    OBJ file format in 3D in detail
    OBJ file is Alias | Wavefront company for its set of workstation-based 3D modeling and animation software ‘Advanced Visualizer’ developed a standard 3D model file format, is very suitable for 3D software models for inter-conductivity, but also through Maya read and write. For example, in 3dsMax or LightWave built a model, want to transfer it to Maya inside the rendering or animation, export OBJ file is a good choice. Almost all well-known 3D software supports reading and writing OBJ files, although many of them require plug-ins to achieve.
    OBJ files are text files that can be opened directly with a writing pad for viewing and editing changes. In addition, there is a related binary file format (*.MOD), which is not disclosed as a patent and therefore not discussed here.

    File features

    The OBJ3.0 file format supports lines, polygons, surfaces and free-form curves. Straight lines and polygons are described by their points, while curves and surfaces are defined by their control points and additional information dependent on the curve type, which supports both regular and irregular curves, including those based on Bezier, B-spline, Cardinal/Catmull-Rom, and Taylor equations. Taylor equations) curves. Other features are as follows:
    (1) OBJ file is a 3D model file. It does not contain information such as animation, material properties, texture paths, dynamics, particles and so on.
    (2) OBJ files mainly support polygon (Polygons) model. Although it also supports curves (Curves), surfaces (Surfaces), point group materials (Point Group Materials), but Maya exported OBJ file does not include this information.
    (3) OBJ files support more than three points of the surface, which is very useful. Many other model file formats only support three points of the surface, so the model imported into Maya is often triangulated, which is very detrimental to the model for reprocessing.
    (4) OBJ files support normal and mapping coordinates. After adjusting the mapping in other software, the mapping coordinates information can be stored in the OBJ file, so that the file is imported into Maya only need to specify the path of the mapping file on the line, do not need to adjust the mapping coordinates.

    Basic structure

    OBJ files do not need any kind of file header (File Header), although often use a few lines of file information as the beginning of the comment file.OBJ file consists of a line of text, comment line with the symbol ‘#’ for the beginning, spaces and blank lines can be added to the file at will in order to increase the readability of the file. There are words in the line are marked by one or two letters, that is, the keyword (Keyword) at the beginning, the keyword can explain what kind of data in this line. Multiple lines can be logically joined together to form a single line by adding a concatenation character (\) at the end of each line. Note that the linker (\) can not be followed by spaces or tabs, otherwise it will lead to file errors.
    The following keywords can be used in OBJ files. In this list, the keywords are arranged according to data type and each keyword has a short description.
    Vertex data:
    v Geometric vertices.
    vt Texture vertices
    vn Vertex normals
    vp Parameter space vertices
    Free-form curves/surface attributes:
    deg Degree
    bmat Basis matrix
    step step size
    cstype Curve or surface type
    Elements:
    p Point
    l Line
    f Face
    curv Curve
    curv2 2D curve
    surf Surface
    Free-form curves/surface body statements.
    parm Parameter values
    trim Outer trimming loop
    hole Inner trimming loop
    scrv special curve
    sp special point
    end end statement
    Connectivity between free-form surfaces:
    con Connect
    Grouping: g Group name (Group).
    g Group name
    s Smoothing group
    mg Merging group
    o Object name
    Display/render attributes:
    bevel Bevel interpolation
    c_interp colour interpolation 
    d_interp dissolve interpolation
    lod Level of detail
    usemtl Material name
    mtllib Material library
    shadow_obj shadow casting
    trace_obj ray tracing
    ctech Curve approximation technique
    stech surface approximation technique (Surface approximation technique)
    The index of a face in OBJ can be positive or negative, when it is positive, it is the absolute index of the vertex, when it is negative (e.g.: f -a -b -c), it means that from the position of the face, the countdown of the first a, b, c vertices, and the index of vn, vt is also the same.
    OBJ files do not contain colour definition information for faces, but they can refer to material libraries, which are stored in a separate file with a ‘.mtl’ suffix. The keyword ‘mtllib’ means material library. [1]
    The material library contains the RGB (red, green, blue) defined values for diffuse, ambient, and specular, as well as other features such as specularity, refraction, and transparency.
    Once a material is specified by ‘usemtl’, all subsequent faces will use this material until the next ‘usemtl’ is encountered to specify a new material.