Search Unity

Question Alembic animation in timeline has low fps, how to improve?

Discussion in 'Animation' started by Sound-Master, Feb 4, 2022.

  1. Sound-Master

    Sound-Master

    Joined:
    Aug 1, 2017
    Posts:
    48
    Hello Unity forum,

    I have received an alembic file from a 3D artist which is basically a thin large panel (think a large cube) that shatters procedurally. Imagine a large mirror shattering in a lot of pieces.

    I believe the mesh is fractured in real time inside the alembic animation and at the most it has 122173 vertices (when fully shattered) and 105653 triangles in the first submesh and 5476 triangles in the second submesh.

    I am able to load the file add the animation from the alembic stream player into a timeline.

    The issue I have is that during the fragmentation the frames per second go down to 30-25 on a machine with an RTX 3080 and a modern 12 core AMD CPU.

    The profiler shows that the majoority of the time is spent in PlayerLoop during
    Code (CSharp):
    1. AlembicStreamPlayer.LateUpdate()
    during the fps drops.

    Is there anything I can do to mitigate this issue and improve performance?

    Many thanks
    Michele
     
  2. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    189
    Hey,

    Unfortunately, the alembic format is not a very performant format mostly because it constantly stream, and the geometry is constantly getting post processed: polygons converted to triangles, vertices split, etc.

    If the geometry does not have varying topology, I suggest strongly to use VAT: https://medium.com/tech-at-wildlife-studios/texture-animation-techniques-1daecb316657

    There is public code to convert single animated alembic meshes into VATs and the ShaderGraph that play them.

    Hope this helps.
     
    mattiapompita likes this.
  3. Sound-Master

    Sound-Master

    Joined:
    Aug 1, 2017
    Posts:
    48
    Hello @vladala and thank you so much for your help! Fascinating technique which I hope I'll be able to understand at some point!

    We do have varying topology unfortunately as the geometry breaks into more pieces as we progress along the timeline.
     
  4. mattiapompita

    mattiapompita

    Joined:
    Mar 16, 2022
    Posts:
    11

    There are some similar fix for HDRP?