I have a comp that uses the Fetch Image node to randomly select an image from a folder of images (the folder being the List Files node set to File Type of Image). When I trigger that configuration to randomly choose an image (by sending an event to the List Files node) it displays nice and fast - even with the folder containing a good number of images (hundreds at least).

But if I try to use the Fetch List of Images node to define a specific list of images from which to choose, what's the best way to trigger a fast selection/display from that list ? I initially had the Fetch List of Images node connected to a Render Image to Window node. In this configuration it seems that it is necessary to send an even to the Fetch List of Images node in order to trigger a new selection from the list - but the selection seems to be very slow - even for a list of only 30 or 40 image URLs.

I could break the image sets into separate folders and use "List Files" etc. but that won't be so efficient in terms of disk space because in this case a given image is likely to be used in multiple sets/categories that I will want to be choosing from and so I would need to maintain duplicate files. What's the most efficient way to choose from a list of images ? Thanks.

Dirk

Comments

In this configuration it

jstrecker's picture
Submitted by

In this configuration it seems that it is necessary to send an even to the Fetch List of Images node in order to trigger a new selection from the list - but the selection seems to be very slow - even for a list of only 30 or 40 image URLs.

Yes, the Fetch List of Images node can take a while. Each time it gets an event, it loads all of those 30 or 40 images files. (Whereas List Files just gets the image file names, and doesn't load the files.)

The trick is to avoid sending an event to Fetch List of Images each time the selected image changes. Instead, send an event to an intermediate node — either Share List or Hold List — which stores the loaded images and doesn't have to reload them.