Switch between images - avoid delay gap

Hi , I am relatively new to TD. I have a project where I switch between different image. I switch between images in my project in two ways:

  • select from a list with file name
  • switch between images that have been preloaded

Both ways create a little gap when one image or file suceeds the previous one. How to get around this and have an instant transition?

Any hints or recommendations much appreciated! Thanks!

The preloading time consists of: reading a file from disk, decoding the compression format, and copying the texture to the GPU.

So the duration of this process depends on the size of your media, speed of your harddisk, and image format used. For instance PNG is usually slower to load(decode) than a JPG file.

By default TD will wait 10000000 milliseconds for the Movie File In Top to finish reading a frame. So if you have a very heavy image, this can cause a stutter as TD is waiting for the image to finish loading before going to the next frame. You can tune this in the parameter window of the Movie File In TOP on the Tune page. So for instance set the parameter Frame Read Timeout to 15msec, if it hasn’t finished loading in that time, TD will skip to the next frame and try again.

So to handle any eventual loading time of media, I usually build an A/B deck. Show the media in player A, in the mean time load media in player B, show media in B, load media in A, show A, etc. So this uses two Movie File In TOPs, a Cross TOP / Switch TOP and some lines of Python.

Another option is to have as much Movie File In TOPs as you have images. This needs less coding but uses more GPU memory, and now every image is preloaded on the GPU and you can switch as fast as you want using for instance a Select TOP or Switch TOP. For an example how to set up this last method see Help→Operator Snippets, then the first snippet for the Replicator COMP

Thank you so much for taking the time to reply and suggest all these solutions! I’ll work through them one by one and see what works best for my project. Really appreciate the help!

1 Like