welcome to linkAR technical documentation

next

ADVANCED EXPORT

INTRODUCTION

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.

EXPORTER OPTIONS

First, let's see exactly the options in the exporter (some of them are covered in the getting started section). Export options

  • 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.

EXPORT DIFFERENT ANIMATIONS

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:
    1. The model and hierarchy
    2. Walking animation
    3. Running animation

ANIMATION MANAGERS

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:

  1. Decide which objects will be “independent”, to have their own animations.
  2. Separate them using layers, so they are easily selectable.
  3. Save the file with the general name (not used in the .EADs).
  4. Save it again with the name of one of the objects (in a different file, this will only be used to export).
  5. Show all layers, hide the one of the object/character you want to export this time.
  6. Delete everything visible.
  7. Show again the layer of the given object/character.
  8. Export. Now the .EAD file will get the AM's name of the file you saved only for this one.
  9. If you have animations for this object/character, export them now.
  10. 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. next