Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Alembic Animations Causes A Memory Leak

Discussion in 'Import Formats & External Tools' started by Sapien_, Feb 4, 2020.

  1. Sapien_

    Sapien_

    Joined:
    Mar 5, 2018
    Posts:
    59
    My game heavily depends on the alembic format and it has been working great. However, I have noticed that if I am using looped animation like walk cycles, etc, the unity build eats the memory. I am using the timeline and alembic tracks with alembic slots to access specific points of the alembic animation. Animations that are supposed to be cycles, I set the Playable director wrap mode to loop. When playing the builds, I noticed that the longer the animation plays, the memory id being consumed and it does not stop. I don't usually let it go past 3 Gig but I almost let go so far to crash my computer. Is there a solution to this issue?
     
  2. cguertin

    cguertin

    Unity Technologies

    Joined:
    Aug 20, 2019
    Posts:
    41
    Hey @Sapien_,

    Could you tell me which version of Unity and Alembic package you are using?

    Would you also be able to send us a small project where the issue happening? I tried reproducing on my end in a small test scene but wasn't able to get the memory increase.

    Thanks!
     
  3. Sapien_

    Sapien_

    Joined:
    Mar 5, 2018
    Posts:
    59
    Hello, I am using Unity 2017.3.1f1 Personal 64 Bit.

    I will PM you a dropbox link. Once I have made a smaller version of the project.
     
  4. Sapien_

    Sapien_

    Joined:
    Mar 5, 2018
    Posts:
    59
    Hello again, I have sent you the dropbox link for the project.
     
  5. Sapien_

    Sapien_

    Joined:
    Mar 5, 2018
    Posts:
    59
    Hey I don't know if you missed my comment (as you might be busy) in the conversation I set up, did you or the other guys manage to find out anything?
     
  6. cguertin

    cguertin

    Unity Technologies

    Joined:
    Aug 20, 2019
    Posts:
    41
    Hey! Sorry for the delay, I just got a chance to look at this now and was able to reproduced the behavior you mentioned using your test project. It seems like the managed memory is not leaking but I'll need to dig a bit more with our Alembic developer.

    Just to help out our investigation, what pointed you to believe that the memory leak would be coming from alembic?

    Thanks!
     
  7. Sapien_

    Sapien_

    Joined:
    Mar 5, 2018
    Posts:
    59
    I did it by process of elimination. I played a build of my game and noticed that the game kept eating up the memory in the task manager, so what I did was look up anything that could be do so, I got rid of textures, code and eventually, I came to the animation and noticed that even with nothing attached to it, just having the animation on loop, still had the memory increase. So I disabled the idle animation but kept the other animations to test if it is true and yeah, the memory increase stopped when the idle wasn't playing but did when it was or when other animation loops were playing. That is what I remember of the top of my head. Was that enough information?

    Edit: Oh I forgot to mention. I have noticed that if I restart the scene (I put in death barriers to restart the scene), the memory usage drastically decreases.
     
  8. Sapien_

    Sapien_

    Joined:
    Mar 5, 2018
    Posts:
    59
    Hey again! Have you made any progress?
     
  9. Sapien_

    Sapien_

    Joined:
    Mar 5, 2018
    Posts:
    59
    Hey @cguertin did you manage to figure out the issue?
     
unityunity