In this section we'll see some advanced options about exporting stuff. Specially important are the “Animation Managers”, something you need to understand in order to export complex scenes.
First, let's see exactly the options in the exporter (some of them are covered in the getting started section).
- Hierarchy: Activate this if you want to export the objects in the scene and the relations between them.
- Materials: Usually, you activate the previous option and this one together, to export models and materials. This option exports the information for material parameters, textures in use and so on.
- Animation: This option exports animation information for the objects in the scene. Sometimes you may want to activate this option alone, so you only export animation information to be applied on models that has been previously exported. In this case, make sure that the hierarchy is exactly the same in both .EADs, otherwise, it may generate issues or even crash.
- Treat Helpers as Bones: Sometimes we need a parent to move an object, and in 3Ds Max we usually use dummies for that purpose. The engine, though, only recognizes bones, so this options exports Helper objects as bones, so they can play animations in the Engine.
- Log: Exports a .txt file with information about the created .EAD file. You probably want to explore this file if you're having issues, to help you find the problem in the scene.
You may have a character with several animations. For example, walking and running cycles. How would you export this to be interactive?
- First, export the character model (activate Hierarchy and Materials when exporting). Set the frame range from 0 to 1, making sure that the character is not performing any movement there. In the future this shouldn't be needed, but for now, because of a bug, we always need to activate the “Animation” option, so that's why we set the small frame range to avoid animation issues, as this model is expected to not have movement at all.
- Now, we should have walking and running animations into the same file, but in different frame ranges. For example, we may have walking animation in the first 40 frames, and running from 50 to 80. This will allow us to export that frame ranges activating only the “Animation” option in the exporter (For more info about exporting animations, check the Animations documentation).
- And we're done, we have three .EADs:
- The model and hierarchy
- Walking animation
- Running animation
Animation Managers are a bit difficult to understand, but let's try. Imagine that we have a scene with two characters, and we want to export it to the Engine. It happens that each .ead file has what is called an Animation Manager, and each Animation Manager (called AM from now on), can handle one animation at a time.
The AM gets its name from the .max filename when we export. This means that if we export the scene with to characters at once, it will get only one AM, and so, we won't be able to play different animations on each character. I we only have a whole animation for everything, then it's ok, but if we're doing something a little interactive, like giving the user the ability to make each character move when pressing buttons… it won't be possible.
There is a “shortcut” to achieve it, though, here is the workflow:
- Decide which objects will be “independent”, to have their own animations.
- Separate them using layers, so they are easily selectable.
- Save the file with the general name (not used in the .EADs).
- Save it again with the name of one of the objects (in a different file, this will only be used to export).
- Show all layers, hide the one of the object/character you want to export this time.
- Delete everything visible.
- Show again the layer of the given object/character.
- Export. Now the .EAD file will get the AM's name of the file you saved only for this one.
- If you have animations for this object/character, export them now.
- Press Ctrl+Z until you reach a file state in which you have all the objects again (or open the saved general scene). Save it as other one of the objects and repeat the process.
Basically, you need to understand that each independently moving object needs it's own AM, and to have it, we need to export it alone from a .max file with a different name from the others, so the AMs are different.