通用场景描述

Exporting to USD Files

通用场景描述(USD)文件可以包含复杂的分层、重写和对其他文件的引用。Blender的USD导出器采取更简单的方法。导出时,场景中所有受支持的物体将导出,也可选择受其选择状态的限制。Blender不支持(尚未)导出USD层、变量、骨架动画等。

以下物体可以导出到 USD:

  • 网格(不同类型,见下文)。

  • 相机(目前仅支持透视相机,不支持正交相机)。

  • 灯(除面光外的所有类型)。

  • 毛发(导出为曲线,并仅限于父股)。

  • Volume (both static and animated volumes).

导出动画时,最终解算的网格将写入 USD。这意味着可以导出以下参数:

  • 静态网格。

  • 形变网格;此处网格的拓扑结构不会更改,但顶点的位置会随时间而变化。比如动画角色或弹跳(但不开裂)物体。

  • 任意动画网格; 在这里,拓扑确实会发生变化。比如,流体模拟的结果,液体飞溅会从主体上脱落。

  • Metaballs are exported as animated meshes.

../../_images/files_import-export_usd_example.png

Shot from Spring exported to USD and opened in USDView.

导出选项

导出到 USD 时,可以使用以下选项:

仅导出选中的物体

When checked, only selected objects are exported. Instanced objects, for example collections that are instanced in the scene, are considered ‘selected’ when their instancer is selected.

仅可见

Only exports objects that are not hidden. Invisible parents of exported objects are exported as empty transforms.

动画

勾选后,将导出整个场景帧范围。取消勾选中,仅导出当前场景帧。

毛发

勾选后,父级发股将导出为曲线系统。不会导出发股颜色。

UV 贴图

勾选后,包含被导出网格的 UV 坐标。USD中的 UV 贴图名称与 Blender 中相同。在USD中,默认名称为 st ,而在 Blender 中,默认名称为 UVMap。要导出为标准 UV 贴图名称 st,先将Blender中的 UV 贴图重命名为 st

法向

勾选,包含被导出网格的法线。这包括自定义循环法线。

材质

Exports material information of the object. By default the exporter approximates the 原理化BSDF node tree by converting it to USD’s Preview Surface format. If To USD Preview Surface is disabled, the material is set to the viewport materials of meshes.

Additional material properties are set in the Material grouping of options.

When a mesh has multiple materials assigned, a geometry subset is created for each material. The first material (if any) is always applied to the mesh itself as well (regardless of the existence of geometry subsets), because the Hydra viewport does not support materials on subsets. See USD issue #542 for more information.

设置用于

确定是使用集合、修改器的 视图渲染 可见性,还是可同时为 视口渲染 设置的任何其他属性。

材质

Additional options when Materials are enabled for export.

To USD Preview Surface

When exporting materials, approximate a 原理化BSDF node tree to by converting it to USD’s Preview Surface format. If disabled, the material is set to the viewport materials of meshes.

Warning

Not all nodes are supported; currently only Diffuse, Principle, Image Textures, and UVMap nodes are support.

Export Textures

Export textures referenced by shader nodes to a “textures” folder which in the same directory as the USD file.

Overwrite Textures

Allow overwriting existing texture files when exporting textures.

File References

相对路径

Use relative paths to reference external files (i.e. textures, volumes) in the exported USD file, otherwise use absolute paths.

试验特性

实例化

由于这是一个实验性选项。如果未勾选,副本物体将导出为真实物体,因此具有 100 个粒子的粒子系统(显示 100 个网格)将在导出文件中存在 100 个单独的网格。选中后,副本物体将作为对原始物体的引用导出。如果原始物体不是导出的一部分,则第一个副本将导出为真实物体并用作引用。

Exporter Limitations

单面/双面网格

USD 似乎既不支持双面不同材质或不同面组,因此 Blender 使用第一个材质中的标记将整个网格标记为单/双面。如果没有材质,则默认为双面。

网格法向

默认情况下,以USD表示的网格细分方案为”Catmull-Clark”,但 Blender 使用 ‘None’,表示导出多边形网格。这对于USD理解自定义法线是必需的;否则,网格将始终呈现为平滑。

顶点速度

目前只有流体模拟(一般不是微点)具有显式顶点速度。但是,这是导出速度的最重要情况,因为烘焙网格会一直更改拓扑,因此很难在后处理步骤中计算导入时的速度。

坐标系方位

Blender使用 Z 轴作为向上轴。由于USD支持 Y 向上和 Z向上,由 Blender 写出的 USD 文件始终使用 Z向上。

材质

导出材质的非常简单版本,仅使用 视图显示 颜色、金属度和粗糙度。

当有多个材质时,网格面将存储为几何子集,并且每个材质都分配给相应的子集。如果只有一个材质,则跳过此步骤。请注意,几何子集不是时间采样的,因此当动画网格更改拓扑时可能会中断。

毛发

