Initialize Start is an approach in TouchDesigner to prepare and run timed processes. It applies to any system in TouchDesigner where there first needs be an initialization, like files read, server queried or data prepared until the system is ready to go, and then it is signalled to start. For example, before starting a show, you may want to initialize all your generative components at their first frame.
Initialization often takes more than one frame to complete, so there is usually provision to initialize over several frames without substantially stalling TouchDesigner.
Examples of parts of TouchDesigner where the Initialize Start approach is used are:
- Timer CHOP
- USD COMP, FBX COMP
- Bullet Solver COMP
- Nvidia Flow TOP, Nvidia Flex TOP
- Notch TOP
- Animation COMP
- Palette:moviePlayer COMP in Palette
- ( Palette:particlesGpu COMP in Palette TBD )
- Engine COMP
initializeStarttemplate components in the Palette (April 30, 2021 and later) - for making you own component that follow the Initialize Start approach
- Initialize (pulse) - prepares all data, in
- Start (pulse) - starts all the timers, puts in
- Play (toggle) - used to pause while playing
- Speed (float) - speed or slows the timer or simulation clock while runnning.
- Cue (toggle), Cue Pulse (pulse), Cue Point (float with menu % index, frames, seconds) - allows you to put/scrub sysetm at specified time
- Length (float) - if behavior is fixed-length, length is sometimes pre-determied like a movie file, sometimes user-set.
- Go to Done (pulse) - stops all the timers, possibly goes to an end-state, puts in
This is often achieved by attaching an Info CHOP to the operator. It is the actual output in the Timer CHOP.
timer_frames. used to drive animations, index lookups, etc.
running_seconds (external seconds since Start),
playing_seconds (affected by Play and Speed parameters).
Fixed-length vs infinite (unknown) length. An example of infinite length would be a particle simulation. There are two flavors of fixed-length - user-specified length or media-determined length (like an audio file).
In some cases, like the Timer CHOP, there are callbacks where you can run python code when events occur, such as the end of initialization, or the end of a fixed-length behavior.
Errors and Warningsedit
In some cases, the operator reports errors or warnings, like failure to initialize.