通用场景描述(USD)

导入 USD 文件

USD 文件通常将场景表示为一个基元的层次结构,或 prims 。单个基元包含描述场景实体的数据,如几何体、灯光、摄像机和变换层次。Blender 的 USD 导入器将 USD 基元转换为 Blender 对象的层次结构。和 USD 导出器一样,导入器还不能处理更高级的 USD 概念,如图层和引用。

以下 USD 数据类型可以导入为 Blender 对象:

  • 摄像机

  • 曲线

  • 灯光

  • 材质

  • 网格

  • 基本形状

  • 体积/音量

有关如何处理各种数据类型的详细信息,请参阅导入选项的以下说明。

Note

导入 USDZ 档案时,务必仔细考虑导入纹理选项以确定是否以及如何从档案中复制纹理文件。

Xform 和 Scope Primitives

USD 提供了包含变换数据的 Xform prim 类型,可用于表示变换层次结构和组织场景。此类 Xform 引物导入为 Blender 空物体。

USD 还支持 Scope 基元,它们是不包含变换数据的实体,但用于分组场景的其他元素。Blender 与范围的概念不完全相同,因此此类原始文件导入为位于原点的 Blender 空白。这是一个不完美的表示,因为空物体具有变换,而 Scopes 没有,但这种方法仍然有助于保留场景层次结构的结构。

PointInstancer Primitives

USD provides a UsdGeomPointInstancer prim type, containing instances that are scattered on a primitive's points.

These are imported into Blender as Point Clouds using a 几何节点修改器 and the 实例化于点上.

动画

导入程序支持两种类型的动画:

  • 动画转换:如果 USD 基元具有随时间变化的转换数据,则将转换缓存约束添加到导入的 Blender 对象。

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

材质

如果 USD 网格或几何子集具有绑定的材质,则导入器将为 Blender 对象分配与 USD 材质名称相同的材质。如果场景中已存在具有相同名称的 Blender 材质,则将使用已有材质,取决于材质名称冲突选项 。否则,将创建新的材质。

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.

还有一个实验性 导入 USD 预览 选项,用于将 USD 预览表面着色器转换为 Blender 的原理化 BSDF 着色器节点。此选项可能是有损的,因为它还不能转换所有着色器设置和类型,但它可以生成材质的近似可视化效果。

坐标系方位

如果导入的 USD 是 Y 向上,旋转将自动应用于根对象,以转换为 Blender 的 Z 向上方向。

导入选项

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

通用

路径

仅导入植根于给定基本体的 USD 场景的子集。

包括
仅可见基本体

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

仅定义的基本体

When disabled this allows importing USD primitives which are not defined, such as those with an override specifier.

设置帧范围

更新场景的开始和结束帧以匹配 USD 阶段的开始帧和结束帧。

创建集合

将所有导入的对象添加到新集合中。

相对路径

选择相对于 blend 文件的文件路径。

比例|缩放

导入物体相对于世界原点的缩放值。

光强度比例

用于输入光源强度的缩放。

自定义属性

Behavior when importing USD attributes as Custom Properties.

:

不导入 USD 自定义属性。

用户:

Imports USD attributes in the userProperties namespace as custom properties. The namespace will be stripped from the property names.

所有自定义:

Imports all USD custom attributes as custom properties. Namespaces will be retained in the property names.

物体类型

摄像机

导入摄像机(透视或正交的)。

曲线

导入曲线基本体,包括 USD 基准和 NURBS 曲线。(请注意,对贝塞尔标准的支持尚未充分执行。)

灯光

导入光源。目前不包括 USD 圆顶灯、圆柱灯或几何形状灯。

材质

导入材质。

网格

导入网格。

体积(卷标)

导入 USD OpenVDB 字段资产。

点云

导入 USD UsdGeomPoints 作为点云物体。

USD 形状

导入 USD 基本形状(立方体、球体、锥体等)作为 Blender 网格。

USD Purpose
渲染

Include primitives with purpose render.

代理

Include primitives with purpose proxy.

引导

Include primitives with purpose guide.

几何数据

UV 坐标

