Page History
English | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
OverviewIn this section we will focus on the basics of how to export assets. You should be aware that when we are describing broad terms which are interchangeable with 3DS Max , and Maya and XSI we simply refer to all three as Digital Content Creation tools or in short, "DCC". This article assumes that the user knows the basic functions of digital content creation (DCC) tools. It is not intended to teach the user the basics of their DCC tools, but rather the exporter basics with our tools and plugins.
Exported File TypesCrytek Geometry Files (.CGF)
The Merge All Nodes option is supported for CGFs. Crytek Skinned Character Files (.CHR)
The Merge All Nodes option is not supported for CHRs.
ExampleThis cylinder has 5 bones and all are linked in a hierarchy starting from the root bone. We are using our CrySkin modifier to make sure that we got the same preview of the skinned geometry in 3ds Max and the Engine. If you use the Skin modifier you will notice differences in the animated skinned geometry so make sure to use CrySkin instead. The geometry itself is not linked to the hierarchy of the bones, it will just be connected with the skinning information to each bone. To export the .chr file just make sure to save your 3ds Max scene to a directory in your build structure like: Under the Utilities tab you can add our CRYENGINE Exporter to get access to the exporter plugin.
Now add the cylinder geometry to the Object Exporter list and switch the asset type to .chr file. In our case we named the character "Cylinder" so we want to hold that name without overwriting it. We basically check the tickbox to Export File per Node and do not use a custom file name, this will provide the same name of the node from 3ds Max and later on in the Engine. If you want to overwrite the name and use a custom one just check the box and set a destination directory for the final export. Next to the Object Export list you can also see the Bone Export list. It will always show the root bone from your hierarchy by default which will be the bone named root in our case. Press the blue Export Nodes button and the .chr file will be exported to the directory of the 3ds Max scene or the custom changed destination. Crytek Animated Geometry Files (.CGA)Try to setup a 3 box chain, for example: The first thing you need to do is change all the motion interpolation splines to TCB. Manually Changing the Motion Curves to TCB: Select the object and click the wheel motion from the menu on the right.
Next, locate the Assign Controller option box pictured above. Click the Position channel, and then click the info button above it. This will bring up the interpolation options for the animation curves that you have selected. You will need to convert all the motion curves to TCB.
You will need to open the info for all the three channels, and then click Make Default, which displays the Assign Controller dialogue box. Click Yes and repeat the process for every channel of every object that you are going to be exporting. You need to change all the motion interpolation splines to TCB. You can apply now a basic animation to each of the boxes, the animation will be exported within the .cga and will be called "default". If you want to export more then just the default animation refer to the description of Animation files (.anm) files. A quick way to test your .cga asset will be to load up the editor and pick the Entity -> Physics -> AnimObject from the RollupBar drag it into a level and change the model type to your fresh exported .cga Under the animation tab of the AnimObject entity properties you will see the features for the entity. Make sure to set these values to play the default animation for your .cga:
Animation Files (.anm)
Character Animation Files (.CAF)
Material Files (.mtl)The .mtl file will be exported from the DCC tool using our Crytek shader which comes with the exporter plugin. 3ds Max uses an ID based system, that means you can change IDs on each face for your asset and assign a sub material with the same ID number. The default material name will be stored in the exported asset. This is important, the material with the name that you assigned to the asset will be the default material name that the asset is looking for in the Engine. You will notice that the cube has the name Box01 and the material which is assigned to the asset is called "Material_explain". The exporter will use the assigned name of the material while exporting the asset. While exporting the .mtl file make sure that you copy your assigned material name and paste it into the save dialogue of the exported .mtl file to make sure that you avoid any spelling mistakes. Crytek UI in 3ds MaxSee Crytek UI in 3ds Max CRYENGINE Exporter in 3dsMax for more information. Crytek UI in MayaSee Crytek UI CRYENGINE User Interface in Maya for more information. Crytek UI in XSISee Crytek UI in XSI - Obsolete for more information.
Excerpt | | ||||||||||||||||
|
Chinese | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DCC 工具基础请注意广义上 DCC 工具可与 3DS Max、Maya 以及 XSI 通用。为了方便起见,我们将这三种工具统称为*数字内容创建*工具或简称 "DCC"。 此文档假设用户已经熟悉了数字内容创建 (DCC) 工具的基本功能。其目的不是给用户讲解 DCC 工具的基础知识,而是讲解带有工具和插件的导出器的基础知识。
导出文件类型Crytek 几何体文件 (.CGF)
合并全部节点*选项支持 *CGF。 Crytek 蒙皮角色文件 (.CHR)
合并全部节点*选项不支持 *CHR。
示例: 几何体本身并未链接到骨骼层次结构,仅通过蒙皮信息与每个骨骼连接。 若要导出 .chr 文件,要确保将 3ds Max 场景保存到构建结构目录中,如 Game\Objects\Characters\Cylinder。 现在,将 Cylinder 几何体添加到*对象导出器*列表并将资源类型切换到 .chr 文件。 在此例中我们将角色命名为 Cylinder,在此我们想要保留此名称,不要修改它。我们主要选中标记框*按节点导出文件*。不要使用自定义文件名,这是为了确保导出的对象在 3Ds Max 和“引擎”中的名称一致。如果想要修改此名称并使用自定义名称,选中框并设置最终导出的目标目录即可。 在*对象导出*列表旁会看到*骨骼导出*列表,在默认情况下它始终显示层次结构的根骨,在此例中即显示名称为*根*的骨骼。按蓝色*导出节点*按钮将 .chr 文件导出到 3ds Max 场景的目录下或更改的自定义目标目录下。 Crytek 动画几何体文件 (.CGA)尝试创建 3 个连接到一起的立方体,例如: 首先需要将所有运动插值样条曲线更改为 TCB。 手动将运动曲线更改为 TCB:选择*对象*单击右侧菜单的!Exporting_13.png! 轮运动。
然后,找到上图所示的*分配控制器*选项框。单击*位置*通道,再单击上边的*信息*按钮。即可出现已选定动画曲线的插值选项。 需将所有运动曲线都转换为 TCB。 打开所有三个通道的信息,再单击*存为默认*,即显示“分配控制器”对话框。 单击*是*,对想要导出的每个对象的每个通道重复此过程。 需将所有运动插值样条曲线更改为 TCB。 此时可对每个立方体应用基本动画,这些动画将被导出并保存在 .cga 内,名称为“默认”。 如果除了默认动画外还想导出更多动画,请参见*动画文件 (.anm*) 文件描述。 检测 .cga 资源的快速方法:加载编辑器,在 Rollup 栏*内选取*实体 -> 物理 -> 动画对象,并将其拖放到关卡内,再将*模块类型*更改为最近导出类型 .cga 在*动画对象*实体属性的动画选项卡之下,将看到实体功能。 确保设置好 .cga 播放默认动画的这些值: *动画 = 默认(默认动画存储在 .cga 文件内) 动画文件 (.anm)
角色动画文件 (.CAF)
材质文件 (.mtl)使用与导出器插件一起提供的 Crytek shader 将 .mtl 文件从 DCC 工具内导出。3ds Max 使用基于 ID 的系统,这意味着可更改资源每个面部的 ID 并以相同 ID 号码指定子材质。 默认材质名称存储在已导出资源内。这很重要,具有已指定资源名称的材质将作为资源在“引擎”中查找的默认材质名称。您会注意到立方体的名称为 Box01,指定给资源的材质叫做 Material_explain。导出资源时导出器将使用指定的材质名称。导出 .mtl 文件时,确保复制所指定材质名称并将其粘贴到已导出的 .mtl 文件的保存对话框中,确保避免任何拼写错误。 3ds Max 中的 Crytek 用户界面3ds Max 对象导出“对象导出”面板中包含用于指定需要导出场景中哪些节点的选项,以及指定如何导出这些节点的其它选项。大多数选项仅在导出几何体时有用(导出动画时不起作用)。 最重要的控件是节点列表。其位于面板顶部,显示已选定要导出的节点。 若要在列表内添加节点,选择*节点*,单击*添加选定*。注:如果列表内的节点有子节点,也将被导出。 用户可通过节点列表下的下拉列表选择导出文件类型。 下图显示了“对象导出”面板。 “对象导出”面板内还有其他选项:
3ds Max 骨骼导出此面板包含模块骨骼设置。在导出蒙皮模块或动画时都很重要。尤其是它还包含一个骨骼列表的控件。请注意:列表内所有子级骨骼将自动导出;因此,仅需显示根骨即可。 通常情况下,在节点列表内添加节点时,骨骼根骨也被添加到骨骼列表内。这意味着正常情况下不必处理“骨骼导出”面板。但有些时候,这个面板的存在是十分必要的,比如,用户只想导出身体的上半部分的动画的时候,就可以直接在这个面板中进行操作。 面板内的其他选项是用于导出动画的参数。下图显示了“骨骼导出”面板。
3ds Max 其他设置和工具下图显示了可用的其他设置和工具。
这些窗格控制导出过程的许多其他方面。通常可保留默认值。下述各个导出程序中列出了它们的一些用途。 还可参考 3ds Max 用户可用的附加工具物理代理工具。 Maya 中的 Crytek 用户界面工具和图标如果正确安装了 Crytek 插件,将会发现一个带有 Crytek 标签的书架状图标。单击此图标将展开四种图标: 有效、导出、加载、卸载、Mat.Ed、UDP、轴心点、FBX、动画及检查退化面。
Maya 对象导出准备导出时要记住命名规范,这一点非常重要。如果所描述的对象未正确命名,导出器将无法运行。由于上方向轴与其在引擎内的情况不一样,导出器将通过交换值相应地进行补偿。 1. 创建一个名称为 "cryexportnode_@" 的组,将 "@" 替换成要导出的文件名。 2. 在 "cryexportnode" 下创建一个组。 5. 单击 "Crytek" 工具栏上的导出按钮打开“Crytek 导出”对话框。 7. 选择 "cryexportnode" 组。 9. 单击“Crytek 导出”对话框中的“导出”按钮。 可在此处下载静态几何体导出的具有层级设置的 Maya 场景示例。 Maya 骨骼导出手头有角色模块时,您应准备绑定。针对此教程,我们将使用标准的人形图。 1. 您应有如下所述的作为关节父级的物理化网格体。若没有,则通过调整骨骼周围的基本多边形新建一个。一旦完成“抽出骨骼”,则把新的物理代理作为骨骼的父级。确保为物理网格体指定新的、独立的材质。 2. 创建一个名为 "cryexportnode_@" 的组,将 "@" 替换成要导出的文件名。 8. 确保已绑定皮肤和骨骼,便于制作关节动画时制作皮肤动画。 11. 选择 "cryexportnode" 组。 *更多关于角色制作流程信息,请参考此区段: *必须确保 Maya 导出动画速率是 30 fps。可在*窗口 -> 设置/首选项 -> 首选项*内进行更改。单击列表内的“设置”组,在右手边会看到时间 fps 设置,将其更改为 30fps 并单击保存。 XSI 中的 Crytek 用户界面CryExporter 是一个 XSI 插件,不仅包含“导出”功能也提供自定义对象和自定义 shader 以便充分使用 CryENGINE 功能。CryExporter 为 CryENGINE 资源编译器 (RC) 准备在 Softimage XSI 中创建的资源。这些资源以 Collada 格式存储并在 RC 内转换为最终游戏资源。由于上方向轴不同以及在引擎内的操作情况,导出器有根据地通过交换值进行弥补。 XSI 中的 Crytek 用户界面安装 Crytek 插件后,将会在 XSI 菜单栏内找到 Crytek 菜单。 自动创建 CryExportNode 模块触发 CryExportNode: Properties 窗口,在此需为最终资源指定多个参数。 您可选择资源类型,例如,.cgf、.cga 或 .chr 文件(更多详细信息,请参考 CryExport)。并在此指定最终资源名称。文件名作为前缀添加到 CryExportNode 名称上。例如,motocycle_CryExportNode。 此外使用 Export all 命令时(对测试对象很有帮助)选择是否导出该特殊资源。如果资源没有附属的内部逻辑,而是由许多独立的几何体节点组成,则选中合并。导出器将自动删除层级结构并压缩目标资源数据。这可能会节省很多渲染和处理的时间。 存储在自定义属性中的值被称为 ExportProperties。您可在“资源管理器”中轻松访问。
XSI 骨骼导出此节点是一个 null 助手形状的框,是对象中的一个关节。默认名称为 CryJointNode。将其链接到 CryExportNode 模块。此关节应放置到两个几何体节点之间,便于其边界框与其他两个对象的边界框保持交叉。null 具有文本属性,可在其中调整关节的物理参数,例如,limit=10000 关节参数:
以下值是可选值,用于微调 "limit" 设置。
*附加:*关节也支持非完全刚体(非 6dof)约束。如果它的弯曲或扭曲限度受损且关节具有一个非 0 的 "constraint_limit" 属性,则完全刚体约束将变成动态约束。受损“弯曲”将变成“插口”约束,“扭曲”将变成铰链。新建的动态约束将继承关节的拉伸和转换限度。约束的帧即是 max 中关节助手的帧。然而,为了保存“弯曲”的意义,需交换坐标轴(关节助手的 z 轴作为约束的 x 轴,两者均代表“弯曲”轴,x 轴变为 y 轴,y 轴变为 z 轴)。这样,对于铰链,助手 z 应直指所需铰链方向。对于插口,z 轴应是“周围弯曲”附加部件的轴。 完全刚体(非 6dof)约束相关属性:
例如,若要快速创建一个不可毁坏的铰链约束:请将下列值添加到关节属性:
第一次激活时不管使用何种力都将创建约束。
请注意不需要 "limit = xx",因为除了在不可毁坏弯曲的情况下以外您都需要此限度。也应注意节点之间存在动态约束,应作为实体(不是粒子)被物理化。 XSI 对象导出_创建对象属性_将自定义属性(文本字段)添加到节点。使用此功能将值添加到节点及几何体节点。可将引擎属性添加到节点,如,质量/密度,低规格设置等。 对象属性设置
角色指定对象属性 - 变形设备的 IK 设置
所有值都是物理骨骼默认关节旋转的相对值。也可以对照变形网格体更改物理骨骼的旋转以获得更大的运动范围。 As a general rule of thumb for the rotational limits, you should keep max >min and respect the following limits X, Y -180…180 and z -90 … 90. Better keep the range of limit smaller than the maximal values given (i.e. 170 to -170). This ensures stability in the physics calculation. The following values are used to fine tune the behavior of joints. Most of the time they can be neglected, though. Dampening and Spring Tension Stiffness of an angular spring at a joint can be adjusted via "Spring Tension" parameter. A value of 1 means acceleration of 1 radian/second2 (1 radian = 57°). Damping should also be set to some reasonable value (1.0 corresponds to fully dumped oscillations for an isolated joint, 1.0 is the recommended value ). 可调整“弹簧角度”,但没有太大影响 – 因此 Crytek 建议将其保持为 0。
|