




已阅读5页,还剩4页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Exporting animated models from Maya to CrysisThis page gives instructions about the way to export animated models (.chr files) from Maya to Crysis. Before attempting to export an animated character, you should go to this page and try to export a simple static mesh. Its a good reading anyway, since the basic concepts are similar.Installation instructions for MayaCGF can be found on this page.GENERAL CONCEPT (Alternate Methods):1) The direct method:If you just want to do a simple animated model and you prefer to set keys directly on the skeleton that deforms the mesh, you can go ahead and do just that.Note that you should still select the root joint of your skeleton and click on “Prepare Joints For Export” before attempting to export a .chr file. This should be done prior to skinning or animating the joints.2) The master/slave method:This method offers the advantage of working well with your own pre-existing custom rigs. For this method, there should be in fact two skeletons for your model. One skeleton will be the skeleton you animate (the master skeleton), while the other skeleton (the slave skeleton) will actually deform the geometry. The master skeleton should be part of your animation rig.Again, the skeleton that deforms the geometry (on the left in the above picture) is a slave to the animation skeleton. The simple FK slave skeleton is the one that will be exported along with the character mesh.INSTRUCTIONS:You should work at film speed (24fps). At export time, your animation will automatically be converted to NTSC (29.97fps), which the CryEngine2 uses.The space unit can be set to anything (mine is on “centimeters”), but remember that one unit in Maya is equivalent to one meter in Crysis.The name of the exported file is derived from the name of the top node you select in Maya. So if you name the group containing your model “my_model”, the resulting exported files will be called “my_model.cgf”, “my_model.chr”, etcThe “exclude_GRP” is a group where you can put stuff youd like to keep within the main export group but that should not get exported.The mesh should be in the group bearing the name of the model you want to export (in the example below “ratTest”). You can also put the export skeleton and physics hierarchy within that group or choose to leave them parented to the world.The joints which are not an influence on the mesh (not part of the skincluster) will be automatically removed by MayaCGF at export time. So if the joint is part of your hierarchy, make sure it is also part of the binding partition. You can then set its weights to 0 if its just a helper joint.IMPORTANT: Remember that all the joints that should appear in Sandbox 2 have to be an influence on the skin mesh. In other words, if you have a wrist joint which is parented to a forearm joint, but the forearm joint is not part of the skincluster, then the wrist (and all the joints which stem from it) will NOT be taken into account by the CryEngine2, even if THEY are part of the skincluster! This will likely wreak havoc on your model.After you freeze the rotations on the slave joints, the values from the jointOrient attributes have to be transferred onto the corresponding rotate channels. So by default the joints influencing the mesh should have values corresponding to their actual rotation and translation.To achieve this tedious task with just one click, select the root node of the slave skeleton (“bip01) and click on “Prepare Joints For Export” (in the Tools section of MayaCGF).Then you can bind the mesh to the slave skeleton (set “Max Influence” to 4).Specific to master/slave method:The slave joints should bear the same name as the master joints, but be prefixed with “bip01_”. Then you just have to parent-constrain your “bip01 joints to the joints in your animation rig (the master skeleton). As a side note, you should probably hide the slave skeleton, so you dont select it by mistake. Remember that you shouldnt interact directly with the slave skeleton!The next step is to parent-constrain the slave skeleton to the master skeleton. To automatically do that, you can click on “Constrain Slave Skeleton”. All you have to do is select the bip01 joint and run the script. It will look for the master joints based on the slave joints name minus “bip01_”. So it you have a joint named “bip01_L_shoulder_JNT”, the script will connect it to an existing “L_shoulder_JNT”.Finally, you should bind the mesh to the slave skeleton (set “Max Influence” to 4).So to sum-up: the animation rig/skeleton drives the slave skeleton (“bip01), which in turn drives the mesh.PHYSICS:If you do not want to be able to walk right through your animated model then you should also build a simplified physics skeleton for it. Create some very simple meshes that occupy roughly the same volume as your main joints and name them according to the joint they should represent plus “_Phys” at the end. For example, for a shoulder joint named “L_shoulder_JNT” you would build a mesh called “L_shoulder_JNT_Phys”.Note: The physics meshes wont follow the joints movements in Maya. This is normal. If they get in the way visually, just put them in a layer and hide them. DO NOT turn their visibility off or they will not get exported!The physics hierarchy does not need to perfectly match the export skeleton one on one. In fact it is better if it doesnt, as the skeleton for a classic biped can hold up to a hundred joints or more. The physics mesh should be few in number and fairly simple in topology (shperes, cubes, etc). As long as the basic hierarchy makes sense and the name convention is respected, the physics will get exported correctly.Finally, to make the physics meshes solid in Crysis, assign a cryShader to proxy meshes (please refer to the static models instructions page). And make sure to do a “Freeze Transforms” and “Delete History” on all the “_Phys” meshes!BLENDSHAPES:You must first bind your base mesh to the skeleton and then apply all the blend shapes at once. The reason for this is that there can be only one blendShape node related to the skin cluster. So if you decide later on to add a blend shape to an already existing blend shapes set, you must first delete the existing blendShape node (not the blend shapes meshes themselves!) and then reapply all the blend shapes at once to your skinned base mesh.Also, you can move your blend shapes target meshes anywhere you want in space. Just make sure NOT to freeze their Translate channels, or else when you fire the target within Sandbox2, your whole mesh will jump in space as well!MODEL/RIG REQUIREMENTS:- To successfully export a model, the positive world X axis should point to the right of the model (to your left if you look at your model from the front). Usually, rigs and models are created with the world +X on your right and +Z towards you. So youll probably have to rotate your animation rig 180 degrees in Y. Youll have to do the same for the geometry. Then dont forget to freeze the transforms on the geometry!- The “bip01 joint (the root joint of your export skeleton) should have rotateX set to -90, rotateY to 0 and rotateZ to 90 (the other joints can be oriented any way you want, but try to avoid values neighboring 180 degrees). In addition, the “bip01 joint should lie at the origin of the world.- Make sure that the joints influencing the mesh do not have default values close to 180 in either rotation channel; this would result in weird flipping artifacts on those joints.- Always keep the default binding pose at frame 0 in your scene. It will be the reference frame upon which all your animations are based.- Your multiple meshes should be combined into one single mesh and its history deleted before you bind it.- The number of joints influencing one vertex in the CryEngine2 is limited to 4. In consequence, when binding your mesh to the joints, set “Max Influences” to 4 or less.- Each node (mesh, joint, etc) in your model should have a unique name.- You should only use parentConstraints to drive the slave skeleton (do not use point or orient constraints!).- There should be no instanced nodes in the model.- Scale attributes on the slave joints and geometry should be set to 1.- The “rotateOrder” of your deform skeletons joints should be “xyz“.- The “rotateAxis” and the “jointOrient” values of the slave skeletons joints should be 0 (and the “rotate” channels should inherit the “jointOrient” values).TROUBLESHOOTING:If you see joints twisting or popping out of place when you play your animation in Sandbox2, it probably means those joints have values in their “jointOrient” or “rotateAxis” attributes. Those should be set to 0; the only values should be in the “rotate” channels of the joints.Also double-check that the rotate values in your slave skeletons joints are nowhere near 180 degrees.If the default pose of your model looks wrong in Sandbox 2, turn on the joints label names and make sure all the joints have been exported (they most likely havent).EXPORTING ANIMATION:Again, you should always keep the default bind pose at frame 0 and set a key on all the joints. This is the reference frame upon which the animation export is based. If you dont have this, your model will simply explode, both in Maya and Sandbox2.The path that appears in the Path text input only shows a partial result. Anything before “/Crysis Wars/Game/Objects/” will not appear. This is to keep the path short as to be able to see the export directory at a glance. If you hover your mouse over the text field, the complete path will appear. Choose the directory to which you want to export your model.Note that you can also click on the quick path menu line to access bookmarks that give you instant access to the last ten locations you used.To export animation, first click on “Add Animation Clip” to create an animation clip! Give it a name and set the start and end frames for the animation. Finally, select your mesh groups top node (in the first example above that would be “ratTest”) and click on “Export!”. When you export your animated model, several files will be created:.dae: Th
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 寒夜里的灯光教学课件
- 2025年能源行业智能电网在电力系统保护与优化中的应用报告
- HCV感染者的治疗费用及支付方式
- 项目投资回报率的预测与优化
- 有趣的沉浮课件教学设计
- 运动的快慢+课件+-2025-2026学年人教版物理八年级上学期
- 2025年国有企业高级人才引进面试模拟题集萃与解析
- 2025年医学检验技术士临床案例分析题及答案
- 商业银行数字化转型与金融科技人才需求分析报告
- 字母uu拼读课件教学
- 跨境电商物流与供应链管理PPT全套完整教学课件
- C语言试讲稿课件
- 收音机组装指导书
- 全国行政区域身份证代码表(EXCEL版)
- 社区合理用药讲课
- 义务教育科学课程标准(2022年版)测试题及答案含课标解读
- 水运工程统一用表之一《浙江省港口工程统一用表》
- GB/T 13306-2011标牌
- GA 1800.6-2021电力系统治安反恐防范要求第6部分:核能发电企业
- FZ/T 13001-2013色织牛仔布
- 温医麻醉学专业英语专业英语考试参考
评论
0/150
提交评论