The Interactive & Immersive HQ

TouchDesigner’s Data Model

Moving data between different families of operators is a confusing thing for even intermediate users of TouchDesigner. Operators like CHOP To TOP, DAT To CHOP, SOP To DAT are already hard enough to say let alone effectively use. Over my years of experience I’ve noticed the problem isn’t a technical one, but an understanding of data structures. Let’s break it down!

The Silo Model

This is how folks typically think of data inside of TouchDesigner:

We have TouchDesigner’s magic engine on the bottom. Above that we have these unique styles of data and data formats such as 3D geometry for SOPs and image data for TOPs. Finally on top of that we have the individual SOPs, TOPs, CHOPs, etc that operate on that data. Does this sound like how you think about TouchDesigner? If so, there’s nothing wrong with that and it’s a perfectly natural way to understand TouchDesigner since we can’t naturally just wire together the operators of different families. The problem with that is that we then see conversion operations like SOP To CHOPs working on complex data and dealing with higher level data:

When we start imaging the data conversion as a complex operation it becomes this dense thing that we couldn’t possibly imagine working and all the operator’s parameters don’t make sense. This is what I’d call a siloed way of seeing the data. How do we remedy this?

Think of the data

The best way to approach reframing this in your mind is to consider that the underlying data that most operators use is the same and being in the same “data pool.” Then consider the different families of operators as different ways of representing the same data. One caveat: this doesn’t apply to string data like words in a DAT table, but it still applies to all numeric data in a DAT, it’s just not included on the diagram to keep the diagram small.

This would look more like this:

In this model we have TouchDesigner’s engine at the base. On top of it we have numbers, plain and simple. Then all the different families of operators essentially work on number data by structuring them in different ways and giving you sets of operations that are related to each other.

What does that all mean? Well think of this way. All data in TouchDesigner (except non-numeric strings like words) is essentially a numeric value. 3D geometry data are lists of XYZ positions which are number values in space. CHOPs are all about signals, hardware I/O, and communication protocols which are all numbers. The pixels inside of TOPs are just numbers with different ranges whether they’re 8-bit or 32-bit. So everything is just numbers!

Then you can start to think of the operator families as different representations of that data, or you can think of it as different packages and structures to organize the data. The operator families provide useful functionality based on the data structures as well. Once you’re in a SOP chain, then you’ll have useful operations for dealing with 3D structured data. When you’re in TOPs, you’ll have access to 2D compositing pipelines and functionality.

Get Our 7 Core TouchDesigner Templates, FREE

We’re making our 7 core project file templates available – for free.

These templates shed light into the most useful and sometimes obtuse features of TouchDesigner.

They’re designed to be immediately applicable for the complete TouchDesigner beginner, while also providing inspiration for the advanced user.

But then what about conversion?

Conversion operators make a lot more intuitive sense in this thought-model of TouchDesigner. They become less about doing complex operations and more about taking the underlying numbers and just packaging them in different ways. SOPS have point data and primitive data packages, CHOPs have channels and samples, TOPs have pixels, and DATs have cells in tables. Here’s a few examples:

  • CHOP to SOP – take three channels and use them for XYZ positions
  • TOP to CHOP – take the RGBA data the pixels and put them into 4 channels with a sample for each pixel
  • SOP to DAT – take each 3D point in space and create a new row with it’s XYZ position and attribute data

I hope you’re seeing the pattern: it’s just number data being flipped between packages.

Another important thing to remember is that most of these conversions are non-destructive. You can see in the below example that even after going through different families of operators, the first noise and the last two CHOPs are exactly the same even though I took different and arbitrary paths with each one:

For a more in-depth look at TouchDesigner’s data model, check out my tutorial where I talk about how pros understand TouchDesigner’s data model and how moving data between different families of operators is a non-destructive and creative process you can take advantage of:

Wrap up

So what does it all mean at the end of the day? Well the important thing is to demystify and de-complicate the process of moving data between operator families in your mind. It’s not something that happens on obscure data types, it’s a process of moving numeric data through different packages and structures. If you start viewing TouchDesigner in this way you’ll find yourself coming up with unique solutions to problems by moving data through different operator families and taking advantage of each family’s strengths.