Wavefront OBJ¶
Reference
Category: | Import-Export |
---|---|
Menu: |
OBJ is a widely used de facto standard in the 3D industry. The OBJ format is a popular plain text format, however, it has only basic geometry and material support.
- Mesh: vertices, faces, edges, normals, UV's
- Separation by groups/objects
- Materials/textures
- NURBS curves and surfaces
注釈
There is no support for mesh vertex colors, armatures, animation, lights, cameras, empty objects, parenting, or transformations.
警告
- Importing very large OBJ-files (over a few 100mb), can use a lot of RAM.
- OBJ's export using Unix line endings
\n
even on windows, if you open the files in a text editor it must recognize\n
line endings.
Usage¶
Import/Export geometry and curves to the OBJ format.
If there is a matching .MTL
for the OBJ then its materials will be imported too.
Properties¶
Import¶
- Smooth Groups
- Surround OBJ smooth groups by sharp edges. Note that these will only be displayed when the Edge Split modifier is enabled.
- Lines
- Import OBJ lines and two-sided faces as mesh edges.
- Split/Keep Vertex Order
- When importing an OBJ it's useful to split up the objects into Blender objects, named according to the OBJ-file. However, this splitting looses the vertex order which is needed when using OBJ-files as morph targets. It also looses any vertices that are not connected to a face so this must be disabled if you want to keep the vertex order.
- Split by Object & Split by Group
When importing an OBJ it's useful to split up the objects into Blender objects, named according to the OBJ-file. However, this splitting looses the vertex order which is needed when using OBJ-files as morph targets. It also looses any vertices that are not connected to a face, so this must be disabled if you want to keep the vertex order.
As far as Blender is concerned OBJ Objects and Groups are no difference, since they are just two levels of separation, the OBJ groups are not equivalent to Blender groups, so both can optionally be used for splitting.
- Clamp Size
- OBJ-files often vary greatly in scale, this setting clamps the imported file to a fixed size.
- Forward / Up Axis
Since many applications use a different axis for 'Up', these are axis conversion for these settings, Forward and Up axes -- By mapping these to different axes you can convert rotations between applications default up and forward axes.
Blender uses Y Forward, Z Up (since the front view looks along the +Y direction). For example, it's common for applications to use Y as the up axis, in that case -Z Forward, Y Up is needed.
- Image Search
- This enables a recursive file search if an image file can't be found.
Export¶
- Selected Objects
- Only export the selected objects. Otherwise export all objects in the scene.
- Animation
- Exports a numbered OBJ for each frame from the start to the end frame. Please be aware that this can take quite a long time.
- Apply Modifiers
- Export mesh objects as seen in the 3D Viewport with all modifiers applied. Mostly you will want this unless you are exporting a subdivision surface cage.
- Edges
- Export loose edges as two-sided faces. Mostly there is no need for this but it's enabled by default to ensure all geometry data is exported.
- Normals
Write out Blender's face and vertex normals (depending on the faces smooth setting).
Mostly this isn't needed since most applications will calculate their own normals but to match Blender's normal map textures you will need to write these too.
- UVs
- Write out the active UV layers coordinates from Blender.
- Materials
- Write out the MTL-file along with the OBJ. Most importers that support OBJ will also read the MTL-file.
- Triangulate
- Write out quads as two triangles. Some programs only have very basic OBJ support and only support triangles.
- Polygroups
- Write faces into OBJ groups based on the meshes vertex group. Note that this does a best guess since a face's vertices can be in multiple vertex groups.
- NURBS
- Write out NURBS curves as OBJ NURBS rather than converting to geometry.
- Objects as OBJ Objects / Groups
Write out each Blender object as an OBJ object.
注釈
Note that as far as Blender is concerned there is no difference between OBJ Groups and Objects, this option is only included for applications which treat them differently.
- Material Groups
- Create OBJ groups per material.
- Keep Vertex Order
- Maintain vertex order on export. This is needed when OBJ is used for morph targets.
- Scale
- Global scale to use on export.
- Forward / Up Axis
Since many applications use a different axis for 'Up', there are axis conversion there settings, Forward and Up axis -- By mapping these to different axis you can convert rotations between applications default up and forward axis.
Blender uses Y Forward, Z Up (since the front view looks along the +Y direction). For example, its common for applications to use Y as the up axis, in that case -Z Forward, Y Up is needed.
- Path Mode
When referencing paths in exported files you may want some control as to the method used since absolute paths may only be correct on you're own system. Relative paths on the other hand are more portable but mean you have to keep your files grouped when moving about on your local file system. In some cases the path doesn't matter since the target application will search a set of predefined paths anyway so you have the option to strip the path too.
Auto: Uses relative paths for files which are in a subdirectory of the exported location, absolute for any directories outside that. Absolute: Uses full paths. Relative: Uses relative paths in every case (except when on a different drive on windows). Match: Uses relative / absolute paths based on the paths used in Blender. Strip Path: Only write the filename and omit the path component. Copy: Copy the file on exporting and reference it with a relative path.
Compatibility¶
NURBS surfaces, text3D and metaballs are converted to meshes at export time.
Missing¶
Some of the following features are missing:
- NURBS Surfaces -- this could be added but is not widely used.
- Advanced Material Settings -- There are material options documented but very few files use them and there are few examples available.
- Normals -- Blender ignores normals from imported files, recalculating them based on the geometry.