Search Unity

Alembic multi thread

Discussion in 'Animation' started by unity_GhCCjBkYeYN1eQ, Nov 17, 2021.

  1. unity_GhCCjBkYeYN1eQ

    unity_GhCCjBkYeYN1eQ

    Joined:
    Jun 15, 2020
    Posts:
    3
    Hi all!

    Never looked at alembic sdk doc, but do you think is it possible to write a multithreaded alembic player?

    We have a project with near 50 alembic obejcts playing concurrently, but clearly it is cpu bound because of almebic proecessed one by one inside the frame time. So i was thinking about multithread, but i don't know if there are resources lock problems, or methods that needs to be run on the main thread or so.

    Thanks!
     
  2. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    189
    Hey,

    The current implementation is far from optimal, but it has been multi-threaded a fair amount: every file is read and processed in parallel (the streamed file needs some geometry massaging to get in a format that Unity can understand).

    The problem however, is that updating the scene data is single threaded (main thread).

    Did you look at VAT maybe? https://medium.com/tech-at-wildlife-studios/texture-animation-techniques-1daecb316657

    This technique has a crappy workflow, but if you have a single mesh per file and it is not varying topology, you might get better performance.
     
  3. unity_GhCCjBkYeYN1eQ

    unity_GhCCjBkYeYN1eQ

    Joined:
    Jun 15, 2020
    Posts:
    3
    Oh, ok, i understand.
    Huh, VAT looks a super cool technique. Thanks, i'll take a look!