Collada

COLLADA™ 模块已被实现为用于导出和导入 .dae 文件的一个灵活的工具。 设计目标是提供一组参数,这些参数可以从/向各种工具导出/导入 Collada 文件。 但请注意,Collada 模块仍在开发中。 因此,你的特定应用场景可能尚不受支持。

Collada 导出

../../_images/files_import-export_collada_export.png

操作项预设

There are two operator presets (see top of the Sidebar) for Second Life (SL) users:

  • Second Life Static -- 适用于导出静态网格物体。

  • Second Life Rigged -- 适用于导出SL默认角色。

Note

Second Life用户特别说明:

  • 请使用操作项预设。 所有其它导出设置将不适用于Second Life。

  • 角色定位需要使角色看向X轴正向.

  • 必须在导出前应用缩放和旋转!

Main

仅导出选中的物体

如果启用 仅导出选中的物体,则仅导出所选对象。 否则,整个场景中所有可见和不可见的物体都会被导出。

包含子物体

启用此选项后,无论选择状态如何,所选对象的所有子物体都会被导出。

Hint

You can select only an armature, then using this option, all rigged meshes attached to the armature will also be exported.

包括骨骼

启用此选项后,无论选择状态如何,都将导出与所选物体相关的所有骨骼。

Hint

You can select only the objects, then in the exporter enable this option to export the armature data also.

包括形态键

Includes the application of shape keys by exporting meshes with the current shape key configuration baked in.

Global Orientation

Todo.

纹理选项

仅UV贴图

当网格包含多个UV图层时,Blender默认会导出所有图层。 此选项允许您仅导出活动(选定)的UV图层。

复制

导出图像时,基于材质的图像纹理,导出器会在导出文件中创建绝对文件引用。

但是,如果启用了 复制 选项,导出器将创建图像的副本,并将副本放在导出文件之外。 在这种情况下,文件引用是相对的。

Geometry

导出数据选项

三角化

The mesh can be triangulated on-the-fly. The triangulation is based on the same function which is used in the Triangulate Faces tool for triangulating the current selection of faces. For full control over the triangulation you can do this manually before exporting. However, this option allows to apply the triangulation only on the exported data; the mesh itself is not affected.

应用修改器

All active modifiers will be applied in a non-destructive way. That is, the modifiers will be applied to copies of the meshes.

Resolution

Controls whether to apply the 3D Viewport resolution or the render resolution for modifiers that provide a preview mode and a render mode.

Transform

Collada支持两种类型的转换矩阵规范。 可以是``<Matrix>``,也可以是一组变换分解(用于移动,旋转和缩放)。 需要注意的是,导出器不会严格遵循此选项设置,而是将其作为提示尽可能使用该选项。 之所以如此,是因为某些导出的数据类型具有关于如何导出转换矩阵的特定规则。 这部分功能还在开发过程中,将来可能会提供一种不那么模糊的方法。

Armature

骨骼选项

仅变形骨骼

When this option is enabled, then the exporter strips all non-deforming bones from the exported armatures. This option is useful when your armatures contain control bones which are not actually part of the character skeleton. For example you can export the Avastar rig with this option enabled. The resulting exported rig is compatible with Second Life. But please note the restrictions further below.

导出至 SL/OpenSim

When this option is enabled, some issues with bone orientation are calculated differently and is designed to be used to export to Second Life or OpenSim.

This is only relevant for rigged meshes, for static meshes it just does nothing at all.

动画

Extra

Collada 选项

使用物体的实例

在Blender中,你可以为多个对象重用相同的网格。 这被称为“物体实例化”。 启用此选项后,Blender会将对象实例化到Collada文件中。

使用Blender轮廓

Collada can be extended with tool specific data (profiles). Blender has its own (unofficial) profile that allows to export rig information into the Collada file. Later It can be used to reconstruct the rig when it should ever be necessary to import a dae file back into Blender.

按物体名称排序

数据的导出顺序绑定到内部物体顺序,并且不能以可靠的方式影响它。 此选项可确保按字母顺序导出几何节点和物体节点。

保持绑定信息

When a rig is imported to Blender, the rig's bind pose will be used as Blender's rest pose. So all Matrix information of the original rest pose is lost. But in some cases you may want to preserve the original rig information. This option checks each bone for having two arrays:

  • rest_mat -- 一个由16个浮点数组成的数组,表示骨骼的原始重置姿势矩阵。

  • bind_mat -- 一个由16个浮点数组成的数组,表示骨骼的原始绑定姿势矩阵。

