Components (or COMPs) differ from other node families in that they contain their own networks and are used to create new networks. To make a new network, just create a new Component by pressing Tab and selecting from COMP. Then go inside your new component and start building your network.
Components can be nested, so you can make networks within a network. There are several ways to enter the Component:
- double-click it
- use the mouse wheel to zoom up close to it and keep zooming in to go inside
- select it and then press <Enter>
- select it and then press the < i > key
- select the Component and then press the small black fwd arrow in the pane’s path
- on the node RMB -> Edit OPs
When inside a Component, to go up a level press the < u > key, use the roller wheel to zoom out, or click on the '
/' in front of the Component’s name in the pane's path. You may find the Back and Forward buttons becoming handy to navigate into and out of Components.
With TouchDesigner’s mixed-node networks, you can populate Components with networks containing any type of operators. For example, consider making a Component that takes a movie input, applies a panel-controllable hue shift to it, and then applies that texture to sprites on a Particle SOP. This can all be placed inside one Component network. Components will have operator inputs and outputs on the left/right sides of the node if their network contains In and/or Out operators (of most types: TOP, CHOP, SOP, DAT. e.g. In TOP and Out CHOP).
These allow operator data to flow in and out of the component's network, allowing a Component to share its internal data with other components, operators, and other parts of your project. Each operator type has 2 operators called In and Out that take care of this. Adding these OPs inside a Component will add alphanumerically-ordered inputs/outputs on the left/right side of the component that data can flow through. Inputs are on Component’s left side, outputs on the right.
Components have the 4 common Flags along their left side: the Viewer Flag, the Clone Immune Flag, the Cooking Flag, and the Lock Flag. Object Components also have a Bypass Flag and an additional 3 flags in their lower right corner: the Pickable Flag (orange), the Render Flag (purple), and the Display Flag (blue).
Saving Components to Files
You can save out a Component into a .tox file with a RMB -> Save Component on the node. This is handy for sharing networks with other TouchDesigner users and projects. Any commonly-used tool or network you create in TouchDesigner is good candidate for a Component.
When writing a component to disk, it can embed files that the nodes in the component refer to. The files need to be in $
path is the path of the component in TouchDesigner.
Panel components can be parented in a hierarchy by connecting them together vertically (using their connectors on the top and bottom of the nodes).
- Ambient Light COMP
- Bone COMP
- Blend COMP
- Camera COMP
- Geometry COMP
- Handle COMP
- Light COMP
- Null COMP
- Xform In COMP
- Xform Out COMP
Object components can be parented in a hierarchy by connecting them together vertically (using their connectors on the top and bottom of the nodes).
- Animation COMP - the Animation COMP is used to create keyframe animation data. Keyframed channels are stored inside the component and can be edited by scoping the Animation COMP in the Keyframe Editor.
- Base COMP - the Base COMP has no panel gadgets and no object gadgets. It is the most basic shell of a component and can be used when a new network is required.
- Replicator COMP - the Replicator COMP creates a node for every row of a table, adding and deleting nodes ("replicants") as the table changes.
- Time COMP - the Time COMP contains a network of operators that can drive a Timeline, drive animations in Animation COMPs, or be used to drive any custom time-based system.
- Window COMP - the Window COMP create a separate floating application window. This can be used for control panels or when outputting to multiple monitors.
A noise component has been constructed to take a TOP, CHOP, and SOP input, apply noise to each one, then output the results. The component's internal network looks like this:
The image below shows how the inputs and outputs of the Component can be connected into a network.