- Home /
Single Animation file for two different objects! HELP!
Hello everyone. I imported a big scene from a 3D MAX's FBX file, single FBX file. Among all objects, there are tow different objects in the scene which should have loop animations throughout the game. All objects are Childs (Children? :D) of that single object with the same name as fbx file. Animations imported to unity and work fine, but one of the objects has a different loop time than the other, so the smaller loop animation waits for the larger animation to end, then both start their animations again, smaller ends, smaller waits for the bigger and on and on... . That single animation file is attacked to that single file, the parent, 240 frames. I tried to split the animation into two, one 30 frames and the other 240 frames, for two objects, but i don't know what to do with them! The smaller animation is bone based.
I clicked on those objects which have animations, but in unity they don't have Animation components, the parent, the one big file, has animation component. So i don't really know how to address which parts i splitted to which game object. I used the smaller loops, 30 that i splitted, smaller loop animation now looks good, but the bigger loop animation now doesn't finish his whole loop which is 240.
Actually by adding those animations to those specific objects, they don't animate, don't affect on them, but by adding animation to parent object, all the childs animate automatically, but just with one loop time.
Answer by OllyNicholson · Apr 24, 2014 at 10:32 AM
This sounds confusing, so unless you are working with a character (in which case there is a different workflow) I believe if you need to treat these animations separately (e.g. have different clips and loop points) then you must export each as an individual FBX file.
You can parent them to your scene or an empty node later in Unity if you wish to group them. It can often be a good idea to export separate elements of your scene to work in a more modular approach, as some elements will need to be animated and some not. You may find that if you organise your Max source file in layers will help you keep track of different elements to export. For example create an animated objects layer that you know each object must be exported individually for (or indeed one layer for each exported file)
Set the keyframe range in 3DSMax for each separate entity to match what you require, and then simply 'export selected' for the object and check animation in the FBX dialogue. This guide can help you verify your export:
If you have more than one clip for an object (or you didn't adjust the frame range in max) you can 'split' or set up the clips in Unity as follows: