Grid of tagged images

Hello,
I have 2 problems for a project to solve and just cannot find a good start. May somebody has an idea.

  1. I have 300 images and want to place them in a grid. I guess I would need to do some instancing, but how do I get all these images loaded?

  2. All of these 300 images needs a tag e.g. tree, house, sun. So if I chose “tree” I want only to see all the images tagged with tree. I guess I will need to have a folder-dat from my image folder and then add a sperate column and enter the right tag-name. But how can I now chose only the rows containing the word “tree”?

    I woukd apperciate any help.

Hi,

  1. The most direct way to load images and display them in a grid would be to use the movefileinTOP, a replicatorCOMP and a layoutTOP. The replicated moviefileinTOPs could have their file path specified by a table with filenames in it. The layoutTOP can have a wildcard/pattern that grabs all the replicated TOPs and lays them out in a grid.
  2. This is a more interesting puzzle for me because i’m curious where the tags are coming from. If you can prepare the table outside of TD in a spreadsheet editor or something, i feel like you’d want the “tags” column to be formatted as a string that can be loaded into python as a list (ie: [‘tree’,’animal’,’bridge’]) and then write some python code that loads this table into a searchable structure that returns filenames for tags and feeds this to the replicator.

Sounds like a fun puzzle that touches a lot of useful parts of the system.

Hello Flowb,

thanks for your ideas. So I finally figured it out.

  1. I used a texture 3D to load all my images in to a texture. Then I used instancing with a rectangle and a grid Sop to lay every image out in a grid.
  2. I added the tags myself in the table. Then with reordering and selecting via value I could filter out my wished images tagged with the correspondinh tag. Finally I used shuffling to load the right texture into the right rectangle instance.