Loading heavy pictures into Movie File In on the fly without freezing?

Hi there,

In my current project, I need to load pictures on the fly into a couple of Movie File In TOP.
Ok, I’m using Folder DAT, and I randomly grab one file in the list etc … Works fine.

But when I load one picture in one Movie File In TOP, the network is freezing a very bit, and then it is ok. UI is ok, so that’s not a UI stuff, just the loading by the Movie File In

Do you have any strategies for this ?

Should I have AS many Movie File In AS I have files ???
I could use replicator to have these, and then having ONLY one playing at a time.
I have a lot of RAM so I could load everything there.

Use the preload() method, more info here.

1 Like

Check out the tune-page. There are two timeouts:
grafik
The first one is about prereading frames, and the second one is the one you want to set to a very low value, even 0 is possible.

What this will do is, when the timeout is hit, and the file is not loaded, touch will stop loading the file and continue with that on the next frame. This will though create a short delay between triggering the load and the file actually being read.

2 Likes

To clarify a bit too, it doesn’t actually stop loading the file, the loading keeps happing after the timeout is hit. It just stops waiting for the load to finish, and will check again next frame to see if it’s ready yet.

@DavidBraun, @alphamoonbase @malcolm, thanks a lot for your answers.
It is clarifying things for me.

What about the strategy of instancing 20 Movie File In TOP at launch time, each one with my big picture loaded inside, and use a switch ?

As so often it’s a depends :if you need to quickly switch between the files this is a totally valid approach (also ui wise), just keep in mind that all the frames loaded will be held in vram, so depending on size and preread frames you can come to limits pretty quick

Thanks, yes, this is my worry.

Actually, I’m doing this (a bit) in my project FRGMENTS

And I’m using one of the best container ever for pictures… a video file.

Maybe I can do this too.
One file, n frames, and just retrieving a specific frame as I need it.