I’m a bit new/have been refreshing on TouchDesigner after many years of not engaging with it regularly.
I’m working on a seemingly simple exhibition project and trying to create a long, scrolling banner-like slideshow of MP4s that scrolls from right to left. Each of the MP4s is itself a pre-rendered slideshow that paces through different images. The final output will be projected on a wall. The banner contains around 2,000 MP4s. The unique nature of the exhibition requires the curator to have the ability to add or swap out individual MP4s from a folder at any time during the run of the exhibition and to have the updates feed live into TD, so I am seeking a solution that allows for this flexible real time access to the source media. I have tried a few different approaches and am really running into a dead end figuring out the best way to build this in Touch. I’d love some suggestions or guidance on methods to try or topics to research.
I have tried the following so far:
Use a File Dat and Replicator to access and bring the directory of MP4s into Touch
Use Layout to align MP4s along a line from right to left - here I run into the first issue: the total number of images is well above and beyond the roughly 32k horizontal resolution that Layout maxes out on
Use Transform engined by a Speed+Math chop to drive the scroll from right to left over time
Send the result of the Transform animation into a Comp at the resolution of the projection for output
This workflow would almost be functional except for the issue with max resolution on Layout, noted above. The issue causes all of the MP4s to majorly down-res and I understand why. The workflow works well if I drastically decrease the number of images being sent into Layout, but then of course all of the necessary content is not being included.
The second issue is CPU usage: frame rate drops to around 15, and in my attempts, I am only using around 90 MP4s to test out ideas, so I’m sure using this workflow and pre-loading 2000+ MP4s with Replicator is also a no-go.
It seems like the ideal version of this would be to find a way to still use a File dat, but to load and display only the 4 or so MP4s that appear as they scroll through the projection at any given time, and then “release” them, but my Touch experience is limited and I’m not sure if such a thing is possible or how to begin tackling it.
Attached is a simple still rendering of the ideal outcome, just imagine the bar of videos scrolling right to left over a period of several hours.
The marquee text scroll and timeline graphic flanking the videos are separate elements and not my concern at the moment. My priority is the scrolling videos bar.
This is the way to go, if you go through the Movie File In TOP documentation, you will see that preload and unload methods are provided to help control the loading behavior. You will also want to explore the Tune parameters of the TOP to prevent hiccups when loading a new file.
Here’s a few performance guidelines:
Use the fastest hard drive you can to collect the media files.
Have the videos be rendered in the lowest resolution that will suffice.
If possile, try to have all the videos use the same codec and resolution so you can exploit the performance advantages of unload(cacheMemory=True).
Do not use more movie players than needed.
If you still find performance issues with complex codecs like h.264, h.265, VP9, etc… Consider using codecs designed for media server playback like HAP, HAPQ, NotchLC.
As for the implementation, going for a Rectangular Geometry + Render TOP solution will probably net you the best performance and least resource utilization.
On another note, I highly recommend not doing this in TOPs but instead facilitate a 3D-Environment with some dynamic loading and unloading and using instancing.
You could for example have a Texture2D Array and dynamicly replace single texture in there and plaster the textures on single instances.
Also, the EventCHOP lends itself nicely to this behaviour.
Thank you both! I 've been poking around most of these suggested thoughts and the guidance is helpful. I’ll keep at it with these new ideas and swing back through with any updated questions. I appreciate the help!
Thanks for the guidance on this. I have made quite a lot of progress and have this almost running exactly as intended save for a small hiccup that I have been bashing my head against the wall trying to suss out.
This is my functioning workflow to date:
Folder DAT to bring list of video textures in as a table
Instancing to create rectangle instances according to the number of rows in the folder DAT
Speed CHOP + Match CHOP to engine the camera transform to scroll the instances
4 select DATs that separate the master Folder DAT into 4 separate tables, using % to select every 4th texture from the master Folder DAT
4 corresponding moviefilein TOPs, which loop through the textures from the 4 select DATs
The 4 select DATs are stepping through each individual row of the table via the counting up of Cycles from the timer DAT, so that each instance texture changes to the next when it has scrolled out of screen, and then 3 instances later, the texture has appropriately cycled to the next before it arrives back on screen again. In this way, the textures are constantly cycling after they exit the screen but before re-entering again. I’ve timed their scroll across the screen and used that time as the length of each timer DAT.
Hope that is somewhat clear.
Here’s where I’m getting hung up: everything operates exactly as designed until about 12 cycles in when it becomes clear that the relationship between the timer cycling textures and the scrolling of the instances has drifted by between .5 and 1 seconds on each cycle. As the drift accumulates, the pacing of the texture cycling gets worse and worse until the texture cycling begins to happen on screen rather than off. I cannot for the life of me figure out how the drift is happening or how to fix it.
I’m also very open to suggestions of less problematic ways of driving this texture swapping.
I’ve attached my toe file in case it’s helpful, though of course the folder of videos its sourcing will be missing.