Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Animation file more than triple it's size when duplicated

Discussion in 'Animation' started by calpolican, Jun 15, 2023.

  1. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    400
    I created a script to retarget blendshape animations (I'm using it to transfer very detailed facial animations).
    To do that, I've imported a model with the blendshape animation to Unity. The file size is 10MB for a mesh of 16K polys with the animation clip and the blendshapes. After importing, I use a script to create a duplicate of the animation, and I change the curves to fit my character's blendshapes paths and binding. It works without issues.
    The problem that I have, thought, is that the duplicated file has increased to around 34MB. More than 3 times the size of the original. To me that was a very crazy finding and has render useless the work I put to my retargeting script (I can't use files so big!).
    After seeing that, I tested just duplicating the animation of the FBX in the project window and noticed that it increased the size by the same amount. so, just by duplicating the animation of an FBX the duplicate is more than 3 times bigger!!
    Can anyone explain me how to reduce those numbers and why those files are growing like that?
     
    Last edited: Jun 15, 2023
  2. Yuchen_Chang

    Yuchen_Chang

    Joined:
    Apr 24, 2020
    Posts:
    105
    There are many informations in the animation clip just for Editor authoring (every curve has a duplicated Editor form!). When building player, these information should be stripped, so you could expect the animation clip being as small as the original one, when building the player.
    Also, there are some compression settings in the Animation tab of the fbx file, you could try it out.
     
    calpolican likes this.
  3. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    400
    Thanks a lot for the reply. That's good news then. Can I, beforehand, estimate how much will it weight on the build? When I see at the properties of the clip (properties within Unity clicking over the file RMB>Properties) it gives a size of 2MB, not sure if that's how much it'll weight after the build or something else, though.
    Also, is there any way I can turn it into that compressed version? having big files takes my LFS space in the version control.
     
    Last edited: Jun 16, 2023