仅导出父级发股,并且仅导出具有恒定颜色的。没有 UV 坐标,也没有关于法线的信息。

相机

仅导出透视模式相机。

灯光

USD不直接支持聚光灯,因此这些灯不会导出。

粒子

粒子仅在它们处于生存状态时写入,这意味着它们始终可见。目前没有代码处理将它们标记为在其生命周期之外不可见。

通过使用粒子的持久 ID 对物体名称添加后缀,使每个粒子变换具有唯一名称,从而导出粒子系统实例的物体。

实例化/引用

这仍然是一个实验功能,可以在导出到 USD 时启用。启用后,实例化物体网格将写入 USD 作为对原始网格的引用。网格的第一个副本是为实写而写入的,以下副本引用第一个副本。哪个网格被视为”第一个”或多或少是任意选择的。

Importing USD Files

USD files typically represent the scene as a hierarchy of primitives, or prims. Individual prims contain data to describe scene entities, such as geometry, lights, cameras and transform hierarchies. Blender’s USD importer converts USD prims to a hierarchy of Blender objects. Like the USD exporter, the importer does not yet handle more advanced USD concepts, such as layers and references.

The following USD data types can be imported as Blender objects:

  • 相机

  • 曲线

  • 灯光

  • 材质

  • 网格

  • 体积光渲染

For more information on how the various data types are handled, see the following descriptions of the Import Options.

Xform and Scope Primitives

USD provides an Xform prim type, containing transform data, which can be used to represent transform hierarchies and to organize the scene. Such Xform prims are imported as Blender empty objects.

USD also supports Scope primitives, which are entities that do not contain transform data, but which serve to group other element of the scene. Blender doesn’t have an exact counterpart to the concept of a scope, so such primitives are imported as Blender empties located at the origin. This is an imperfect representation, because empty objects have a transform and Scopes do not, but this approach nonetheless helps preserve the structure of the scene hierarchy.

动画

The importer supports two types of animation:

  • Animating transforms: If a USD primitive has time-varying transform data, a Transform Cache constraint will be added to the imported Blender object.

  • Animating geometry: Animating mesh and curve geometry is supported by adding a Mesh Sequence Cache modifier to the imported data. Geometry attribute (USD Primvar) animation is currently supported only for Color Attributes and UVs. Note that USD file sequences (i.e. a unique file per frame) are not yet supported.

材质

If a USD mesh or geometry subset has a bound material, the importer will assign to the Blender object a material with the same name as the USD material. If a Blender material with the same name already exists in the scene, the existing material will be assigned. Otherwise, a new material will be created.

If the USD material has a USD Preview Surface shader source, the 视图显示 color, metallic, and roughness are set to the corresponding USD Preview Surface input values.

There is also an experimental Import USD Preview option to convert USD Preview Surface shaders to Blender Principled BSDF shader nodes. This option can be lossy, as it does not yet handle converting all shader settings and types, but it can generate approximate visualizations of the materials.

坐标系方位

If the imported USD is Y up, a rotation will be automatically applied to root objects to convert to Blender’s Z up orientation.

导入选项

The following options are available when importing from USD:

相机

Import cameras (perspective and orthographic).

曲线

Import curve primitives, including USD basis and NURBS curves. (Note that support for Bézier basis is not yet fully implemented.)

灯光

Import lights. Does not currently include USD dome, cylinder or geometry lights.

材质

Import materials. See also the experimental Import USD Preview option.

网格

Import meshes.

体积(卷标)

Import USD OpenVDB field assets.

Path Mask

Import only the subset of the USD scene rooted at the given primitive.

比例|缩放

Value by which to scale the imported objects in relation to the world’s origin.

UV 坐标

Read mesh UV coordinates.

Color Attributes

Convert the USD mesh displayColor values to Blender’s Color Attributes.

分区

Create Subdivision Surface modifiers based on the USD SubdivisionScheme attribute.

Import Instance Proxies

Create unique Blender objects for USD instances.

Visible Primitives Only

Do not import invisible USD primitives. Only applies to primitives with a non-animated visibility attribute. Primitives with animated visibility will always be imported.

引导

Include primitives with purpose guide.

代理

Include primitives with purpose proxy.

渲染

Include primitives with purpose render.

Set Frame Range

Update the scene’s start and end frame to match those of the USD stage.

相对路径

Select the file relative to the blend-file.

Create Collection

Add all imported objects to a new collection.

Light Intensity Scale

Scale for the intensity of imported lights.

Material Name Collision

Behavior when the name of an imported material conflicts with an existing material.

  • Make Unique

    Import each USD material as a unique Blender material.

    Reference Existing

    If a material with the same name already exists, reference that instead of importing.

试验特性

Import USD Preview

Convert USD Preview Surface shaders to Principled BSDF shader networks.

Set Material Blend

If the Import USD Preview option is enabled, the material blend method will automatically be set based on the opacity and opacityThreshold shader inputs, allowing for visualization of transparent objects.