Now that we’ve started learning about operators, it’s important to move onto TouchDesigner parameters.
Parameters are what we call the values that are available and can be changed for each given operator to control its functionality.
Every single operator has them. They can be scripted, manually controlled, tied to UIs, or they can be random numbers that are generated.
There’s so much flexibility in what you can do with custom parameters that it gives TouchDesigner the power to basically do whatever you want it to do.
The first thing you need to know is where the parameter window is.
If you open up TouchDesigner, you have this area in the top right here. This is the parameter window, and by default, it starts the project with it open:
The first thing you should know is how to open and close this parameter window because sometimes it accidentally gets closed and new users don’t know how to open it again.
Hit the ‘p’ key on your keyboard (remember, lowercase p) to open and close that parameter window. Sometimes you might be working on a project, but you aren’t working with parameters, and you just want to see more of your network and have more real estate, you might choose to close that parameter window, but most of the time you’ll probably be working with it open.
Now, if you wanted to take this parameter window and disconnect it from the Network Editor (because right now it’s locked to our Network Editor), you could go to an operator, right-click on it and click parameters which will open a floating window version of your parameter window.
So now let’s start by changing a few custom parameters and thinking about how that works.
An easy one that we can do is go to a Movie File In (that’s probably going to be an operator you’re going to use a lot). You’ll see immediately there’s lots of different types of parameters:
If you want to change the movie file, you would go to the File parameter and either type the path of a new file or click the plus button which would open up a file selector.
If you wanted to do things like turn the playback of the video on and off, then you could go over to the Play command parameter, which has the little on and off button you can click. There’s also have a speed slider below it which can slow the video down, or speed it back up.
There’s different pages of parameters under this one operator too. Some of them you probably won’t use, but we’ll go into more of these parameters later as we start looking at some of the more useful operators that you’re going to need to know as a beginner.
I encourage you to play around with the parameters as this can be a great exploration for you as a beginner!
For custom parameters that have number values, they can be entered in a few different ways. Depending on the situation, some parameters may require a static value, and some may need to be driven by other values and inputs.
Each parameter has three modes. Each mode is quite different, and defines how the parameter behaves. We have constant mode, expression mode, and export mode.
Constant mode is the default for most parameters, and is represented by a grey colour scheme in the value field.
Expression mode is used for Python, tscript, or mathematical operations and scripts, and is represented by a dark grey and light blue colour scheme.
Export mode is used to directly reference CHOP channels, and is represented by a light green colour scheme.
Each of an operator’s parameters can be independently changed between the three modes. To change the mode of a parameter, hover the mouse over the parameter’s name, and ‘+’ sign will appear near the name. Click this and it will expand the parameter, displaying more information and options.
You should see three coloured squares, and these squares represent the different modes for the parameter.
Operator parameters set to constant mode are represented by a filled grey square. This can be changed to expression mode by clicking on the outline of the light blue square (once you click it, the light blue square will be filled, and the value field to the right will also be coloured to reflect the parameter’s mode).
To change the parameter’s mode to export mode, a CHOP channel needs to be dragged and dropped on the parameter, at which point it will become export mode’s colour scheme (green), and the green box will be filled in.
The third element of the expanded parameter is the value field. The value field displays a different piece of information depending on the parameter mode.
In constant mode, the value field displays the current value, and can be edited by clicking and typing in the field.
In expression mode, the value field displays the script of Python or tscript that is being evaluated. The expression can be edited by clicking and typing in the value field.
In export mode, the value field displays two pieces of information separated by a colon. The text before the colon displays the path of the CHOP that is exporting to this parameter, and the text after the colon is the name of the channel being exported from the CHOP. Because these values are being imposed by another operator, the value field cannot be edited while the parameter is in export mode.
Going back to our Movie File In, one thing you may notice right away is the speed slider attached to the Speed parameter goes from zero to one by default.
But what if we wanted to go faster? I mean, does TouchDesigner really limit us to zero to one speed on a video? Of course not, it’s just that the default range is between zero and one on the user interface gadget.
If you want it to go two times speed, what you have to do is click inside of the little value field of the Speed parameter, delete the one, put something like two, hit Enter. Then all of a sudden, you’ll see your movie is running at two times speed. You can also type in 30 if you want to make it 30X speed and have it go crazy.
However, because our work is generative, you might not know which exact parameter value you need so you’re going to have to play with it and change the values to move them up a little bit or down a little bit, and see how it looks. For these purposes, we have something called the Value Ladder.
The Value Ladder is very useful because it basically eliminates the need for us to type a lot of these values. There’s two different ways to use the Value Ladder (and this goes back to why it’s nice to have a good mouse).
The easiest way to use it is to hover your mouse over a parameter.
For example, hover it over the Speed value, then middle-click and hold. And when you do that, you’ll have a little grey box appear on top of your parameter (we call this the value ladder). And this defines which increments you want to change that value by:
Let’s say your Speed parameter is currently at 1.15, and you want it to move by increments of 0.01, to see what 1.16 looks like, 1.17 etc. To do that, once you middle-click and hold in on it, you would come down to the increment of 0.01 that’s in the grey box. And then when you’re hovering your mouse over 0.01, drag off of the left edge or the right edge, while still holding down the middle mouse button.
When you do that, you’ll see it’s increasing or decreasing that value in increments of 0.01 as you move your mouse to the left or the right:
Once you decide that you like where the value is, simply release the middle mouse button and your mouse will snap back into place, and that value gets written to that parameter.
This is a very useful thing to learn how to use, and you can use it on basically any kind of value-based parameter.
Now, if you don’t have a good mouse with a middle-click that you can hold and drag easily, or if you’re on a laptop, there is another way.
Hover your mouse over the value, then left-click and hold. Hold it for a few seconds, and then the value ladder pops up and you can do exactly what we were talking about but using the left-click and hold.
One final thing to know about the value ladder is a small trick that a lot of people don’t know about.
If you have a parameter like source midpoint, which has two different parts to it (the X and the Y/the horizontal and vertical amounts of where the midpoint is), and you want to change both values equally, you can hover over the name of the parameter and then start your value ladder there.
This can be really helpful if you’re working with things like translations or transforms where you’re trying to move stuff around on X and Y together. Or if you have maybe some RGB values that you want to change in the grey scale, you don’t have to go through and change every single one individually.
The final thing we want to learn about parameters and operators is that there’s something called the Operator Info Modal. You’ll notice there’s no information area of the parameter, but there’s two ways we can open up this operator modal that gives us a lot of information.
The first is the method that I use, and a lot of people use. If you hover your mouse over the operator and you middle-click, you’ll get this white little pop-up:
And it has a lot of very useful information.
You can see the CPU cook time or the GPU cook time (that’s how much time it takes every frame for it to cook). You can see resolution, aspect ratio, format, the start and end frame, the sample rate (which is the fps in this case for a movie), how much GPU memory it takes, and more.
There’s so much information in there. It’s extremely useful when you’re just getting started and maybe there’s troubleshooting that you need to do.
What happens if you want to get this information and again you don’t have a middle-click because you’re on a laptop?
If you go to the parameters of that operator, you’ll see on the top left corner, an “i” icon. If you left-click on that, you’ll get the same pop-up box:
You can open up this info modal on any family of operators, and you’ll actually get different kinds of data that’s contextually based on that operator.
If you do it on a TOP, which is the texture operator, you get all kinds of texture information.
If you do it on a CHOP, you’ll get different information, like the number of channels, how many samples are inside of that channel, and whether it’s time slice.
If you have a SOP, maybe a sphere, you can see information like the number of points, primitives, vertices, the bounding box position, the centre position, etc.
That should give you a good idea of how parameters work, how to use the value ladder, and how to get the information of an operator.
Next in our series, we discuss the TouchDesigner User Interface.