Alembic

以下摘自 Alembic 主页:

Alembic 是一个开放的计算机图形交换构架。Alembic 把复杂的、动画的场景提取为非程序化的、与处理软件无关的一套烘焙好的几何体。这种把场景’提取’为烘焙好的几何体的过程完全类似于把灯光和渲染场景提取成渲染出的图像数据。

Alembic专注于把复杂的程序化的几何体构建的计算结果进行高效的存储。非常明确的一点是,它 存储用来创建计算结果的复杂的程序化工具的依存关系。比如说,Alembic会高效地储存任意的复杂动画和模拟过程(包括包裹变形、形状校正、恒定体积模拟、布料和肌肉模拟,等等)所产生的动画的顶点位置和动画的变形。

TL;DR: Alembic can be used to write an animated mesh to a drive, and read it back quickly and efficiently. This means that a mesh can be animated with a very CPU-intensive rig and then ‘baked’ to an Alembic file. Finally it can be load into the shot file for shading and lighting with only moderate CPU usage.

Support for the Alembic file format was introduced in Blender 2.78.

由于 Alembic 标准的开放性以及C++库文件的标准化, Blender可以用于混合的流程. 比如说,Houdini或者Maya这样的软件可以把文件输出为 Alembic格式, 然后在Blender中载入、贴图、渲染. 也可以在Blender中对角色(或者其它模型)赋予动画, 然后输出为 Alembic文件, 继而在其它软件中加载后进一步处理.

导出为 Alembic文件

此章节说明不同的输出选项的效果。

手动设置变换

../../_images/files_import-export_alembic_export-panel-scene-options.png

Generic and Scene Alembic Export options.

比例|缩放

设置Alembic文件的全局缩放值。使用缺省值1.0则采用Blender的单位。

场景选项

起始帧、结束帧

设置输出至 Alembic的帧范围。缺省使用当前场景的帧范围。

子帧采样

这些选项控制动画的子帧采样。

  • 变换采样

    变换样本设置每帧的动画变换采样并写入Alembic的次数。

    几何数据(Geometry)

    几何样本设置相同,但随后设置为动画几何体。

    Shutter Open, Close

    快门打开/关闭定义拍摄样本的间隔[打开,关闭]。 有效范围是-1到1,其中-1表示前一帧,0表示当前帧,1表示下一帧。

    例如,如果需要用于详细网格运动模糊的信息,则可以通过使用样本计数5,快门打开-0.25和快门关闭0.25来将当前帧周围的一些子帧写入Alembic。 这模仿了一个“180度”快门,在当前帧前打开90度,在当前帧后打开90度。

摊平层级

不勾选此项时,将输出物体间的父/子关系。如果父物体本身不输出而自物体要被输出,则父物体以空物体代替。如果选中此项,则不输出父/子关系,所有的变换都按照世界坐标输出。

使用实例化

Exports data of duplicated or instanced objects as Alembic instances; speeds up the export and can be disabled for compatibility with other software.

自定义属性

When enabled (which it is by default), custom properties are exported to Alembic as well. The following custom property types are supported:

  • Numbers (int, float) and strings. These are exported as arrays of a single element, so 47 will be exported as [47] to Alembic, and "Agent" to ["Agent"]. This matches the behavior of many other DCCs.

  • Lists of numbers and strings. These are exported as-is, so [327, 47] is exported as [327, 47].

  • Matrices and nested arrays of numbers. These are flattened into one long list, so a 3×2 matrix of numbers will become a list of 6 numbers. Similarly, nested lists [[1, 2, 3], [4, 5], [6]] will be exported as [1, 2, 3, 4, 5, 6].

  • Numbers can be animated as well.

  • 选定的物体

    选中此项时,只输出被选中的物体。否则输出所有物体。

    可见物体

    输出的物体仅限于当前可见的场景集合内。

Use Settings For

Determines visibility of objects, modifier settings, and other areas where there are different settings for viewport and rendering.

  • 渲染

    Use Render settings for object visibility, modifier settings, etc.

    视窗

    Use Viewport settings for object visibility, modifier settings, etc.

物体选项

../../_images/files_import-export_alembic_export-panel-object-options.png

物体选项。

UV

选中此项后,将输出UV。虽然Alembic标准只支持单个UV,Blender以可以被其它软件读取的方式输出所有的UV。

拼排UV孤岛

Generates an optimized UV layout with non-overlapping islands that tries to efficiently fill the Texture Space. See the Pack Islands operator that works with the same principle for more information.

法向

When enabled, an object’s Normals are exported. See Custom Split Normals of Meshes below for more information.

顶点颜色

启用后,将输出顶点颜色。

面组

按面输出材质名称。仅导出材质名称,不导出材质数据。

细分

  • 应用

    在输出 Alembic 前应用 表面细分修改器

    使用架构

    Writes polygonal meshes using the “SubD” Alembic schema, rather than the “PolyMesh” schema. This sets an import option for the program, with which the file is opened, to apply its form of a non-destructive subdivision.

三角化

在输出Alembic前对网格三角化。具体选项的更多细节见 三角化修改器

粒子系统

../../_images/files_import-export_alembic_export-panel-particle-systems.png

粒子系统选项。

Alembic不支持粒子系统,正如它不支持骨骼。毛发输出为带动画的零宽度曲线。粒子输出为带动画的点。

导入 Alembic文件

导入 Alembic 文件时, 网格序列缓存修改器 将自动添加到随时间变化的网格中。对于随时间变化的物体变换(即旋转、位置或缩放的动画),使用 变换缓存约束

自定义网格的拆边法向

Blender支持将 自定义法向 导入和导出到 Alembic 文件。作为基本的经验法则,完全平滑的网格导出时不附带法向,从而生成最小的 Alembic 文件。这反映在导入器中;没有法向的Alembic网格作为平滑网格加载。

导出时,对于每个网格:

  • 如果它具有 自定义循环法向,则导出循环法向。

  • 如果一个或多个面标记为平面,则循环法向也会导出。

  • 否则,不会导出法向。

导入时,当 Alembic 网格包含:

  • 循环法向(kFacevaryingScope) 用作自定义循环法向,并启用 自动平滑 使Blender实际使用它们。

  • 顶点法向(kVertexScope or kVaryingScope)转换为循环法向,并如上所述处理。

  • 如果没有法向,则网格将标记为平滑。

  • 不支持的法向类型 (kConstantScope, kUniformScope, kUnknownScope) 作为 无法向 处理。

当导入的网格不包含法向时,可以通过启用 自动平滑 复选框和更改阈值角度来控制最终外观。

处理时间

与 Blender 和许多其他应用程序和文件格式不同,Alembic 文件没有任何框架概念。Alembic 仅仅与时间以及随时间采样的值打交道。例如,无法区分每帧2次采样的30FPS 和每帧1次采样的60FPS。这导致许多开发人员在阅读 Alembic 文件时只 硬编码24 FPS

Blender 使用当前场景帧率将帧数(在Blender中)转换为以秒为单位的时间(在 Alembic 中)。因此,可以将以120 FPS速率生成的 Alembic 文件导入到30FPS 的Blender场景中,并且仍然看不到任何时间拉伸。