读取网格 UV 坐标。

颜色属性

将 USD 网格 displayColor 值转换为 Blender 的颜色属性。

网格属性

读取 USD Primvars 作为网格属性。

细分

基于 USD 细分方案属性创建表面细分修改器。

检查网格

检查导入的网格是否有损坏的数据,并在必要时修复它。如果禁用,错误数据可能会导致网格显示或编辑崩溃。该选项会降低导入速度,但建议使用,因为数据错误并不总是很明显。

绑定

形态键

将 USD 混合形状导入为 Blender 形态键

骨架

将 USD 骨架导入为 Blender 骨架

材质

导入所有材质

还可以导入任何几何体都不使用的材质。请注意,当此选项为 false(假)时,仍将导入几何体引用的材质。

导入 USD 预览

将 USD 预览表面着色器转换为原理化 BSDF 着色器网络。

创建世界材质

Converts the first discovered USD dome light to a world background shader.

设置材质混合

如果启用 导入 USD 预览 选项,材质混合方法将根据 “不透明度” 和 “不透明度阈值” 着色器输入自动设置,从而允许透明对象的可视化。

材质名称冲突

当导入的材质的名称与现有材质冲突时的行为。

使其独立化:

将每种 USD 材质导入为唯一的 Blender 材质。

引用现有:

如果已存在具有相同名称的材质,则引用该材质而非导入。

纹理

When importing a USDZ package, the following options specify whether and how texture asset dependencies of the USD should be copied from the zip archive so they can be loaded into Blender.

导入纹理

从 USDZ 档案导入纹理时的行为。

:

不导入纹理。请注意,如启用该选项,材质纹理可能无法被 Blender 解析。

打包:

将纹理导入为 Blender 文件内部打包数据。

复制:

复制文件到 纹理目录 选项指定的目录。

纹理目录

Path to the directory where imported textures will be copied, when the Import Textures mode is Copy.

Note that the default textures directory is the relative path //textures, which requires the Blender file to have been saved before importing, so the relative path can be resolved.

文件名冲突

当导入的纹理文件的名称与现有文件冲突时的行为。

使用现有项:

如果已存在同名文件,则使用该文件而非复制。

覆盖:

覆盖现有文件。

粒子与实例化

场景实例化

导入 USD 场景图形实例为集合实例,否则将被导入为副本。

导出为 USD 文件

Universal Scene Description (USD) files can contain complex layering, overriding, and references to other files. Blender's USD Exporter takes a much simpler approach. When exporting, all visible, supported objects in the scene are exported, optionally limited by their selection state. Blender does not (yet) support exporting invisible objects, USD layers, variants, etc.

以下物体可以导出到 USD:

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

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

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

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

  • 体积(静态体积和动画体积)。

  • 骨架

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

  • 静态网格。

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

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

  • 融球导出为动画网格。

Note

To export the Blender scene as a USDZ archive, set the file extension of the output file to .usdz. The exported USDZ package will be a zip archive containing the USD and its texture file dependencies.

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

Spring 导出 USD 并用 USDView 打开。

导出选项

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

通用

根基图元

如果设置,添加一个给定路径的变换图元作为所有导出数据的父级。

包括
仅选中项

当选中时,只有被选中的物体才会被导出。实例对象,例如在场景中被实例化的集合,当它们的实例被选中时就被认为是 选中 的。

仅可见

仅导出不为隐藏的对象。导出对象的隐形父级导出为空变换。

动画

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

Blender 数据
自定义属性

Exports Custom Properties as USD attributes. The Namespace property is used to determine the namespace that the attributes are written to.

命名空间

如果设置,导出自定义属性名称时添加给定的命名空间作为前缀。仅适用于尚未具有前缀的属性名称(比如,名称 bar 会应用此名称,但 foo:bar 就不会)并且不适用于总是在 userProperties:blender 命名空间中导出的 Blender 物体和数据名称。

By default, userProperties namespace is used.

Blender 名称

编写 USD 自定义属性,包含原始 Blender 物体和物体数据名。

允许 Unicode

