Hello everyone, I’m new in TD and looking for a simple way to set 12-20 looped movies, triggered by buttons, not using switch or crossfade, but with a custom pre-rendered same alpha transition (~5sec, where in 1st frame alpha = 0 - last =1) for each movie I triggered. But now, after many attempts, I’m not sure that’s could be easy. Thank you in advance.
Hello,
Here is an attempt at what you are describing. I used an animated noise instead of a pre-rendered transition but it shouldn’t be hard to replace it by your movie file in TOP and trigger the Play pulse button with a CHOP execute.
The transitions happen inside a Matte TOP which is useful for this kind of alpha transitions.
I don’t know what exact logic you are implementing for your buttons, so I just made a button that cycles through the folder DAT files in increments with a Keyboard In CHOP (press 1 to make it work).
For the example to work, make sure that track1 and track2 in constant1 CHOP have different values (otherwise both tracks will be reading the same file).
The main logic is: when the button is pressed, the Matte TOP switches from input 1 to input 2 in 5 seconds (as configured in speed1), while trigger1 makes the alpha mask visible then invisible again in 5 seconds (through level1’s opacity parameter). When the transition reaches completion, the non visible track changes its input source - this happens in both ways: when transition to track 2 completes, track 1 updates, when transition to track 1 completes, track 2 updates, and so on.
Please tell me if this works for you!
Transitioner.tox (2.4 KB)
Thank you for taking the time to consider my question.
I’ve got 2 errors on folder node (callback line 41 ‘File entry’ is not defined)
and on chopexec (line 8 in onValueChange ‘td.ParCollection’ has no attribute ‘const0value’).
I think I understand the logic, but Python… I think I overestimated my abilities, even though it seemed like a simple task.
What version of TD are you using? If you’re using <2023, Constant CHOP values are called value0 instead of const0value. I would recommend to try opening the file with the latest version to see it actually working.
I think python is the most straightforward way of achieving deck transitions, though it’s probably possible to do it with operators (you could map each of your buttons to switch between input files and assign them to one of the 2 decks every time you push a button, but it would be a bit bulky to scale up if you wanted to use more files).
Here is a tutorial by Matthew Reagan that explains the python implementation of this logic: presets and cue building | TouchDesigner 099 – Matthew Ragan
Thank you, Olivier. I’ll be try, and yes, I’m using ver 2022.