如果数组存在,则将使用那些数组而不是当前的重置姿态/绑定姿态。 这两个数组要么是由先前的Collada导入创建的(请参阅下文的 Collada 导入),要么可以手动创建,也可以通过插件(基于脚本)创建。

Collada 导入

../../_images/files_import-export_collada_import.png

Collada 导入功能主要由需要导入的数据驱动。 有一个控制导入单位的选项:

Import Data Options

导入单位

如果未启用,则将根据当前使用的单位系统重新调整导入的数据。 如果启用此选项,则Blender将自行调整为 Collada 文件提供的单位系统。

骨骼选项

Fix Leaf Bones

Collada only records "joints" which is mostly similar to Blender's bone heads. But when you import a Collada file then the bone head/tail are not defined. This does not matter for connected bones where the bone parent only has one child. In that case the parent bone's end location is adjusted to the child's joint position. But especially for unconnected bones and for bones with more than one child a problem arises.

When the Fix Leaf Bones option is enabled then Blender tries to guess where the bone head/tail of unconnected bones would best be placed. If the option is disabled, then the bone head/tail are placed at an offset along the Y axis. That is why bones often point towards the Y axis.

查找骨骼链

当骨骼有多个子骨骼时,则不会定义哪个(如果有)子骨骼应连接到父骨骼。 当启用 Find Bone Chains 选项时,Blender 会确定每个骨骼的最长骨链(对于子骨骼), 在此链上的所有骨骼将自动连接。

如果禁用该选项,则当父骨骼只有一个子骨骼是才会将子骨骼接到父骨骼。 但请参阅下面的 自动连接 选项。

自动连接

启用此选项后,如果父骨骼只有一个子骨骼,则子骨骼将自动连接到其父骨骼。


保持绑定信息

启用此选项后,导入功能会为每个骨骼创建两个自定义属性:

  • rest_mat -- 一个由16个浮点数组成的数组,表示骨骼的原始重置姿势矩阵。

  • bind_mat -- 一个由16个浮点数组成的数组,表示骨骼的原始绑定姿势矩阵。

当你想再次导出绑定时,可以使用这两个数组,并确保必须使用原始的重置姿势/绑定姿势组合。

技术细节

网格

导入

支持的几何类型包括:

  • Tris (未经测试)

  • Polylist

  • Polygons

  • N-gons

  • Tri-fans (未经测试)

  • Lines

导出

网格数据导出为 <polylist><lines><vertices>

导入

Blender 尽最大努力从 .dae文件导入灯光。 如果检测到 Blender 的灯光配置文件,将使用配置文件中的值,确保完整导入Blender导出的 .dae文件。 在Blender 2.57中添加了 <extra> 支持。

导出

通过``<extra>``标签添加了 Blender 的灯光配置文件。 Blender 的整个灯光结构将通过此配置文件导出,但光线曲线衰减除外。

动画

导出 & 导入

  • Support for object (mesh, camera, light) transform animations. Only Euler rotations, which is the default option for Objects, can be exported. For armature bone animations, Euler and quaternion rotation types are supported.

  • 支持导入和导出以下参数的动画:

    • 相机

    • 材质效果

  • 非皮肤控制骨骼动画。

  • 皮肤变形骨骼的骨架动画。

  • 物体模式中的骨架动画。

  • 完全固定的骨架动画(指Rigify插件)。 导出固定的骨架动画:

    • 选择烘焙动作 (打开 Search 并输入 "烘焙动作"。)

    • 如果您只选择了变形骨骼,请选中 Only Selected 。 这将给出更小的dae。 否则取消选中 Only Selected

    • 检查 清除约束

    • 烘焙操作。

    • 选择网格和变形骨骼。 然后导出到Collada,同时仅检查选定的选项。 (仅选择网格和骨骼并非绝对必要,仅选择和导出选定的会给出较小的dae。)

    • Demonstration video

对于作为骨架中叶节点的骨节点,或者如果骨骼具有多个子节点,则为这些节点添加带有 <extra> 标签的Blender配置文件。 在重新导入时正确导出骨骼到尾端位置。

Note

要记住的重要事情

  • 物体和数据块名称约束为21个字符(字节)。

  • UV层名称约束为32个字符(字节)。

  • 只有网格上的骨架动画,单个皮肤控制器。

  • 尚不支持修改器。

导入导出时具有 <instance_node> 的 .dae文件时,这些信息基本上会丢失,这些节点将是 <node>s。