Search Unity

Dropped frames with multiple Streaming Image Sequences

Discussion in 'Animation' started by rotxyz, Aug 18, 2021.

  1. rotxyz

    rotxyz

    Joined:
    Mar 26, 2018
    Posts:
    7
    Hi!
    I'm doing some tests with Unity's Streaming Image Sequence package to see if it will work for a new project.
    In my tests with multiple (16) PNG sequences, I noticed that the package doesn't scale well and typically hiccups during playback.
    I can describe my project. I have 16 PNG sequences stored in the streaming assets folder and my scene contains 16 separate timelines with StreamingAssetSequenceTracks. When the scene begins, many of the RawImage objects that contain RenderTextures flicker, drop frames. They it fails they are transparent. Unity sometimes catches up after a few seconds or longer and then continues displays the scene smoothly, but the first moments are extremely problematic.
    I tried a different approach with a single Timeline and 16 tracks but the engine never really caught up.
    I made sure to set aside a GB of memory in the preferences.
    Looking at the Profiler, Update.DirectorUpdate is taking 240 ms and one of the 16 calls to StreamingImageAssetSequencePlayablesMixer.ProcesssFrame() is taking 150 ms.
    Can anybody from Unity comment on my approach? Is package designed to work with multiple instances?
    Thank you!