Answered

Export to FBX - Duplicates Animations

Anonymous 4 years ago updated by Peter - Soxware Developer 4 years ago 4

1. Imported all animation clips from FBX file.

2. Export-> All Clips -> to the same FBX file using "Update Existing File".

3. Result: each animation clip has been duplicated.

4. If I import it to Blender, each animation clip is it's own "Action", instead of all animation clips being on a single timeline, merged together, next to each other.


I would expect, that:

- If exported animation clips would replace existing animation clips.

- If  add a new animation clip in UMotion, then exporting it would append this animation clip at the end rather than separating it. For example, If I have 1000 frames, then If I create animation with 30 frames and export it, then I would expect FBX file to have 1030 frames and that animation would be Start: 1000, End: 1030.

I am not sure how this is supposed to work, so please confirm if this is the expected behaviour?

Things to note: 

- each exported animation clip starts from frame 0.

- each exported animation clip has its own separate "source".

Image 597

Image 598
UMotion Version:
1.23
Unity Version:
2019.3.15f1

Answer

Answer
Answered

Hi,
thank you very much for your support request.

Seems like your fbx contains only one animation clip which is then split into separate clips by Unity's importer (the separate clips are defined with the start/end clip times). If you then import the separate clips into UMotion and re-export them to the FBX, UMotion is going to write them as separate clips into the fbx. If you want a combined clip to be written into the fbx you would need to create a combined clip in UMotion. You could either define a combined clip in Unity's import settings and import that one or combine the already imported clips (imported in UMotion) to one and export that one.

Why do you prefer a combined animation?

Best regards,
Peter

Answer
Answered

Hi,
thank you very much for your support request.

Seems like your fbx contains only one animation clip which is then split into separate clips by Unity's importer (the separate clips are defined with the start/end clip times). If you then import the separate clips into UMotion and re-export them to the FBX, UMotion is going to write them as separate clips into the fbx. If you want a combined clip to be written into the fbx you would need to create a combined clip in UMotion. You could either define a combined clip in Unity's import settings and import that one or combine the already imported clips (imported in UMotion) to one and export that one.

Why do you prefer a combined animation?

Best regards,
Peter

Hi,

Thank you for your very quick response and clarifying how UMotion exporting works.

1. In Blender we export model with animations to FBX file. All these animations are within 1 animation clip in FBX.

2. We import FBX file in Unity and split animations to separate clips.

3. We would like to use UMotion to modify animations.

4. We import all animations to UMotion.

5. We modify animation and would like to export it back to FBX replacing original animation.

6. Instead UMotion creates a new animation clip and inserts it to FBX.

7. We end up with FBX file having the same animation being in original animation clip and in a clip generated by UMotion.

8. If we do that with 20 animations, we end up with 20 duplicate animation clips and 1 original animation clip.

9. To solve this problem:

9.1 In UMotion, we export animation clip to its own FBX file.

9.2 In Blender, we import that clip and manually merge frames to original animation clip.

We can see few solutions for UMotion:

1. If animation is the same, then update animation within original animation clip.

2. If animation is new, then append it to the end of the original animation clip.

In this way, we can modify the same animations in both Blender and UMotion always working with the same data, not feeling any difference, thus improving workflow.


Our User Case:

1. We download 3D character from Unity Assets Store.

2. We use Blender to optimise the model.

3. We use UMotion to create and modify animations.

4. Having have to merge manually animations generated by UMotion to Blender's FBX file is making this workflow not smooth and consuming lots of additional time.







Giving it more thought.

We actually wouldn't want to re-import the FBX from Unity back to Blender, because we would lose important project settings in Blender. Therefore, we always have to generate a fresh FBX from Blender.


This means, we would have to Export animations from UMotion every time we export FBX from Blender, then in this scenario there is no point of exporting animations from Blender, once they are imported in UMotion. Therefore no duplicates would be present.

However we noticed that "Update Existing File" significantly increases the file size of FBX.

FBX from Blender with all animations weights about 1MB.

FBX (binary) from UMotion with the same animations weights about 6MB.

When we take FBX exported by UMotion to Blender and export it again, then size goes down to about 4MB.

We are concerned that the App size will increase for no good reason.

Could you clarify why FBX could increase significantly in size by doing "Update Existing File"?

You can do the merging of the animations directly in UMotion. If UMotion contains just one animation clip, also only one animation clip is going to be exported to the FBX file. If this clip is named exactly the same as the animation clip inside the FBX (this has nothing to do with the clip names you defined in the Unity import settings), then the animation clip is overwritten.

Or you could just delete the animations from your FBX file (using Blender) and the export the separated animation clips into that file.

However we noticed that "Update Existing File" significantly increases the file size of FBX.

The FBX file size is not directly related to the size your animations take in your built game. When Unity imports animations from an FBX, it generates *.anim files (split by the frame numbers you defined). You can see them when you expand the FBX in Unity's Project Window. Select the *.anim file, then the Inspector is showing you how much memory this animation is going to occupy in your built game.


If you want to decrease the animation's size, play with the animation compression settings in the FBX's Unity import settings (Animation tab).

Best regards,
Peter