[StreamingImageSequence] Create clips with scripts

Hi,

We are using the package “SteamingImageSequence” in our TV shows to insert our 3D characters on a live environnement with an image sequences.

We are using the 0.3.3 version since it’s the only one working correctly. Newer versions make the image sequence blinking (dark blinks) and not useable for production. The 0.3.3 was a version we used in a previous project in Unity 2019.4 but we were not creating the clip with a script. We are using Unity 2021.1.16f1 with HDRP11.

For this new TV show I need to access the API to create clips but I don’t find how to do it correctly.

I know how to create other type of clips like a recorderclip, audioclip. My code to create the clip :

StreamingImageSequenceRenderer streamingImageSequenceRenderer = FindObjectOfType<StreamingImageSequenceRenderer>();
TimelineClip clip = track.CreateClip<StreamingImageSequencePlayableAsset>();
StreamingImageSequencePlayableAsset asset = (StreamingImageSequencePlayableAsset)clip.asset;
//What can I do with this please?
timeline_director.SetGenericBinding(track, streamingImageSequenceRenderer);

The result in my timeline:

7385765--901427--upload_2021-8-3_18-43-57.png

The Console :

Please I need help with this as this is urgent for us…

EDIT: I succeed by exposing all classes and API needed. I take example on the StreamingImageSequenceTest.cs to proceed.

By the way, is there a way to make the play smoother ? We read images from our server (high speed connection). We do not copy images in our project since it adds more works and duplicates data. For example we also read alembic for our server and it works perfect! We tried with very low resolution images PNG but still it has hard to read the sequence. Is there a good way to make it read a sequence on an external source (not in the Unity project) ?

Thank you,

Version 0.3.3-preview is quite old. There have been quite a lot of new features, bug fixes, and optimizations since that version, so if possible, I’d recommend you to try the latest version.

Can you please elaborate about this problem, and perhaps let me know how I can reproduce it ?
If you have a test project, then it will be even more helpful.

StreamingImageSequence supports playing image files outside of the Unity project.
For higher performance, you can use a symbolic link inside the Unity project, which refers to your external folder.

I’d suggest you to take a look at the documentation for folder trade-offs too, but please note that it’s only applicable for version 0.9.x and up.

1 Like

Hi!

I updated to 0.11. I still have randomly black screens (maybe because it needs first to be cached?) but also and it was already like that with 0.33, the last frame of the clip is included contrary to what VCam Can you confirm that? If I want 2 clips sticked one to the other I need to let 1 frame space between otherwise the last frame of the first one override the first frame of the second clip. At this frame, I would need the second SIS clip to be displayed but it’s still the first one. You can see the space on my screenshot and the cut of the cam at the bottom is synced with the first frame of the second SIS clip.

7412900--906584--upload_2021-8-12_19-14-52.png

I am working in 25FPS. The first clip in 1 img and the second one a sequence of 102 images. The first image is 6000x3376 and the sequence 1920x1080. Do you have any hint? Also during the recording there is still random black screen (image not loaded I guess). How could I make sure the image load before the record export? We need to export image sequence and MP4 videos.

We saw in another thread (not linked to SIS) that the timeline does not step correclty at 25FPS so at the recording I need to shift every clip to 1 frame because otherwise everything is 1 frame late. Do you think 25FPS has an impact while reading the clip in Play mode (needed to use recorder clips)?

We just need the images to be sure to be loaded before the recorder clip write on the RenderTexture please.

EDIT : Also what is “CPU mem. usage of tex in Runtime” in the tradeofs? Does it mean we can’t play all the images of the sequence if our images are out of the projet?

Thank you!

7412900--906581--upload_2021-8-12_19-2-57.png

@sindharta_at_unity Please it’s pretty urgent for us sorry to insist… I debug my problem for the blacks screens. The images can’t load smoothly (not a surprise I don’t ask for them to load instantly). I found that every black screen returns the code -1 “READ_STATUS_UNAVAILABLE”. What does it mean?

Is there a way to loop until the loading is a success ? I don’t need to load it instantly, it’s ok if it needs 5-6 frames, maybe even 10 or 20. I just need the full sequence exported in a sequence images (PNG) and a video (MP4).

Plus, I guess it uses a cache when playing the SIS in the timeline. I think the cache is cleared once I enter Playmode. A fix could be to not clear that cache since I might assume it is loaded correctly before by hand. BUT this is not the ideal solution and it’s just a backup solution.

The ideal solution is to freeze the scene until the image of the SIS clip is succeedly loaded.

EDIT : Is there a way to preload all SIS clips ? I would be ok to wait the cache is written and then start the recording. I ask this if it’s not possible to make the image loading blocking the timeline. I could forward in the timeline myself only if the current image is loaded but how to know when it’s loaded?

Thanks for your help!

Plus the mixer is not working. Sometimes we have 2 tracks in parallel so that the second one override the first one.

It’s working in scrub edit mode, but not when it’s playing in Play mode while recording (timeline still). In recording sometimes the first track is still displayed… that’s an urgence for us now if it’s not working.

The first track is an image sequence, the second one just a single image. Both are out of the projet.