Wavefront OBJ

参考

类别

导入 - 导出

菜单

文件‣ 导入/导出 ‣ Wavefront (.obj)

OBJ是行业内广泛使用的事实标准。OBJ格式是一种流行的纯文本格式,但它只支持基本的几何与材质信息。

  • Mesh: vertices, faces, edges, normals, UVs

  • 按组/物体分离

  • 材质/纹理

  • NURBS曲线和曲面

Note

不支持网格顶点颜色,骨架,动画,灯光,相机,空物体,父子关系或变换。

Note

Blender目前仅支持复杂的基于节点的着色。OBJ 具有固定的类管道材质支持,此插件使用 Blender特色的 通用封装 来在两者之间转换。

Warning

  • 导入非常大的OBJ文件(超过100mb),会消耗大量内存。

  • 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.

用法

导入/导出几何体及曲线到OBJ格式。

如果有与OBJ匹配的 .MTL 文件,那它的材质也会被导入。

属性

导入

包括

图像查找

当无法找到图像文件时启用递归搜索。

平滑组 Smooth Groups

通过锐边环绕OBJ平滑组。 请注意,仅在启用“边缘分割”修改器时才会显示这些内容。

行数(线)

将OBJ线和双面导入为网格边。

变换

钳制尺寸

OBJ文件的比例通常差别很大,此设置会将导入的文件固定为固定大小。

向前/向上轴

由于许多应用程序使用不同的“向上”轴,因此存在转换轴向设置,向前和向上轴——通过映射不同的轴,您可以转换应用程序默认的向上和向前轴之间的旋转。

Blender使用Y轴向前,Z轴向上(因为前视图沿+Y轴方向)。 例如,许多应用程序通常使用Y作为向上轴,在这种情况下,需要使用-Z轴向前,Y轴向上。

几何数据(Geometry)

拆分/保持顶点顺序

When importing an OBJ it's useful to split up the objects into Blender objects, named according to the OBJ-file. However, this splitting loses the vertex order which is needed when using OBJ-files as morph targets.It also loses any vertices that are not connected to a face or edge so this must be disabled if you want to keep the vertex order and loose vertices.

按物体拆分和按组拆分

When importing an OBJ it's useful to split up the objects into Blender objects, named according to the OBJ-file. However, this splitting loses the vertex order which is needed when using OBJ-files as morph targets. It also loses any vertices that are not connected to a face, so this must be disabled if you want to keep the vertex order.

就Blender而言,OBJ物体和组没有区别,因为它们只是两个分离级别,OBJ组不等同于Blender组,因此两者都可以选择用于拆分。

导出

包括

选定的物体

只导出选定的物体,否则将导出场景中所有物体。

物体作为OBJ物体/组

将每个Blender物体导出为OBJ物体。

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.

材质组

为每种材质创建OBJ组。

动画

导出从起始帧到结束帧的每一帧为带标号的OBJ文件。请注意这将划分相当长的时间。

变换

比例|缩放

导出时使用全局比例。

路径模式

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 are 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.

自动

对于导出位置的子目录中的文件使用相对路径,对于此外的任何目录使用绝对路径。

绝对

使用完整路径。

相对

Uses relative paths in every case (except when on a different drive on Windows).

匹配

依照在Blender中用到的路径使用相对/绝对路径。

片段路径

只写入文件名并忽略路径组件。

复制

在导出时复制文件并使用相对路径引用它。

向前/向上轴

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使用Y轴向前,Z轴向上(因为前视图沿+Y轴方向看)。 例如,许多应用程序通常使用Y作为向上轴,在这种情况下,需要使用-Z轴向前,Y轴向上。

几何数据(Geometry)

应用修改器

导出三维视口中显示的网格物体,并应用所有修改器。 除非您要导出细分曲面变形笼,否则大多数情况下您都会想要这个。

平滑组 Smooth Groups

Write Blender's sharp edges as smooth groups.

Bitflag组

待补充。

写入法线

导出Blender的面和顶点的法线(取决于曲面平滑设置)。

大多数情况下,这不是必需的,因为大多数应用程序将计算自己的法线,但为了匹配Blender的法线贴图纹理,您也需要编写它们。

包括UV

从Blender导出活动的UV层坐标。

写入材质

导出OBJ时一并写入MTL文件。大多数支持OBJ的导入器也会读取MTL文件。

三角面

将四边面导出为两个三面角形。有些程序只有非常基本的OBJ支持,只支持三角面。

曲线作为 NURBS

将NURBS曲线写为OBJ NURBS而不是转换为几何体。

多边形组

根据网格顶点组将面写入OBJ组。请注意,这是最佳猜测,因为面顶点可以位于多个顶点组中。

保持顶点顺序

在导出时保持顶点顺序。当OBJ用于变形目标时,这是必需的。

兼容性

NURBS表面,文本3D及变形球在导出时会被转换为网格。

缺失

以下部分功能缺失:

  • NURBS曲面——可以添加,但并未广泛使用。

  • 高级材质设置——记录了材质选项,但很少有文件使用它们,并且可用的示例很少。

  • 法线——Blender会忽略导入文件中的法线,并根据几何体重新计算它们。