Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question Animation Recorder - huge file sizes

Discussion in 'Animation' started by Javi-K, Apr 22, 2024.

  1. Javi-K

    Javi-K

    Joined:
    Mar 9, 2022
    Posts:
    8
    Hello, I''m trying to use the animation recorder in order to bake together
    - An existing animation (I'm dping tests using UnityChan SSU and the 4 min dance animation that comes with it: https://unity-chan.com/download/releaseNote.php?id=ssu_urp&lang=en)
    - The secondary animation of the character's clothes, hair, etc when moving (which are generated with UnityChanSpringBone)

    Into a single animation, that I can then export from Unity as an FBX file.
    The problem is, the resulting animation file from the Animation Recorder is way too big. The original 4 minute animation is around 7MB, but after recording only 40s of it with it resulted in an 1.7GB file (Unity spent around 2 hours recording and freezed the whole time). When added to the UnityChan model and both are exported together as an FBX, it becomes 170MB.

    I'm trying to find why this happens and if there's any way to make this process "lighter", I'd really appreciate if anyone can help me. I attach a screenshots of the settings I used for the Animation Recorder.
     

    Attached Files:

  2. thomastt_unity

    thomastt_unity

    Unity Technologies

    Joined:
    Nov 6, 2018
    Posts:
    14
    Hi Javi-K, could you confirm the version of both Unity and Recorder you are using? Thank you!
     
  3. Javi-K

    Javi-K

    Joined:
    Mar 9, 2022
    Posts:
    8
    I'm using Unity 2021.3.33f1 and Recorder 3.0.3.
    I actually ended up giving up using the Recorder because I can't keep waiting multiple hours watching it freeze every time I wanted to record the animation testing different settings.

    I found the GameObjectRecorder class, and basically modified the example code in order to record at 30FPS the Transforms and SkinnedMeshRenderers in the object and children.
    This works pretty well, since I have all the settings I needed from the Animation Recorder and it only takes around 1 minute to process it when I stop the recording. The resulting anim file is around 900MB ~ 1.1GB for a 4 minute animation at 30FPS. When exporting it as a binary FBX together with the character model it becomes around 70MB which isn't too bad.

    I'm still curious about why anim files become so huge or why the Animation Recorder dies when doing seemingly the same as the above class, but at least I solved my problem for now.
     
    Last edited: Apr 23, 2024
  4. thomastt_unity

    thomastt_unity

    Unity Technologies

    Joined:
    Nov 6, 2018
    Posts:
    14
    Thanks, that's an issue indeed. It shouldn't freeze the way you describe it.
    I know Recorder makes use of the GameObjectRecorder API internally so it feels there's something else that is causing this. I'll try to reproduce it with the information you gave us.