Initialize Start

From TouchDesigner Documentation
Jump to: navigation, search

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:

Controls Parameters[edit]

  • Initialize (pulse) - prepares all data, in initializing state
  • Start (pulse) - starts all the timers, puts in running state
  • 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.

Info Channels[edit]

This is often achieved by attaching an Info CHOP to the operator. It is the actual output in the Timer CHOP.

States - initializing, ready, running, done.

Ramps - timer_fraction, timer_seconds, timer_frames. used to drive animations, index lookups, etc.

Counters - cycles, running_seconds (external seconds since Start), playing_seconds (affected by Play and Speed parameters).

Behavior[edit]

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).

Callbacks[edit]

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 Warnings[edit]

In some cases, the operator reports errors or warnings, like failure to initialize.

An Operator Family that contains its own Network inside. There are twelve 3D Object Component and eight 2D Panel Component types. See also Network Path.

A built-in panel in TouchDesigner that contains a library of components and media that can be dragged-dropped into a TouchDesigner network.

To pulse a parameter is to send it a signal from a CHOP or python or a mouse click that causes a new action to occur immediately. A pulse via python is via the .pulse() function on a pulse-type parameter, such as Reset in a Speed CHOP. A pulse from a CHOP is typically a 0 to 1 to 0 signal in a channel.

Each SOP has a list of Points. Each point has an XYZ 3D position value plus other optional attributes. Each polygon Primitive is defined by a vertex list, which is list of point numbers.

An Operator Family which operate on Channels (a series of numbers) which are used for animation, audio, mathematics, simulation, logic, UI construction, and many other applications.