The next operator family we’re going to look at are CHOPs. If you’re using TouchDesigner as your interactive technology platform then you need to know about CHOPs because they’re extremely useful and they’re how we control the networks we’re making.
As you saw in the previous lesson, TOPs are our 2D textures but without any kind of CHOPs to control them and make them dynamic, things can get boring quickly.
In this example that we’re going to make, we’re going to use a really simple TOP network which is going to do some compositing of a circle on top of a bigger background.
Then we’re going to use CHOPs to get some information from the mouse, process that information a little bit, and use it to dynamically move that circle that we’re drawing on the background and affect it in different ways.
The first thing we’re going to do is go to the TOPs, make a Circle TOP, and then make a Constant TOP, which is going to serve as our background. Do what we did previously which was zero out all the channels, and then set the alpha to zero as well, so it’s black.
Go to the common page of the Constant TOP and set the resolution to 1920 by 1080. Create an Over TOP, and set the background as the second input, and the Circle as the first input, and then change the pre-fit overlay to be native resolution. Create a Null after this, and then draw the Null in the background using the display flag.
The one final thing you want to add to this is in between the Circle and the Over, add a Level TOP, so you can control some of the processing of the Circle (remember, right click on the wire between the two operators, and click insert operator).
Now we’re ready to start digging into CHOPs. CHOPs are all kinds of controlled data, whether we’re talking about OSC, Artnet or DMX, inputs like Kinect cameras, joysticks, tablets, all these things create CHOP data for us.
Go to the OP Create Dialogue and we’ll get started with a Mouse In CHOP. This gives us data about the position of the mouse, and we can get some other data like the left, right and middle buttons, as well as the wheel.
For our simple example, we’re going to start with the TX and TY position and add the left mouse button. You’ll see TX and TY are already written in the position X and position Y parameters to unmask and activate any one of the other channels, we just have to give it a name.
Click in the left button parameter, type “click”, and now you’ll see in the operator, the TX decreases and goes to -1 when your mouse is on the left edge of the screen, +1 on the right side. TY similarly is going to be +0.5 when you go upwards and -0.5 at the bottom.
We’re going to change the output coordinates because we want those two to be the same, because it makes scaling them more labor-intensive when they’re scaled differently. Go to the parameters and switch the Output Coordinates to normalized.
Now, when you take your mouse to the top of the screen, it’s at +1, bottom is -1, left side is -1, and right side is +1.
This will give us enough data to start playing around with CHOPs. And more importantly, we’re going to start doing something called referencing channels to control parameters.
Take your TX and TY position, and separate it from your click, because we’re going to process these two different data points differently. We’re going to use a Select CHOP (create this using the OP Create Dialogue).
Select CHOP is very useful because it allows you to take a subset of information from a CHOP that has a lot of channels and then process them however you want separately.
Go to the channel names parameter of the Select CHOP. Right now, you’ll see it’s set to star (*), which is a wild card, and means give me all the channels.
There’s two ways you can select different channels here.
You can click in the channel names parameter, delete the star, type “tx ty”, and then you would have those two channels.
Another option is use the dropdown on the right side of the channel names parameter. When you click on this, it shows all the channels available, and clicking on each one will automatically write its name into that channel name parameter, and effectively gives us the same end result.
Create another Select CHOP to isolate our click channel. Go to the channel names parameter again, click the drop down, click “click”, and now you have your click and your position channels separated.
Before we do any more processing, let’s find out where these values need to go. In the Over TOP, we want the X position of the mouse to control the X position translate, and the Y position of the mouse to control the Y position translate. Then for our click channel, we’re going to assign it to the opacity parameter of our Level TOP.
Select your Mouse and Select CHOPs by right clicking and dragging, and move them over to the left, so you have some room to work.
Now, we’re going to set up another Null. Null CHOPs are extremely important, and we’ll see exactly why in this case.
We know the checkpoint of this little chain of operators is going to be a fully processed TX and TY position that are going to be ready to reference in that parameter. So, make another Null CHOP right now before we even get to the end of the programming.
Referencing is one of the most fundamental parts of TouchDesigner programming, especially with CHOPs being our control data, they’re the easiest way for beginners to take control data and assign them to parameters.
I already mentioned that we want to change the Over TX and TY to be referenced by the TX and TY channels in our Null 2, and to do this is really simple.
Click on the Over so you see its parameters, then go to the Null CHOP and click on the plus button in the bottom right corner to activate its viewer.
Then what you’ll see is, once your mouse is inside, you can highlight the channels themselves and then just click and drag and drop them. It’s as simple as that.
So, for the TX channel, highlight over it, click and drag it over to the Translate X parameter of the Over. Release your mouse, and then you’ll get a pop-up box that gives you some default options for referencing.
Of these options, the only one you need to know when you’re starting out is the second one (Relative CHOP Reference). 95% of the time you’re going to be using this one.
Click on Relative CHOP Reference, and you’ll see that there’s a dotted line with an animated arrow that points towards the Over TOP from the Null 2.
When we have data inside of our operators that are dynamic and updating, it’s going to change the animation of the wire. This shows us that there’s dynamic data passing from that Null to that Over.
What you can see now is that we’re able to control the position of that circle using our mouse left and right position.
Let’s go ahead and do the same thing with our TY position. Go over to the Null, (make sure that your Over TOP is selected so you can see its parameters), and drag and drop the TY value onto the translate Y parameter (and again, select Relative CHOP Reference).
Now both TY and TX work, but I think the scaling is a little too far.
What we need to do now (which is very common in CHOPs), is scaling our values. We need to take our range, which right now is -1 to +1 left and right, and -1 to +1 bottom to top, and scale those to be -0.5 to +0.5 in both directions.
We’re going to use another operator that is probably going to be one of your most used operators: the Math CHOP.
Go in between your Select 1 and Null 2, right click on the wire, insert operator, type math, and create a Math CHOP.
Math has a lot of different options in its parameters, but what we want is range. The default is zero to one in both the “from range” and the “to range”.
Change the “from range” to -1 to 1 and change the “to range” to be -0.5 to 0.5. Test it on the X and Y, and everything should work as expected.
Next, let’s take that same concept and do it with our click channel.
First, make a Null CHOP, then connect your click channel to it (from the Select 2).
Then go to the post page of your Level CHOP parameters, and find the opacity. Activate the viewer on the new Null you created, then click and drag the click channel to the opacity parameter, let it go, and choose the second option again.
Once you do this referencing, you can turn the viewer off on each one of the Nulls.
What’s happening now is our click is zero when off, and one when it’s down. So every time you click your mouse, the circle becomes visible. But we want to do something more interesting than that.
I’m going to introduce you to another operator: Lag CHOP.
Lag allows us to filter the data, and average the data over time.
Right click on the wire between your Select 2 and your Null 3, insert operator, and create a Lag CHOP.
If you look at the parameters of the Lag, you’ll see that the Lag is set to 0.2 and 0.2, and the units are set to seconds. What that means is, when we click, it’s going to take 0.2 seconds for the value to go from zero to one, and when we let go, it’s also going to take 0.2 seconds to go down.
Now, for my personal preference, I think it would be more interesting if we had it go instantly from zero to one, and then have a longer trail off.
Go to your Lag parameters and set your upwards lag to be zero so it turns on instantly, but it fades away. And then go to your downward Lag and set it to one. Now when you click, it has a one second fade out before that channel goes back to zero.
You can do this however you want. If instead you want it to be inverted, and have the little circle to always be on, but then have the click change it from being on to being off, then you could add another Math CHOP after your Lag.
In between Lag 1 and Null 3, right click on the wire, insert operator, and create another Math CHOP.
Go to the “to range” parameter, and set it to be from 1 to 0. Essentially what this does is it inverts our channel. So that means it’s always going to be one when it’s off, we click it down, it instantly goes to black, and then when you let go, it takes one second to fade back on, like you’ll see in this GIF here:
In similar ways, you can really quickly and easily start using any of the different CHOPs. What’s really important to understand is the concepts that we’re learning are applicable to anything.
With basically any CHOP operator, you would take some data, use some Select CHOPs to isolate different parts of it, compute them or process them a bit, possibly using Math CHOPs, Lag CHOPs, Filter CHOPs, or any other CHOP that you want to filter with, then you would go to a Null CHOP, which would be your checkpoint, and from there you could use the viewer to click and drag those values directly over to different parameters (and you can do this with any parameters).
So now that we’ve got a better handle on CHOPs and we’ve looked at TOPs, let’s move on and check out our next TouchDesigner operator family: COMPs.
I possess a deep knowledge in many professional fields from creative arts, technology development, to business strategy, having created solutions for Google, IBM, Armani, and more. I'm the co-founder of The Interactive & Immersive HQ. Yo!
Building off of previous Python workshops, this class aims to demystify a few of the elements often used when doing advanced Python development work in TouchDesigner. From using storage to writing your own extensions we’ll work through the several concepts that will help you better leverage Python in TouchDesigner for installations and events. From the conceptual to the concrete, by the end of the workshop you will have both worked with abstract concepts in the textport and created a functioning tool for saving presets.
Matthew Ragan
We all know user interfaces in TouchDesigner are hard. If you’ve taken our Perfect User Interfaces training you’ll know all the ins-and-outs of creating your own user interface elements from scratch. But what if you need a UI made quickly? What if you want to skip building your own UI pieces? Widgets to the rescue! Widgets are the new and powerful way to make user interfaces quickly and easily in TouchDesigner. What they lack currently in their customization, they make up for in speed of deployment and out-of-the-box features that are easy to access through their custom parameters. Combined with new features to TouchDesigner such as bindings, creating quick, scaling, and aesthetically-pleasing user interfaces is a breeze. .
Everyone has seen pictures of TouchDesigner projects with hundreds of operators and wires all over the place. Impressive, right?
No! In fact, the opposite is true. If your projects look like this, you’re seriously hampering your TouchDesigner installations – and your potential to consistently get high-profile gigs:
If you want to create large-scale installations or consistently work on projects in a professional capacity, you need a project architecture that is clean, organized, and easy to use.
The best project architectures – those used by the pros – are so streamlined that they make programming TouchDesigner look boring.
I share how to do this in my training, “TouchDesigner Project Architectures for Professionals.”
In “TouchDesigner Project Architectures for Professionals”, I give you my exact project architecture system – the same system that’s made it possible for me to create installations for Nike, Google, Kanye West, Armani, TIFF, VISA, AMEX, IBM, and more.
With my project architecture system at your disposal, you will:
We accomplish this through my 3 core project architecture concepts:
I’ve spent over 8 years refining my project architecture into an easy-to-implement, repeatable system that any designer can use. Once you learn my system, you’ll be able to take on projects you didn’t think you were capable of. You will also have the confidence you need to land better gigs and meet challenging client demands with flexibility and ease.
Want to level-up your TouchDesigner skills and create projects that can intelligently make content and generative decisions using weather and climate data?
How about installations that span forty-story high-rises that use Twitter posts to prompt generative designs?
Big clients – with big budgets – demand a level of immersion deeper than the use of Microsoft Kinect and Leap Motion interaction. They want to integrate social media, custom web apps and their own CMS to create interactive installations that bring people together in a way they haven’t experienced before.
In short, they want to use technology to become part of the broader conversation.
Fortunately for us, we’re able to deliver this level of immersion by integrating external data sources into our TouchDesigner projects.
The catch? Bringing external APIs into TouchDesigner can be challenging:
That’s why I created my latest training, “Join the Broader Conversation: How to Use External Data and APIs in Your TouchDesigner Installations”. Made for the complete Python beginner, the training provides you with everything you need to begin integrating external data sources with your TouchDesigner projects.
When you’re done you’ll be able to charge more and secure bigger projects than you would previously.
In this 1.5 hour video training (which includes example project files), we will:
Without any guidance, I’ve found that learning to integrate external data natively into TouchDesigner takes new designers between 20-40 hours – and that’s not including the trial and error phase that comes with implementing these concepts for the first time. Many people quit out of frustration.
Want to avoid spending $50,000+ on the wrong computer hardware?
Or having to look your client in the eye and say “I don’t know” when they ask why their shiny new immersive media installation looks like a stuttering, jaggy hot mess?
Then you need this training.
When I first started working with TouchDesigner in 2011, I thought the most valuable skill I had to offer was my ability to code beautiful interactive and immersive media projects for my clients.
While this IS important, I quickly realized that that what my clients valued most was my ability to create an installation that performed perfectly – no tearing, stuttering, judder, or any other issues. If you think this sounds easy, you haven’t been working with Touch long enough.
This is one of the reasons my clients pay me $1,500 per day.
When I first started, I encountered all the issues mentioned above. I overcame them with a combination of all-nighters, hiring the right (and expensive) experts, and in some cases, luck. I also wasted a lot of time and money.
With experience, I was able to preemptively solve for all these performance issues.
That’s why I created the “Creating Flawless Installations with TouchDesigner” training. Now you can benefit from my 7+ years of experience without having to make the costly mistakes I did.
After this training, you will have the confidence you need to deploy immersive design and interactive technology installations for big brands who pay top dollar for your skills. And you’ll be one of the select few individuals in this industry that know how to do what I do with TouchDesigner.
In this 1.5 hour video training (which includes example project files), we will cover:
Want to create large-scale video arrays and real-time LED facades that span high rises?
How about installations that use GPU particle systems, volumetric lighting, and multi-composite operators?
As lots of you know, this is all possible with TouchDesigner – sort of.
Out-of-the-box TouchDesigner is great when you’re just starting out. But as your interactive installations grow larger and your clients begin to want more generative and technical content, there are several challenges that arise and the cracks begin to show.
Problems typically fall into two broad categories:
When problems due to scale such as these inevitably occur, the standard TouchDesigner functionality and nodes only gets you so far. And it doesn’t take very long before you have to explain to your client that you’re unable to deliver what they’re asking for.
Lucky for us, we can leverage the code that powers a lot of TouchDesigner to create installations of virtually unlimited scale and technical possibility.
We do this by learning how to program GLSL Shaders. GLSL is the programming language on which many of the features of TouchDesigner are created even now.
When you understand how to apply GLSL to TouchDesigner, you’re effectively turning on “God Mode.”
That’s why I created my training, “Turn on God Mode in TouchDesigner with GLSL Shaders.” In it, I cover the following concepts:
TouchDesigner is the leading platform for interactive media and immersive design, and is used to create the world’s largest installations. Elburz Sorkhabi explores and explains concepts in TouchDesigner revolving around network optimization and performance bottlenecks.
The user interface (UI) is an integral part of any TouchDesigner installation.
Most clients want dynamic installations that they can control as needed, without consulting a designer or programmer for every change. This is usually through a control panel and UI they can access.
Even more important are user-facing UIs – think interactive panels, turntable additions for live shows, and customizable remote controls. This is what many clients have in mind when they decide to contract someone to design an interactive installation.
But if UIs are so central to TouchDesigner installations, why is it so hard to make them not suck? Most UIs slow down installations and break when you try and resize a component or add multiple pages. They’re also ugly.
So as always, I’m fixing the problem by providing a training.
In my latest 2-hour training, you will learn how to:
A great TouchDesigner installation needs a great user interface. Get the training you need to provide professional UI for top clients today.
Elburz deep dives on all the the inner workings of Python in TouchDesigner. This introductory course takes you from the very beginning of your Python journey and explains concepts that will create a powerful foundation for all your Python scripting in TouchDesigner.
Elburz deep dives on all the the inner workings of Python in TouchDesigner. This introductory course takes you from the very beginning of your Python journey and explains concepts that will create a powerful foundation for all your Python scripting in TouchDesigner.
Ever wonder how TouchDesigner pros work so fast? Ever see a friend or colleague do something and think “How did you do that??” Elburz puts together the top tips and tricks that everyone needs to know when working with TouchDesigner. Speed up your workflows and explore undocumented features across both the application and each operator family.