在编写 USD 基元和属性名称时保留 UTF-8 编码字符(当打开生成的文件时需要软件支持 USD 24.03 或者更高版本)。

文件引用
相对路径

使用相对路径引用 USD 格式外部文件(如纹理、体积),否则使用绝对路径。

转换坐标系

Convert orientation axis to a different convention to match other applications. 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.

向前/向上轴

By mapping these to different axes you can convert rotations between applications default up and forward axes.

Xform Ops

The type of transform operators to use to transform prims.

Translate, Rotate, Scale:

Export with translate, rotate, and scale Xform operators.

Translate, Orient, Scale:

Export with translate, orient quaternion, and scale Xform operators.

矩阵:

导出矩阵操作。

设置用于

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

物体类型

网格

导出网格物体

灯光

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

摄像机

导出:doc:` 摄像机物体 </render/cameras>`,只会导出透视摄像机。

体积(卷标)

导出体积物体

曲线

导出曲线物体

毛发

Exports parent hair strands are exported as a curve system. Hair strand colors are not exported.

几何数据

UV 贴图

When checked, includes UV coordinates for exported meshes. The name of the UV map in USD is the same as the name in Blender.

重命名 UV 贴图

Exports UV maps using the USD default name (st) as opposed to Blender's default name (UVMap).

法向

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

三角化

Triangulates the mesh before writing. For more detail on the specific option see the Triangulate modifier.

绑定

形态键

导出形态键为 USD 混合形态。

绝对形态键不受支持。

骨架

Export Armatures and meshes with Armature Modifiers as USD skeletons and skinned meshes.

限制:

  • Modifiers in addition to Armature modifiers will not be applied.

  • 不支持柔性骨骼。

仅使骨骼形变

仅导出形变骨骼及其父级。

材质

Exports material information of the object. By default the exporter approximates the 原理化 BSDF node tree by converting it to USD's Preview Surface format.

当网格分配了多个材质时,将为每个材质创建一个几何子集。第一个材质(如果有)也始终应用于网格本身(无论是否存在几何子集),因为 Hydra 视口不支持子集上的材质。有关详细信息,请参阅 USD issue #542

Note

If USD Preview Surface Network and MaterialX Network are disabled, the material is set to the viewport materials of meshes.

USD 预览表面网络

Approximates a 原理化 BSDF node tree to by converting it to USD's Preview Surface format.

Warning

并非所有节点都支持;目前仅支持漫反射、原理化、图像纹理和 UV 贴图节点。

MaterialX 网络

Generates material shading graphs using the MaterialX standard. This standard is designed to support a high amount of interoperability among DCCs <Digital Content Creation>. In Blender, MaterialX supports most of the shader nodes and their functionality but has a few caveats (see below).

Implementation Caveats

When using the Principled BSDF, the resulting graph is very usable. However, when using some of the other BSDFs, some of the generated shading graphs are difficult for other DCC's to understand.

转换世界材质

Convert the world material to a USD dome light. Currently works for simple materials, consisting of an environment texture connected to a background shader, with an optional vector multiply of the texture color.

导出纹理

将着色器节点引用的纹理导出到与 USD 文件在同一目录中的 "textures" 文件夹。

覆盖纹理

允许在导出纹理时覆盖现有纹理文档。

USDZ 纹理缩减采样

为所有导出的纹理选择最大尺寸。

维持:

保持所有当前纹理尺寸。

256:

调整为最大256像素。

512:

调整为最大512像素。

1024:

调整为最大1024像素。

2048:

调整为最大2048像素。

4096:

调整为最大4096像素。

自定义:

指定自定义尺寸。

USDZ 自定义缩小尺寸

The size in pixels of the Custom downsampling.

试验特性

实例化

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

导出限制

单面/双面网格

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

网格法向

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

顶点速度

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

材质

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

毛发

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

摄像机

仅导出透视模式相机。

灯光

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

粒子

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

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

实例化/引用

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

USDZ

由于目前 USD 库的限制,USDZ 档案无法包含 UDIM 纹理。此限制有望在未来版本的 USD 中得到解决。(见于 USD pull request #2133。)