Obj Format Introduction _ Application Tips

Source: Internet
Author: User
Tags trim
There are two types of *.obj files that we often see: the first is an obj file (also called the destination file) based on the COFF (Common object) format, which is used to compile the application, and the second is alias| The obj model file Wavefront company launched. The obj file format I'm going to talk about is the second type of-obj model file. <BR> Speaking of 3D file format, we must not feel unfamiliar, "*.3ds", "*.max", "*.LW", "*.MB", "*.dxf", "*.obj", I believe everyone can enumerate several. But the specific characteristics of obj file, but few people can give a more satisfactory description. A lot of people know that obj file is from the use of Poser began, Poser is a human body modeling software, to the poser generated by the human body exported to other 3D software for reprocessing, the use of obj file. The obj file is a standard 3D model file format and is ideal for the mutual guidance of 3D software models. For example, you build a model in 3dsMax or Lightwave, you want to transfer it to Maya to render or animate, export obj file is a good choice. At present, almost all well-known 3D software support obj file read and write, but many software need to do this through plug-ins.
In addition, as an excellent file format, many game engines also support the reading of obj files. What's the use of understanding obj file formats? If you don't learn to program, it's not really useful. However, the interaction between 3D software models is a very common thing, unfortunately, the current 3D software model export function is not so perfect, often have a lack of surface and less line situation, and sometimes encountered the export model can not open the situation. If the situation is very urgent, you will do whatever it takes to study carefully and expect to find the cause and solve the problem. In this case, my tutorial may be of great help to you
The obj file is a text file format, which means you can open it directly with WordPad to view the changes, and if you can read the contents of each line, I believe it is not far from your success to solve the problem.
The obj file is a file format developed by Wavefront company for its set of workstation based 3D modeling and animation software "Advanced Visualizer".
The new version of obj is v3.0, replacing the previous v2.11 version.
The OBJ3.0 format supports polygons (Polygon), Straight lines (Lines), surfaces (Surfaces), and Free-form curves (Free-form Curves).
The lines and the splines are described by their points, and the curves and surfaces are defined according to their control points and additional information attached to the type of the curve. This information supports regular and irregular curves, including those based on Bezier (Bézier) curves, B-spline (B-spline), cardinality (Cardinal/catmull-rom splines), and Taylor equations (Taylor equations).
Obj file--Features
(1) OBJ is a 3D model file and therefore does not contain information such as animations, material characteristics, texture paths, dynamics, particles, and so on.
(2) The obj file mainly supports the polygon (polygons) model.
(3) The obj file supports more than three points.
(4) The obj file supports normal and map coordinates.
The obj file does not support a polygon face with holes
The obj file does not contain surface color definition information, but can refer to the material library, which is stored in a separate file with the suffix ". MTL". The keyword "Mtllib" is the meaning of the material library. The material library contains the diffuse (diffuse) of the material, the environment (ambient), the definition value of the gloss (specular), the "USEMTL" specifies the material, and the subsequent face uses the material until it encounters the next "USEMTL" to specify the new material.
Obj file--Basic structure
The obj file consists of a line of text that starts with a "well" sign (#), and spaces and blank lines can be added to the file to increase the readability of the file. A line of words begins with one or two marked letters, which are keywords (Keyword), which indicate what data the line is. Multiple lines can logically be joined together to represent a row by adding a connector (\) at the end of each line.
Note the Space or tab cannot appear after the connector (\), or it will cause a file error.
The following keywords can be used in obj files.
In this list, the keywords are arranged according to the data type, and each keyword has a short description.
Vertex (Vertex data):
V Geometry vertex (geometric vertices)
VT Map coordinate point (texture vertices)
VN vertex normals (Vertex normals)
VP parameter Spaces Vertex (Parameter space vertices)
Free form curve (free-form curve)/surface properties (surface attributes):
Deg degree (Degree)
Bmat Foundation matrices (Basis matrix)
Step size (steps size)
Cstype curve or surface type (Curve or surface type)
Element (Elements):
P-Dots (point)
L (line)
F Side (Face)
CURV Curve (Curve)
Curv2 2D curve (2D curve)
Surf surface (Surface)
Free form curve (free-form curve)/Surface principal statement (Surface body statements):
Parm parameter values (Parameter values)
Trim external trim loop (Outer trimming loop)
Hole internal renovation cycle (Inner trimming loop)
SCRV Special curve (Special curve)
SP Special points (Special point)
End Statement statement
The connection between free form surfaces (connectivity between free-form surfaces):
Con connection (Connect)
-Group (Grouping):
Group G name (team name)
s smooth set (smoothing group)
MG Merge Group (merging group)
O Object Name
-Show (Display)/render properties (render attributes):
Bevel Guide angle interpolation (bevel interpolation)
C_interp color interpolation (colour interpolation)
D_interp dissolution interpolation (dissolve interpolation)
LOD detail hierarchy (level of detail)
USEMTL Material name (Material name)
Mtllib Library (Material library)
Shadow_obj projection Shadow (shadow casting)
Trace_obj ray Tracing (ray tracing)
CTech curve approximation technique (Curve approximation technique)
Stech Surface approximation technology (Surface approximation technique)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.