User Tools

Site Tools


hpl3:engine:model_export

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hpl3:engine:model_export [2014/04/15 15:09]
hadex
hpl3:engine:model_export [2018/12/04 07:47] (current)
nebej
Line 47: Line 47:
 It is prefered if looped animations are exported so that they have the same keyframe at the first and last position. This will guarantee that they are looped correctly. It is prefered if looped animations are exported so that they have the same keyframe at the first and last position. This will guarantee that they are looped correctly.
  
 +===== Additional animation setup =====
 +
 +Additional information about the animation can be setup by adding a .anm_info file with the same name as the animation. This file can be used to specify advanced settings that might be hard to get correct when exporting. The anm_info file is stored as an xml document.
 +
 +==== Bone Setup ====
 +
 +Information about which bones should be active for the animation can be specified in the file. You can either include or exclude bones. Each bone is specified with a name (wildcard allowed) and if it should affect all the children of the bone(s).
 +
 +Here is an example of some XML code.
 +
 +<​code>​
 +<​AnimationInfo>​
 +    <​BoneSetup>​
 +        <!-- Start by exluding all bones from this anim -->
 +        <Exclude Bone="​*"​ />
 +        <!-- Then include the top of the left arm and all its children -->
 +        <Include Bone="​j_L_Arm_1"​ Children="​true"​ />
 +        <!-- Then exlude the lower part of both arms using a wildcard -->
 +        <Exclude Bone="​j_*_Arm_3"​ Children="​true"​ />
 +    </​BoneSetup>​
 +</​AnimationInfo>​
 +</​code>​
 ===== 3DS Max ===== ===== 3DS Max =====
  
Line 75: Line 97:
  
 ==== Animation ==== ==== Animation ====
 +
 +For animation it is highly recommended that you use the FBX format. Whilst it is possible to use collada .dae, the setup is tedious and output has mixed results.
 +
 +**FBX format setup:**
 +
 +Before exporting there'​s a couple of settings you should make sure are set in order for the pipeline to be smooth.
 +
 +Open System>​Preferences and under File I/O, select FBX I/O.
 +
 +Export Version: FBX 2013\\
 +Export type: Export Selection with hierarchy\\
 +Save as text format: no\\
 +Save only animation: no when exporting mesh / yes when exporting animation\\
 +Save cameras: no\\
 +Save lights: no\\
 +Save materials: yes\\
 +Save polygon parts: yes\\
 +Save selection sets: no\\
 +Save mesh smoothness: yes\\
 +Save morph maps: no\\
 +Save animation: no when exporting animation / yes when exporting animation\\
 +Sample animation: yes when exporting animation
 +
 +Exporting an animated mesh is broken down into two parts. First you need to export the mesh which has all the polygons and material information. Basically what is rendered.\\
 +The mesh must have a bone skeleton and has to be skinned/​rigged to it
 +
 +Once your rigged mesh is exported you then have to export the animations. The animations should be exported as separate files for each action (walk, run, etc) and be in a folder named "​animations"​ next to your .fbx.\\
 +The animation files will just contain bone and keyframe data, and no rendered meshes.
  
 **Exporting a skeletal mesh without animations:​** **Exporting a skeletal mesh without animations:​**
  
-It is usually advisable ​to do this so that animations are seperate in their own .dae_anim files. To do thisrig and skin your mesh as normalsimply ​make sure the skeleton and mesh items are visible in the layers.+To export the mesh you wish to animateyou should check your export settings (seen above), make sure the following options ​are set:
  
-There are some important settings to apply before you export.+Save only animation: no\\ 
 +Save animation: no
  
-Go to system drop-down>​preferences>​Collada I/O:+Make sure your meshes are triangulated.
  
-    * Save hidden ​items: OFF +Select all mesh and bone items (double-click your root bone to select all connected). Only selected items will be exported. 
-    * Save Cameras: OFF + 
-    * Save lights: OFF +Then File>​Export as…>​autodesk FBX 2013
-    * Save Locators: ON +
-    * Save Vertex Normals/UV Texture Coordines/​Vertex Colors/​Vertex Weights: ON +
-    * Save Animation: OFF +
-    * Sample Animation: OFF +
-    * All profile options: OFF+
  
 **Exporting a skeletal animation:​** **Exporting a skeletal animation:​**
  
-When the animation for your mesh is complete, the first thing to do is hide the mesh item, only have the bones visible in your layer stack, as there'​s ​no need for the mesh to be present in the exported file (since you exported ​the rigged mesh in a seperate .dae in the previous step).+Now it'​s ​time to export your animations. Again check your export settings ​(seen above) and make sure the following options are set:
  
-    * Now you need to bake your animations. To do this go to the animate drop-down>​Bake>​input your start and end frames>​ok. +Save only animation: ​yes\\ 
-    * Go to Item drop down>​Transform>​Purge unused transform, mode: All, type: All. This ensures over-rotation of bones don't occur. +Save animationyes\\ 
-    * Go to system drop-down>​Preferences>​Collada I/O:  \\ Up axis: Change this to X, Y or Z if you experience your mesh being rotated 90 degrees on playing of animation. Can be changed back to Y when finished exporting animation. ​ \\ Save hidden itemsOFF  \\ Bake Matrices: ON  ​\\ Save AnimationON  ​\\ Sample ​AnimationOFF  \\ All profile options: OFF +Sample ​animationyes 
-    ​* ​File drop-down>export: ​Export as collada .dae, then rename so the extention is .dae_anim. You may need to change your Windows folder settings to show extentions if you can't see them.+ 
 +Select all bone items (double-click your root bone to select all connected). Only selected items will be exported. 
 + 
 +Then File>​Export as…> autodesk 
 + 
 +FBX 2013
  
 ===== Blender ===== ===== Blender =====
Line 106: Line 157:
 ==== Modelling ==== ==== Modelling ====
  
-**__Triangulate__ ​ **   ​\\ Currently you have to triangulate the model before it can be exported, there is no export only triangulate.+**__Triangulate__ ** \\ 
 +Currently you have to triangulate the model before it can be exported, there is no export only triangulate.
  
 ==== Animation ==== ==== Animation ====
  
hpl3/engine/model_export.1397574599.txt.gz · Last modified: 2014/04/15 15:09 by hadex