File: obj.rst

package info (click to toggle)
blender-doc 4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 253,604 kB
  • sloc: python: 13,030; javascript: 322; makefile: 113; sh: 107
file content (171 lines) | stat: -rw-r--r-- 6,103 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

*************
Wavefront OBJ
*************

.. reference::

   :Menu:      :menuselection:`File --> Import/Export --> Wavefront (.obj)`

OBJ format is a popular plain text format, however, it has only basic geometry and material support.

.. note::

   There is no support for armatures, lights, cameras, empty objects, parenting, or transformations.
   See `Compatibility`_ for more information.


.. _bpy.ops.wm.obj_import:

Importing
=========

Import geometry and curves to the OBJ format.

If there is a matching ``.MTL`` for the OBJ then its materials will be imported too.


General
-------

Scale
   Value by which to scale the imported objects in relation to the world's origin.
Clamp Bounding Box
   OBJ-files often vary greatly in scale, this setting clamps the imported file to a fixed size.
Forward Axis, 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.


Options
-------

Split By Object
   Import each OBJ "object name" group (``o``) as a separate object.
Split By Group
   Import each OBJ "object name" group (``g``) as a separate object.
Vertex Groups
   Import OBJ groups as vertex groups.
Validate Meshes
   Check the imported mesh for corrupt data and fix it if necessary.
   When disabled, erroneous data may cause crashes displaying or editing the meshes.
   This option will make the importing slower but is recommended, as data errors are not always obvious.
Path Separator
   Character used to separate an object's name into a hierarchical
   structure using :doc:`/scene_layout/collections/index`.


.. _bpy.ops.wm.obj_export:

Exporting
=========

Export geometry and curves to the OBJ format.


General
-------

Include: Selected Only
   Only export the selected objects. Otherwise export all objects in the scene.
Scale
   Global scale to use on export.
Forward Axis, Up Axis
   Since many applications use a different axis for 'Up', there are axis conversion 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.


Geometry Properties
^^^^^^^^^^^^^^^^^^^

UV Coordinates
   Write out the active UV layers coordinates from Blender.
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.
Colors
   Write out the active vertex colors attribute layer, if present. Colors are exported in
   "xyzrgb" OBJ extension format.
Curves as NURBS
   Write out NURBS curves as OBJ NURBS rather than converting to geometry.
Triangulated Mesh
   Write out quads as two triangles. Some programs only have very basic OBJ support and only support triangles.
Apply Modifiers
   Export objects using the evaluated mesh, meaning the resulting mesh after all
   :doc:`Modifiers </modeling/modifiers/index>` have been calculated.
Properties
   For properties that have different settings for the viewport/final render pick which is used for output.
   One example where this is important is the :doc:`/modeling/modifiers/generate/subdivision_surface`.

   :Viewport: Use viewport properties.
   :Render: Use final render properties.


Grouping
--------

Object Groups
   Write out each Blender object as an OBJ object.

   .. note::

      Note that as far as Blender is concerned there is no difference between OBJ Groups and Objects,
      this option is only included for applications that treat them differently.
Material Groups
   Generate an OBJ group for each part of a geometry using a different material.
Vertex Groups
   Export the name of the vertex group of a face.
   It is approximated by choosing the vertex group with the most members among the vertices of a face.
Smooth Groups
   Write Blender's sharp edges as smooth groups.
Smooth Group Bitflags
   Generate Bitflags for smooth Groups.


Materials
---------

Write out the MTL-file along with the OBJ. Most importers that support OBJ will also read the MTL-file.

PBR Extensions
   Export MTL library using PBR extensions (roughness, metallic, sheen, clearcoat, anisotropy, transmission).
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 your own system. Relative paths, on the other hand, are more portable
   but mean that 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.


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.

Frame Start, End
   The first and last frame to export, used to determine the range of exported frames.


Compatibility
-------------

NURBS surfaces, text3D and metaballs are converted to meshes at export time.