Timer driven Animations and Recordings

While this doesn’t really belong to the uv topic, it is a nifty trick from the production of pre-rendered content in TouchDesigner and so I thought I mention it here.

First of all, everything should be controlled by one timerCHOP.
As you will learn from the doocumentation and the operator snippets, even one timer can hold many scenes and subtimers. However, what we get from it are two channels:

timer_fraction : No matter how long the timer runs (10 sec, 2 days?), timer_fraction will return that time in a range netween 0 and 1. When we use that for animations, we can very easily change the timings of everything.

running: This is 1 while the timer is running and 0 when not. I use that to start and stop the recording. That way I make sure i record exactly the time I need. I hook it up to the moviefileoutTOPs Record button. As this means, it would record everythime I run the timer, I set the recording to pause unless i want to engage in a recording session.

MathTOP can be used to adpat the fraction value to whatevery value range the animation needs.
To control more complex animations, it is possible to use the fractional value to look up values in other curves. Thos could scome from the patternCHOP or could be keyframed in the animationCOMP.

If you want to scrub through your animations, like with a timeline, Activate Cue parameter on the timer and use Cue Point parameter to scrub. Yes, you could do all those things also with the timeline, but you can have only one timeline (not ture ; ) and you can have endless timers.

Last topic to adress here is the encoding:
For quick recordings, I use the H.264 (NVIDIA GPU) setting. This renders realtime on PC systems with a Nvidia GPU. You can compress the file while rendering. If you need good quality, select the lossless setting. It will result in big files, but the quality will look great and it will behave well with further encoding.

If you work inside a bigger production and other people might need to work with your files, I recommend Apple ProRes, which delivers good intermediate quality, behaves well in editing and does playback surprisingly well. It offers a number of quality settings, that can get less compressed and pretty heavy.

Finally for media server (and TD) playback it’s recommended to use either the HAP codecs, or NotchLC.
these are codecs, that are optimized for GPU decoding and allow you too playback everal files at the same time, which the other ones won’t as they have to pass the decoding through the CPU bottleneck (no parallel processing)


Related files

Find them in the root folder in the lesson files

EXAMPLE_Timer-Animation.toe