OBJ (.obj) 导入/导出

OBJ 文件格式是仅包含描述各个几何体每个顶点的位置、贴图轴顶点的 UV 坐标、法线、构成每个网格面顶点的列表、以及贴图顶点等信息的一种简单的数据存储格式。

导入

To open, import, insert, and attach a file as a worksession

  1. From the File menu, click Open, Insert, Import, or Worksession > Attach.

  2. In the dialog box, select a supported file type.
  3. Click Open and configure the settings.
    When you open a non-3dm file and save the model, its filename will be the default 3dm filename.

OBJ 导入选项

导入 OBJ 群组为

群组
图层
物件名称
导入 OBJ 物件
仅导入对变目标
反转群组顺序
忽略贴图

从 OBJ 材质颜色设置显示颜色

启用此选项可以将 OBJ 文件中的材质颜色作为物件显示颜色导入。 不启用的话,则使用默认颜色导入。

将 OBJ 的 Y 轴对应为 Rhino 的 Z 轴
将 32 位元的贴图分割为数个文件
Always use these settings. Do not show this dialog again.

Saves the current settings and turns off the dialog display.

To turn the message back on

See also: ResetMessageBoxes command.

导出

To save as or export a Rhino model

  1. On the File menu, click Export Selected or Save As.
  2. In the dialog box, the Files of type list displays the currently supported file types for export.
  3. In the Files of type box, select the supported file type.
  4. In the File name box, select or type a file name.
  5. Specify what is to be saved.
  6. Options (For Rhino 3DM only)

    Save small

    Though clearing the render meshes makes the file smaller, it will shade and render more slowly the next time you open the file.

    Save geometry only

    Saves geometry objects only. No layers, materials, properties, notes, or units settings are saved. This is similar to exporting the objects. A new file is made, but it does not become your active Rhino model.

    Save textures

    Embeds external textures used by materials, environments and decals into the model.

    Save plugin data Saves data attached to objects or the document by plug-in applications.
  7. If the export can be configured, click the Options button to specify export settings.
  8. Mesh file types export NURBS surfaces as meshes either with the specified meshing options, or the document render mesh settings.

OBJ 导出选项

几何图形

曲面、多重曲面和挤出物件保存为

NURBS 物件

将 Rhino 的曲线及曲面会导出为 NURBS 曲线及曲面。

网格物件

与曲面形状近似的网格,在NURBS 物件创建网格对话框调整 Rhino 将 NURBS 曲面转换为网格的设定。

储存曲面的修剪曲线为

多重直线

导出修剪过的 NURBS 曲面时,将修剪曲线导出为形状近似的多重直线,以这个选项导出修剪曲线会有比较大的误差。这个选项原本是用于导出 OBJ 文件到 Alias,但您现在可以使用 IGES 或 STEP 导出物件到 Alias。

曲线

导出修剪过的 NURBS 曲面时,将修剪曲线导出为曲线,以这个选项导出修剪曲线会比导出为多重直线要精确。

格式

行末字节

Windows (CRLF)

使用归位字节 ( Carriage Return ) + 换行字节 ( Line Feed ) 两个控制码结束一行。

Mac OS X, Unix (LF)

只使用换行字节 ( Line Feed )。

Mac OS 9 (CR)

只使用使用归位字节 ( Carriage Return )。

__ 有效位数
导出材质定义

以与 .obj 同样的名称建立 .mtl 文件,.mtl 文件内含每一个物件的材质定义,材质的参考资料也会加入至 .obj 文件。

如果物件没有被赋予渲染材质,此选项将 OBJ 漫射材质设置为物件的显示材质。

没有材质的物件使用物件颜色导出

对于没有指定材质的物件导出为默认材质 (启用),否则使用物件的显示颜色导出 (禁用)。

将材质名称中的空格替换为下划线
将 Rhino 的 Z 轴对应为 OBJ 的 Y 轴

将 Z 轴朝上的模型转换为 Y 轴朝上。

长行缩排

选中此选项可能会导致下游应用程序无法读取输出文件。如果您不确定目标应用程序是否可以处理换行,请取消选中此选项。

名称

导出 Rhino 的物件名称

导出物件名称。

不要导出物件名称
为 OBJ 群组(常用于导出给 3dsMax 使用)
为 OBJ 物件

导出 Rhino 图层/群组名称

这些选项可以用于将物件导出至不支持巢状群组的程序 (例如:3ds max 导入 OBJ 的外挂程序 ),以 OBJ 导出给 3ds max 时请选择不要导出图层/群组名称

不要导出图层/群组名称
将图层导出为 OBJ 群组
将群组导出为 OBJ 群组
以 OBJ 群组排序
  • OBJ 是一种 ASCII 格式,不支持多字节字符集,如中文、日文和韩文。多字节字符名称将不会保留在 OBJ 中导出。

曲线

将多重直线导出为

1 阶B 样条曲线
具有多个 OBJ 顶点的一条 OBJ 线
具有两个 OBJ 顶点的一条 OBJ 线

网格

顶点熔接

不变
熔接

导出任意指定位置的单一顶点(也就是拓扑顶点)时,也导出所有与该顶点相关的法线和贴图坐标。

全部解除熔接

导出时将所有的网格顶点解除熔接。

细分网格

从细分曲面

将细分曲面转换为具有选定网格密度的网格。

极粗
粗糙
精细
极细
从细分控制点连线

将细分控制点连线抽离为网格。

Ngon

将 NGons 转化为三角面或四边面网格面。

保留

保留 NGons,但不将任何网格面转换为 NGons。

创建

Keeps NGons, and converts each planar region (red) into an n-gon. The planar region (blue) with an inner boundary will not be converted.

___最小面数

网格面小于此数值的平面区域将不会转换为 NGons。


导出贴图坐标
导出顶点法线
导出顶点颜色
0.0-1.0

保存顶点颜色的RGB值,范围在 0 到 1.0 之间。

0-255

保存顶点颜色的RGB值,范围在 0 到 255 之间。

  • If you want to bake textures in assigned materials into vertex colors, make a mesh and use ComputeVertexColors first prior to exporting.

导出开放的网格

导出为三角面

将四边面转换为三角面,与 TriangulateMesh 指令相似。

使用渲染网格

启用文档网格设置导出物件。多边形网格导出选项将不会显示。物件的自定义网格 保存到 OBJ 文件。

禁用使用多边形网格导出选项导出物件。物件的自定义网格 将不会保存到 OBJ 文件中。

Always use these settings. Do not show this dialog again.

Saves the current settings and turns off the dialog display.

To turn the message back on

See also: ResetMessageBoxes command.

导出注意事项

  • 导出损坏的物件会导致导出失败,导出之前可以使用 SelBadObjects 指令找出损坏的物件。
  • Assign a material name to an object in Material Properties. This material name is exported in a .mtl file for use by the renderer.
  • 图层名称及物件名称导出至 OBJ 文件时会成为群组名称,图层或物件名称中的空格会转换为底线字节 ( _ )。

请参考

维基百科: Wavefront OBJ。