I reviewed content on optimisation in Touchdesigner.
TouchDesigner Vol.035 Cooking, Optimization, & SceneChanger by Ben Voigt is an approximatelyl 3 hour video playlist that covers methods for optimising touchdesigner. Including an in-depth discussion on cooking – what it entails, the direction it flows and how to manage it. The video, recorded in 2020, may contain some outdated information. The video made reference to upcoming fixes for some issues mentioned.
Dirty Operators and Cooking
Dirty Operator
A dirty operator is when there has been a change in the data state.
When an operator is dirty then all the ops after it in the chain are also dirty.
Cooking
Cooking is the processing of data and it uses memory, cpu/gpu. The more cooking that happens, the more processing power is used.
Cooking occurs when both these things are true: the op is dirty AND it has something requesting its data.
Cooking flows up the chain.
TIPs
Put things that always cook, further down the chain
Some OPs, Noise OPs for example, always cook. If you are performing noise on something put it as late in the chain as it can be to still have the desired effect.
Optimise Expressions
Check your expressions are optimised – hover over the expression and look for the prompt
SOPS
Where possible make SOP transformations in the Geometry parameters
The transform SOP is a lot heavier than doing a transformation on a geo.
Where possible don’t use a MAT
You can set material properties in the render tab of the Geometry. For simple shading add materials in the render tab as it will use less computing power.
If you like particles, it is faster to Instance
Where you can use instancing as a way to take less cooking time by having as few SOPs cooking as possible – Particles will take more cooking power.
CHOPS
Chops with Multiple Channels
When combining two channels with a math and one cooks and the other doesn’t they will both have to cook.
**maybe now fixed** CHOPs with multiple channels will cook all channel inputs if at least one is cooking. If this is still true it can be better to separate channels into their own operators. Or use a chop execute dat.
**also perhaps fixed** The same goes for cells in a table dat
Lags and Filters always cook.
As do all time dependent operators. Because they need to store what the previous frames were in case they need them, they are always cooking (processing). Use them later in the chain where possible so they don’t make operators after them cook unnecessarily.
Tools
Here are some useful optimisation tools
Probe
The probe is a tool in the palette (tools menu) that displays a visual representation of memory and processor usage for both GPU and CPU.
Selective cooking
with a null you can choose selective cooking. It will stop cooking downstream but will force it upstream.
Info Chop
The info chop provides information on cooking time and other events and processes. It’s a good visual way to see if the changes you make are having an effect on the cooking time.
Troubleshooting Tips
GPU vs CPU bound
Discover whether your system is GPU bound or CPU bound is a good first step in identifying any issues with playback.
GPU bound
To test whether your