YouTube2Text

11 - Working with CHOPs (Updated 2026) - TouchDesigner Tutorial: Beginner Crash Course — Transcript

by The Interactive & Immersive HQ · 6,198 words · 916 segments · language en · Watch on YouTube

Full transcript

  1. 0:00The next operator family we're going to
  2. 0:02look at are chops. And chops are
  3. 0:04extremely useful because they're going
  4. 0:06to be how we control the networks we're
  5. 0:09making. As you saw in the last example,
  6. 0:11tops are our 2D textures, but without
  7. 0:14any kind of chops to actually control
  8. 0:16them and make them dynamic, things can
  9. 0:18get really boring really quickly. So, we
  10. 0:19want to make something that's not
  11. 0:20boring,
  12. 0:22so we need chops, plain and simple.
  13. 0:24So, in this example that we're going to
  14. 0:25make, we're going to use just a really
  15. 0:27simple top network, which is going to do
  16. 0:29a little bit of compositing of a circle
  17. 0:31on top of a bigger background. And then
  18. 0:34we're going to use chops to get some
  19. 0:36information from the mouse,
  20. 0:38process that information a little bit,
  21. 0:39and use it to dynamically move that kind
  22. 0:42of circle that we're drawing on the
  23. 0:43background, and affect it in different
  24. 0:45ways.
  25. 0:46So, let's get started. The first thing
  26. 0:47we're going to do
  27. 0:49is I'm going to go to the tops. I'm
  28. 0:50going to make a circle top.
  29. 0:54And then, similarly to what we did
  30. 0:56before, I'm going to make a constant
  31. 0:58top, which is going to serve as our
  32. 0:59background.
  33. 1:00And I'll do what I did previously, which
  34. 1:02was zero out
  35. 1:04all the channels,
  36. 1:06and then set the alpha to zero as well,
  37. 1:07so it's just black.
  38. 1:09And then I'll go to the common page, and
  39. 1:12I'll set this to 1920
  40. 1:14by 1080.
  41. 1:17And then I'm just going to do a simple
  42. 1:18over,
  43. 1:20just like we did before.
  44. 1:22The background is going to go to the
  45. 1:23second input.
  46. 1:25Circle's going to go to the first input.
  47. 1:28And then I'm going to change the prefit
  48. 1:30overlay to be native res.
  49. 1:34I'm going to put a null after this.
  50. 1:39And then I'll just draw the null in the
  51. 1:40background using the display flag we
  52. 1:42talked about.
  53. 1:44And then the one final thing I'm going
  54. 1:46to add to this is in between my circle
  55. 1:48and my over, I'm actually going to add a
  56. 1:50level top so I can control a little bit
  57. 1:52of the processing of the circle, maybe
  58. 1:53dim the opacity whenever we click the
  59. 1:55mouse. And like we said, a quick and
  60. 1:57easy way to do that is to right-click on
  61. 1:59the wire when it's selected.
  62. 2:01Click insert.
  63. 2:03In this case, we'll grab a level top and
  64. 2:05drop it in the middle.
  65. 2:07And then I'll just clean up this network
  66. 2:08a little bit so it looks a little more
  67. 2:10neat.
  68. 2:12Great. So now we're ready to start
  69. 2:13digging into chops. And like we said
  70. 2:15before, chops are all kinds of control
  71. 2:18data, whether we're talking about OSC,
  72. 2:20whether we're talking about Art-Net or
  73. 2:21DMX, or whether we're talking about uh
  74. 2:24inputs like, you know, whether Kinect
  75. 2:26cameras, uh the mouse, joysticks,
  76. 2:29tablets. All these things create chop
  77. 2:32data for us.
  78. 2:33So let's get started with the with
  79. 2:34something really easy. Let's go to the
  80. 2:36chop family here at the top. And we'll
  81. 2:38get started with a mouse in chop.
  82. 2:41And the mouse in chop basically gives us
  83. 2:44data about the position of the mouse,
  84. 2:45and we can get some other data like the
  85. 2:47left, right, and middle buttons, as well
  86. 2:49as the wheel.
  87. 2:50For our simple example, what we're going
  88. 2:52to do is we're going to start with the
  89. 2:53TX and TY position. And we're going to
  90. 2:56add the left mouse button. So what I
  91. 2:58have to do is, you can see TX and TY are
  92. 3:00already written in the position X and
  93. 3:02position Y parameters.
  94. 3:04To unmask and basically activate any one
  95. 3:06of these other channels, we just have to
  96. 3:07give it a name.
  97. 3:09So for my left button, what I can do is
  98. 3:10click in that parameter,
  99. 3:12type click,
  100. 3:14and now you can see I have my TX, which
  101. 3:16decreases and goes to -1 when I'm on the
  102. 3:19left edge of the screen,
  103. 3:20+1 on the right side.
  104. 3:22TY similar is going to actually be
  105. 3:25negative or positive 0.5 when I go
  106. 3:28upwards and negative 0.5 at the bottom.
  107. 3:32What I'm going to do is change my output
  108. 3:33coordinates because I want those two to
  109. 3:35be the same. I don't like them to be
  110. 3:36normalized by aspect ratio. It makes
  111. 3:37scaling them a little bit more
  112. 3:39uh labor-intensive cuz we have to scale
  113. 3:41them differently. I'm going to switch
  114. 3:43the output coordinates to normalized.
  115. 3:44And this way, when I take my mouse to
  116. 3:46the top of the screen, it's at one,
  117. 3:49bottom is -1,
  118. 3:51left side is -1, right side is +1.
  119. 3:54And then you can see we have a click
  120. 3:55channel. So, if I click
  121. 3:57that becomes one. And as I'm holding
  122. 3:59down still, it's still a one. And when I
  123. 4:01release, it goes back to zero.
  124. 4:03So, this will give us enough data to
  125. 4:05start playing around with chops. And
  126. 4:07importantly, more importantly I should
  127. 4:09say, is we're going to start doing
  128. 4:11something called referencing channels to
  129. 4:13kind of control parameters.
  130. 4:15So, let's start with the basic. Let's
  131. 4:17Let's take our TX and TY position. And
  132. 4:20we want to separate it from our click
  133. 4:21because we're going to process these two
  134. 4:23different data points differently.
  135. 4:25So, what I'm going to do is use
  136. 4:26something called a select chop.
  137. 4:29And select chop is very useful because
  138. 4:31what it does is it allows you to take a
  139. 4:34subset of information from a chop that
  140. 4:36maybe has a lot of channels and then
  141. 4:37basically just process them however you
  142. 4:39want separately. So, in this case I want
  143. 4:41to take my TX and TY and ignore my click
  144. 4:43channel for now.
  145. 4:44So, I can go to the channel names
  146. 4:45parameter. Right now you see it's set to
  147. 4:47star, which is a wild card that means
  148. 4:49giving me all the channels. And there's
  149. 4:51two ways you could select channels. What
  150. 4:52I could do is I could click in here,
  151. 4:55delete the star,
  152. 4:57type TX space TY,
  153. 5:00and then I would have those two
  154. 5:02channels. You can see we lost the click
  155. 5:03channel from here.
  156. 5:05Another option I could do is let me set
  157. 5:07it back to what it was, which is the
  158. 5:08star.
  159. 5:09I could use this little drop down here
  160. 5:11on the right side, which when I click on
  161. 5:13it, you'll see it it shows me all the
  162. 5:15channels available in a little drop
  163. 5:16down. And clicking on each one will
  164. 5:19automatically write its name into that
  165. 5:21channel name parameter, and that
  166. 5:23effectively gives us the same end
  167. 5:24result, but depending on, you know,
  168. 5:26maybe if you have a ton of channels you
  169. 5:27don't know exactly which ones you want,
  170. 5:29you can click the drop down and kind of
  171. 5:30just look through all the channels.
  172. 5:32So, we'll do the same thing. We'll make
  173. 5:34another select chop to isolate our click
  174. 5:36channel.
  175. 5:39So, I'll go to the channel names,
  176. 5:42click the drop down, click click.
  177. 5:44So, now I have my click separated and my
  178. 5:46position separated.
  179. 5:49So,
  180. 5:50before we do any more processing, let's
  181. 5:52find out where these values need to go.
  182. 5:54So, what I'm going to do is inside of
  183. 5:56this over
  184. 5:58this over top, we talked about using the
  185. 5:59translates. We used them a little bit in
  186. 6:00the last example.
  187. 6:02Essentially, what I can do is find a way
  188. 6:03to get that X position translate to be
  189. 6:06controlling this X position translate.
  190. 6:09We want the Y position of the mouse to
  191. 6:11control this Y position translate.
  192. 6:14And then for our click, what we're going
  193. 6:16to do is go to our level top, and level
  194. 6:19top has many different pages, but what a
  195. 6:21lot of people use level for is just
  196. 6:23simple opacity, which you'll find on the
  197. 6:24post page parameter.
  198. 6:26And then we're just going to turn this
  199. 6:28opacity on and off every time it clicks.
  200. 6:30So, if you click, it'll pulse it and
  201. 6:32we'll make a nice little ADSR, which is
  202. 6:35basically like an envelope or a shape to
  203. 6:36the click, so it's not just a straight
  204. 6:38on off on off. It'll have a little bit
  205. 6:39of shape to it. And we'll assign that
  206. 6:42click channel to this opacity.
  207. 6:44So, first let's just start with our
  208. 6:46position. So, what I'm going to do is
  209. 6:47I'm just going to select all of my chops
  210. 6:50by right clicking and dragging. I'm just
  211. 6:51going to move them over a little bit to
  212. 6:52the left, so I have some room to work.
  213. 6:55I'm going to set up a null.
  214. 6:58And like we said before, null chops are
  215. 7:00extremely important, and we'll see
  216. 7:02exactly why in this case. Because let's
  217. 7:05pretend we're in a situation, and it's
  218. 7:07not really even pretend because in my
  219. 7:09mind, I don't know what value ranges I
  220. 7:11need for these. I don't know if they
  221. 7:13need to be smooth. I don't really know,
  222. 7:14but I want to start just getting the
  223. 7:16network working so that I can start
  224. 7:18getting feedback from the actual
  225. 7:19network, and then I can adjust the
  226. 7:21network as needed. Now, like I said
  227. 7:23before, if we did something like
  228. 7:25reference our channels from here, and
  229. 7:27then we add something after, we have to
  230. 7:28redo the references, and then if we
  231. 7:30added another operator after, we have to
  232. 7:31redo them again.
  233. 7:32But we want to just save ourselves all
  234. 7:34that trouble, and we know the checkpoint
  235. 7:37of this little chain of operators here
  236. 7:39is going to be a fully processed TX and
  237. 7:42TY position that are going to be ready
  238. 7:44to reference in that parameter. So, for
  239. 7:46that reason I'm going to even make my
  240. 7:47null chop right now before I even get to
  241. 7:49the end of the programming.
  242. 7:51And then what I can do is even set up
  243. 7:54the reference now and just see what
  244. 7:55happens. See what it looks like.
  245. 7:57>> Let's talk next about making a chop
  246. 8:00reference.
  247. 8:02Chop references are one of the most
  248. 8:04fundamental techniques to working in
  249. 8:06TouchDesigner. It's something you're
  250. 8:08going to revisit over and over again.
  251. 8:11And as a beginner to working in
  252. 8:14TouchDesigner is probably the easiest
  253. 8:16way to set up and add interactivity to
  254. 8:21your projects. To set ourselves up for a
  255. 8:24chop reference, first we need to select
  256. 8:26the operator whose parameter we want to
  257. 8:29control.
  258. 8:30So, in our case, we want to take the
  259. 8:33channel from this mouse in chop and have
  260. 8:37it control the translate parameter of
  261. 8:41this over top.
  262. 8:42So, I'm going to click on the over top
  263. 8:44to make sure that the parameters are
  264. 8:47visible over here on the right. So, with
  265. 8:50the over top selected and the parameters
  266. 8:52visible,
  267. 8:53let's come back to our null chop.
  268. 8:56We're going to start off by making a
  269. 8:57chop reference from the TX channel to
  270. 9:01the translate X parameter. I now need to
  271. 9:03activate the viewer of this null chop to
  272. 9:07make the reference. And so, I'll click
  273. 9:08this little viewer active switch in the
  274. 9:10bottom right, which looks like a little
  275. 9:12four-pointed star shape. When I do that,
  276. 9:15it will make the viewer active and allow
  277. 9:16me to interact with the chop channels
  278. 9:19contained within it.
  279. 9:21And so, I'll want to mouse over the
  280. 9:24particular channel that I want to use
  281. 9:26for this reference. So, again, TX is
  282. 9:29what I want for this situation, so I'll
  283. 9:31mouse over TX. And then I'm going to
  284. 9:34click with the left mouse button and
  285. 9:36hold. I'll continue holding as I drag my
  286. 9:40cursor over to the right. Keep on
  287. 9:43holding that left mouse button until
  288. 9:45you've moved the cursor over top of the
  289. 9:48parameter that you want to make the
  290. 9:50connection or the chop reference to.
  291. 9:53So, I found my translate X parameter. I
  292. 9:55can now finally let go of my mouse
  293. 9:58button and we'll be greeted with this
  294. 10:00little dialogue. 95% of the time we're
  295. 10:03going to want to choose chop reference
  296. 10:07when we see this dialogue. There are a
  297. 10:09few special case scenarios where you may
  298. 10:12want to use the export chop option, but
  299. 10:15we'd recommend checking out our
  300. 10:17optimizations reference to learn more
  301. 10:19about that.
  302. 10:21So, again, at this point in your
  303. 10:22TouchDesigner journey, we're just going
  304. 10:24to focus on the chop reference option.
  305. 10:26We'll choose that and immediately you'll
  306. 10:28notice that the parameter has changed
  307. 10:31from
  308. 10:33what it looked like previously to now
  309. 10:35having a light blue color and a value
  310. 10:39that changes as you move your mouse left
  311. 10:42and right. If we move the mouse far
  312. 10:44enough to the left, we should see our
  313. 10:47circle reappear and follow our mouse at
  314. 10:52least in the horizontal direction across
  315. 10:54the display.
  316. 10:56We'll also notice that we have this
  317. 10:58little dotted line and moving arrow,
  318. 11:00which is showing that we have a
  319. 11:02connection made from this null two
  320. 11:05operator to the over top. Now, let's
  321. 11:09practice making a chop reference a
  322. 11:10second time so that we can get the
  323. 11:13vertical positioning of the circle
  324. 11:15connected as well.
  325. 11:17So, we've already got our over top
  326. 11:20selected
  327. 11:21and the parameter's visible on the
  328. 11:23right. Now, we want to grab the TY chop
  329. 11:27channel and apply that to our translate
  330. 11:30Y parameter. I've made sure, of course
  331. 11:32first, that my null to viewer is active
  332. 11:36via my little icon in the bottom right.
  333. 11:39I will then mouse over the channel that
  334. 11:41I want, which is TY, left click and
  335. 11:45hold, and keep on holding as I drag the
  336. 11:48mouse all the way over to the right. Let
  337. 11:50go only once I reach the translate Y
  338. 11:53parameter.
  339. 11:54And then in the little dialogue that
  340. 11:55pops up, I want chop reference.
  341. 11:59With those two connections made, we can
  342. 12:02see that now not only does the circle
  343. 12:05follow the horizontal uh
  344. 12:08movement of the cursor, it also moves in
  345. 12:12the vertical direction as well.
  346. 12:15So, that is amazing. We've just made our
  347. 12:17very first chop reference and officially
  348. 12:20have a
  349. 12:22a texture here that is interactive based
  350. 12:24on our mouse control. Now, let's look
  351. 12:26how we can work to further refine this
  352. 12:31connection and control that we've set
  353. 12:33up.
  354. 12:34We'll notice that as I move my mouse
  355. 12:36from left to right, at a certain point,
  356. 12:38roughly in on the right quadrant, or I
  357. 12:42guess uh right half of the display,
  358. 12:45you'll notice right around 75% of the
  359. 12:49width of the display, the circle
  360. 12:51disappears and there's this kind of dead
  361. 12:52zone where we can no longer see the
  362. 12:54circle even though we're moving our
  363. 12:57mouse
  364. 12:58uh quite a bit. And likewise, if we move
  365. 13:00to the left, roughly a quarter, a third
  366. 13:05uh of the display's width from the left
  367. 13:07edge, the circle disappears and again,
  368. 13:09we have this kind of dead zone. So, this
  369. 13:11provides us with a great opportunity to
  370. 13:13look at one of the most common
  371. 13:17methods for manipulating chop channels,
  372. 13:19which is to change their output range.
  373. 13:23We're going to use this in this scenario
  374. 13:25to set up sort of a boundary so that our
  375. 13:28circle never disappears, but at the same
  376. 13:29time we're also changing the output
  377. 13:31range of that data as well.
  378. 13:34And the way that we do this is to use a
  379. 13:37math chop.
  380. 13:39So, I'm going to go ahead and move my
  381. 13:41mouse up to the connecting cable between
  382. 13:44the select one chop and the null on the
  383. 13:47right and right click on this cable and
  384. 13:50choose insert operator.
  385. 13:52I'm then going to choose the math chop
  386. 13:54from the list and place that in between.
  387. 13:58So, the math chop is a super useful
  388. 14:00operator that you'll no doubt revisit
  389. 14:02time and time again. It contains a wide
  390. 14:05variety of you guessed it math related
  391. 14:08operations. But specifically for this
  392. 14:11example, it has this very useful page
  393. 14:14called range, which includes two
  394. 14:17different parameters for setting an
  395. 14:19input range and an output range. These
  396. 14:22are called from range and two range. So,
  397. 14:25for the from range parameter, we need to
  398. 14:27set this to match the range of the data
  399. 14:30that is coming into the math chop
  400. 14:33in order for us to correctly remap it
  401. 14:37and rearrange that data to the new
  402. 14:41desired range, which is the two range.
  403. 14:43This This is our output range that we
  404. 14:45want the data to fall within.
  405. 14:49So, let's have a quick look before we
  406. 14:51make any changes here at what the data
  407. 14:53currently looks like.
  408. 14:55So, as I move my mouse to the left and
  409. 14:58finally reach the left edge of my
  410. 15:00display, we'll see that the the values
  411. 15:03coming out of the mouse in chop
  412. 15:05directly, visible well, really in all
  413. 15:08three of these operators,
  414. 15:10will hit a value of -1 in the x-axis on
  415. 15:15this left edge of the display. So,
  416. 15:16that's our that's our minimum or our
  417. 15:19lower limit of this data.
  418. 15:22And then on the right edge of the
  419. 15:23screen, we should see that the value
  420. 15:26hits just about one. The value range
  421. 15:29that we're going to use here, this input
  422. 15:31range for our from range parameter is -1
  423. 15:34to +1. That is the minimum and maximum
  424. 15:38values that we'll be seeing in that
  425. 15:41incoming data. In terms of our output
  426. 15:44range, we need to think about where we
  427. 15:46want our circle to end up when we hit,
  428. 15:53let's say, the left edge or the right
  429. 15:54edge of the screen. So, the overtop
  430. 15:56bases its positioning of the circle on
  431. 15:59the center point of that shape. So, when
  432. 16:02the center point hits an x coordinate of
  433. 16:05-0.5,
  434. 16:08that will correspond to the circle being
  435. 16:11aligned on the center point with the
  436. 16:15left edge of the display. And likewise,
  437. 16:17when I move my mouse to the right, when
  438. 16:20the x coordinate is +0.5,
  439. 16:24the center point of the circle, again,
  440. 16:26will fall on the right edge of the uh
  441. 16:30the texture that is in the background.
  442. 16:33So, I can use that -0.5
  443. 16:36to +0.5
  444. 16:38range as my new to range output, and
  445. 16:42that will cause the, again, the the
  446. 16:45positioning of this circle,
  447. 16:47at least in terms of the center point,
  448. 16:49to never leave the boundaries of this uh
  449. 16:53texture that we've set up. So, let's
  450. 16:56let's go ahead and practice doing that.
  451. 16:57So, I'm going to change the from range
  452. 16:59of this math chop to read -1
  453. 17:02for this lower limit to +1, and then I
  454. 17:06want the new output range to fall
  455. 17:08between -0.5
  456. 17:10and +0.5.
  457. 17:13Once I hit enter, we should see that
  458. 17:15now, when I hit the right edge of or the
  459. 17:18left edge, excuse me, of my display,
  460. 17:21the circle is bounded as well and does
  461. 17:24not disappear. It now
  462. 17:27uh is more closely kind of following the
  463. 17:29behavior of my mouse. And likewise, on
  464. 17:32the right side of the screen, when my
  465. 17:35mouse hits the right edge of my display,
  466. 17:37the center point of the circle hits that
  467. 17:40edge of the texture as well. Another
  468. 17:42thing that we can do is to work
  469. 17:44creatively to fine-tune the range of
  470. 17:47that data to impact the behavior of the
  471. 17:51circle even more. So, let's say, for
  472. 17:52example, I don't want the circle to have
  473. 17:56this basically half of it cut off as the
  474. 17:59center point reaches the left edge of
  475. 18:02the texture or maybe the right edge as
  476. 18:04well. I can bring up
  477. 18:07reduce, rather, this like overall output
  478. 18:10range just slightly to make sure that my
  479. 18:13circle is always fully visible and
  480. 18:15doesn't get cut off as it moves maybe a
  481. 18:17little bit too far to the left or right.
  482. 18:19And I can do that by changing slightly
  483. 18:22the lower and upper boundaries of this
  484. 18:25output. So, let's say, for example, I
  485. 18:27set this to
  486. 18:28um -0.442.
  487. 18:32And then for the upper limit,
  488. 18:34+0.442.
  489. 18:37What will happen now is as I move
  490. 18:39towards the left edge of my display,
  491. 18:41my circle stops just short of that edge.
  492. 18:45And likewise, as I move to the right, it
  493. 18:47stops just short of that edge, as well.
  494. 18:51So, you can really work with this
  495. 18:52two-range parameter to, again, create
  496. 18:56this sort of boundary and and limiting
  497. 18:58based on the type of look or behavior
  498. 19:01that you want to create. I'm going to
  499. 19:03set those back to -0.5
  500. 19:07and +0.5
  501. 19:09before I move on. Next up, we're going
  502. 19:12to have a look at using the output of
  503. 19:14our left mouse button, which is the
  504. 19:17click chop channel that we've set up.
  505. 19:20And we're going to use that to control
  506. 19:23the level top that we set up previously,
  507. 19:26specifically the opacity value, so that
  508. 19:29we can create a sort of animation when
  509. 19:31we click the button down, we can have
  510. 19:34this opacity value go from zero to one,
  511. 19:37and likewise, when we let go of it, have
  512. 19:40it reduce back to zero. So, again,
  513. 19:42another way of adding some interactive
  514. 19:44control over our setup.
  515. 19:48The first thing that I want to do, as we
  516. 19:50talked about in the earlier portion of
  517. 19:53this video,
  518. 19:54is to add a null chop.
  519. 19:57And this is a a best practice you're
  520. 20:00going to use constantly as you develop
  521. 20:03projects in TouchDesigner.
  522. 20:05We want to ensure that we have this null
  523. 20:07chop, so we don't have to keep
  524. 20:09recreating chop references as we add
  525. 20:11additional operators to our network.
  526. 20:14So, I've added this null chop, and we
  527. 20:17can now create a chop reference for this
  528. 20:21alpha, or excuse me, opacity parameter
  529. 20:24in my level top. So, again, I'm going to
  530. 20:28click on the level top to select it, and
  531. 20:32have the parameters appear over here on
  532. 20:34the right.
  533. 20:35The opacity parameter is on the post
  534. 20:37page. So, if you're not there already,
  535. 20:39make sure you've got that page selected,
  536. 20:41and you'll see it as the second option.
  537. 20:44Then, I'm going to come over to my null
  538. 20:46three operator, and like I did before,
  539. 20:50I'll click the viewer active little star
  540. 20:52icon in the bottom right, and then I'll
  541. 20:54mouse over the click channel,
  542. 20:57left click, and hold, and drag all the
  543. 21:00way over to the opacity parameter,
  544. 21:03then let go, and choose chop reference.
  545. 21:06Now, what will happen, as we can see, is
  546. 21:09that when I click the button down in the
  547. 21:12channel changes from a value of zero to
  548. 21:15one,
  549. 21:16the circle will appear, and then as soon
  550. 21:19as I let go of that button, it will
  551. 21:21disappear as it becomes transparent once
  552. 21:24again. So, this is pretty cool, but
  553. 21:26there's more that we could do to finesse
  554. 21:28and kind of push this further and create
  555. 21:30something a little bit more interesting.
  556. 21:32We can actually modify the signal coming
  557. 21:35out of the click channel slightly so
  558. 21:39that it can kind of taper off rather
  559. 21:43than having our circle immediately
  560. 21:46disappear when we let go of the button.
  561. 21:49So, we can use another new operator to
  562. 21:51us called the lag chop to
  563. 21:54uh create this kind of behavior.
  564. 21:56So, I'm going to right-click on the
  565. 21:58cable connecting select two and null
  566. 22:00three
  567. 22:02and choose insert operator and then grab
  568. 22:05the lag chop.
  569. 22:08The lag chop, as you can see, as soon as
  570. 22:10we add it into our network, adds a
  571. 22:13little bit of smoothing to the data.
  572. 22:15It's a kind of filtering type effect
  573. 22:18that will smooth out the changes in data
  574. 22:22over time so that instead of having
  575. 22:25these harsh on and off binary type
  576. 22:29states in our click channel, we have
  577. 22:32this smooth transition from zero to one
  578. 22:35and then from one back to zero.
  579. 22:38A handy way to kind of wrap your head
  580. 22:41around what's happening in this chop
  581. 22:44channel over time is to use something
  582. 22:47called the trail chop, which we're going
  583. 22:49to put at the end of our network here.
  584. 22:52And this is just a utility operator that
  585. 22:55we're going to use as a sort of
  586. 22:57oscilloscope to look at how this channel
  587. 23:00changes over time.
  588. 23:02So, I'll grab the trail chop and put it
  589. 23:04at the end.
  590. 23:06And we'll see here
  591. 23:08that
  592. 23:09when we click
  593. 23:11again, we have that kind of smooth curve
  594. 23:13going from zero to one, and when we let
  595. 23:15go
  596. 23:16again, we have a smoothing applied as we
  597. 23:20go from this peak of one back to zero.
  598. 23:24What's cool about the trail chop is
  599. 23:26besides showing us the changes
  600. 23:29in a graph format, which is basically
  601. 23:32showing us the last 4 seconds of data
  602. 23:34that is coming out of our null
  603. 23:37we can also connect multiple operators
  604. 23:39to this. So, I could connect this this
  605. 23:42actually we don't want the lag, but we
  606. 23:44could connect the
  607. 23:45select chop before the lag
  608. 23:48to the second input
  609. 23:50and this gives us a comparison between
  610. 23:53those two
  611. 23:55chop channels of data. So, again, this
  612. 23:57one on the bottom
  613. 23:59is pre us applying lag, and the one on
  614. 24:02the top is post applying lag. So, you
  615. 24:04can see
  616. 24:06immediately the difference. We add a
  617. 24:07little bit of smoothing anytime the
  618. 24:10channel changes.
  619. 24:12Now, what's cool about the lag is that
  620. 24:14we don't have to apply this sort of
  621. 24:18smoothing effect uniformly. We can
  622. 24:20actually choose when the values in the
  623. 24:23chop channel are going from zero to one,
  624. 24:27that is they're moving in the positive
  625. 24:28direction, to apply a different amount
  626. 24:31of lag than when the values are moving
  627. 24:34in a negative direction. And we have
  628. 24:36these two lag parameters
  629. 24:39in our parameter window for this lag
  630. 24:40chop that let us decide how much lag we
  631. 24:43want to apply in that upward direction,
  632. 24:45in the positive direction, versus in the
  633. 24:47negative direction. So, for example, if
  634. 24:49I want to apply no lag when the values
  635. 24:53are moving in a positive direction I
  636. 24:55simply can put a value of zero in for
  637. 24:58this first lag value. I can increase the
  638. 25:01value in the second lag parameter to add
  639. 25:06more smoothing, more filtering when
  640. 25:08those values start to move in a negative
  641. 25:11direction. So, I could put, for example,
  642. 25:13a value of one here, and then we'll
  643. 25:15notice what happens is, especially if
  644. 25:18you look at the um trail chop here,
  645. 25:22when we let go of the mouse, when the
  646. 25:25the value moves from that value of one
  647. 25:28from the mouse being held down, and then
  648. 25:31goes back to zero, this larger lag value
  649. 25:34gives us a much longer kind of sloping
  650. 25:37decay. What is cool, though, is that the
  651. 25:39lag value of zero when the values go
  652. 25:42upwards, because it has no lag applied,
  653. 25:45we're still getting that really sharp
  654. 25:47attack as soon as we click the mouse
  655. 25:49button down. So, that allows for this
  656. 25:52circle to immediately appear as soon as
  657. 25:55we click the button down, but take a
  658. 25:57longer time to fade out. So, the lag
  659. 26:00chop in that way is really cool and
  660. 26:03useful for processing the data that
  661. 26:06you're getting out of the mouse or any
  662. 26:08other kind of interactive device you
  663. 26:10might have access to. Now, for the next
  664. 26:12step here, we're going to look at adding
  665. 26:15some additional processing with the math
  666. 26:18chop again. So, we're going to be using
  667. 26:20the math chop in a creative way once
  668. 26:22again to showcase how you can start to
  669. 26:25implement that in your project as well.
  670. 26:27So, I'm going to get rid of the trail
  671. 26:28chop for now, but feel free to add it
  672. 26:30back at any point to get a a sense for
  673. 26:32how your channels are changing.
  674. 26:35I'm going to add, after the lag and
  675. 26:38before the null three, by right clicking
  676. 26:41on this cable and choosing insert
  677. 26:43operator,
  678. 26:44the math chop. And this time, I want to
  679. 26:48reverse the range of the data that I've
  680. 26:51got coming out of my lag. So, what this
  681. 26:54means is I'm going to be taking the
  682. 26:56input range of data and basically
  683. 26:59inverting it or flipping it. So, where
  684. 27:02we had a value of one previously, I want
  685. 27:04that to now
  686. 27:06output a value of zero, and where we had
  687. 27:08a value of zero, I want that to output a
  688. 27:11value of one.
  689. 27:12What this all means in terms of the
  690. 27:15change in the behavior of this chop
  691. 27:18network that we're creating is that now,
  692. 27:21when I have not clicked down my mouse
  693. 27:24button, we'll see the circle, and when I
  694. 27:27click the mouse button down, it will
  695. 27:29disappear and then fade back in. So, to
  696. 27:32do this, just like in our previous
  697. 27:34example, we're going to head to the
  698. 27:35range page,
  699. 27:36and here, we basically are just again
  700. 27:40flipping the from range and the two
  701. 27:43range so that they're sort of the
  702. 27:44opposite of one another. We know already
  703. 27:48that the mouse button here is only going
  704. 27:50to ever output data between zero when
  705. 27:54it's not clicked down and one when it is
  706. 27:57clicked down, and that's true even with
  707. 27:58this lag function applied to it. So,
  708. 28:01that means my from range is okay.
  709. 28:04But, my two range now I want to reverse,
  710. 28:06so I can set the lower boundary now to
  711. 28:09one and the upper boundary to zero to
  712. 28:12again reverse the range of that data.
  713. 28:16And we'll see, now, when we had a value
  714. 28:19of zero coming out of the lag,
  715. 28:21we now output a value of one.
  716. 28:23And when I click down my mouse and we've
  717. 28:26got that value of one coming out of the
  718. 28:27lag, we can see out of the math comes a
  719. 28:31value of zero.
  720. 28:33Then, when I let go of my mouse, the
  721. 28:35circle will slowly fade back in. So, the
  722. 28:39point here is just to showcase that, you
  723. 28:41know, the math might be seen as a kind
  724. 28:43of simple utility function for just
  725. 28:46matching the range of the data or
  726. 28:48applying simple
  727. 28:50mathematical functions to it, but you
  728. 28:51can work with it creatively to in this
  729. 28:54case adjust the output range and
  730. 28:56basically reverse the way the animation
  731. 28:59to the the opacity is being applied or
  732. 29:02as in our previous example create more
  733. 29:04of a tight boundary of movement for the
  734. 29:09circle so that it doesn't ever disappear
  735. 29:11off the edge of the display. For our
  736. 29:14final example, I want to point out that
  737. 29:16we don't have to use our chop channels
  738. 29:20in such a one-to-one way as we've done
  739. 29:23so far. Meaning we don't have to do
  740. 29:25something as maybe obvious as using the
  741. 29:30X position of our mouse to control the X
  742. 29:33position of this circle. We can take
  743. 29:36these chop channels and apply them to
  744. 29:38anything that we want at all in the
  745. 29:40program and create new forms of
  746. 29:42interactivity.
  747. 29:44So, what we're going to do in this case
  748. 29:45is actually to take the same X chop
  749. 29:48channel
  750. 29:50uh TX that is chop channel from the
  751. 29:52mouse and use that instead to control
  752. 29:54the speed of playback for a movie file.
  753. 29:58So, in this case I'm going to turn the
  754. 29:59little display flag off for the circle
  755. 30:02example that we've been looking at so we
  756. 30:04don't see it in the background anymore.
  757. 30:06And then I'm going to add in the area
  758. 30:10above our network a movie file in top
  759. 30:13and place that roughly up here. Now, I
  760. 30:16want to load in a different movie file
  761. 30:19than what I've got here. So, I'm going
  762. 30:20to choose the little plus sign next to
  763. 30:22the file parameter
  764. 30:23and in the samples folder I want the one
  765. 30:26called count.mov.
  766. 30:29And once we do that, we'll see this nice
  767. 30:31little counting animation appear.
  768. 30:34Now, I want to basically follow the
  769. 30:37technique that I had worked through
  770. 30:39initially to select the chop channels I
  771. 30:43want to use,
  772. 30:44adjust their range via a math chop, and
  773. 30:47then use a null chop to actually create
  774. 30:50the chop reference
  775. 30:52um to the speed parameter of this movie
  776. 30:54file.
  777. 30:56Now, just to give us an idea of where
  778. 30:58we're headed,
  779. 30:59let's have a look at the speed
  780. 31:00parameter. When the speed parameter is
  781. 31:02set to a value of one, that will play
  782. 31:04the the video back at full speed.
  783. 31:08But, when we decrease this
  784. 31:10to something like 0.5,
  785. 31:13that's going to play back the video at
  786. 31:1550% speed.
  787. 31:17And likewise, if I keep reducing that,
  788. 31:19we're now at 23.1%.
  789. 31:21We can go all the way to zero if we want
  790. 31:24and basically pause the playback of the
  791. 31:27video.
  792. 31:28So, what that tells me is that a an
  793. 31:31output range of something like zero to
  794. 31:33one might be a good option because that
  795. 31:37will,
  796. 31:38you know, allow us to go full speed or
  797. 31:40go all the way essentially to pausing
  798. 31:43the playback of the video if we wanted
  799. 31:45to. We could also think about increasing
  800. 31:47the range, so maybe we go beyond one and
  801. 31:51we can move that up to like two and play
  802. 31:53the video at double speed.
  803. 31:56Um we have lots of options with the math
  804. 31:58chop, so feel free to play around with
  805. 32:01that however you'd like. But, what we
  806. 32:04can do to make this really simple for
  807. 32:07ourselves is to box select by right
  808. 32:10clicking and dragging all three of the
  809. 32:14select one, the math one, and the null
  810. 32:17two chops because we're going to reuse
  811. 32:20each one of these chops for our new
  812. 32:23network up top.
  813. 32:25This is a another handy method you'll be
  814. 32:27using a lot,
  815. 32:29especially when you know you need the
  816. 32:30exact same operators. So, I I went ahead
  817. 32:32and hit control C and then control V to
  818. 32:36paste. That would be command C or
  819. 32:38command V on Mac. And then with those
  820. 32:43still selected, I left clicked and
  821. 32:45dragged to move them up as a group.
  822. 32:48And now I've got again a second copy of
  823. 32:51my select with those same channels, a
  824. 32:54math chop to manipulate the range of the
  825. 32:57output, and a new null to make my chop
  826. 33:00reference from.
  827. 33:02So, in the math chop,
  828. 33:04I know that my input range is already
  829. 33:08correct because we're going to be using
  830. 33:10the TX channel once again. We know that
  831. 33:13the left edge of the display corresponds
  832. 33:16to -1 and likewise the right edge will
  833. 33:20give us a value of positive one.
  834. 33:23All this to say that the input range is
  835. 33:26fine for this application and so we're
  836. 33:29going to leave that. But the output
  837. 33:31range now needs to change.
  838. 33:34So, we can set the two range
  839. 33:37minimum or the lower part of this limit
  840. 33:39to something else. Now, remember a value
  841. 33:42of zero in terms of our speed would give
  842. 33:45us basically a paused video. So, we
  843. 33:48might want to think about increasing
  844. 33:50that just a hair above zero in order to
  845. 33:54get some kind of playback out of our
  846. 33:56movie file. So, I might try something
  847. 33:57like 0.01,
  848. 34:00maybe.
  849. 34:01And then for the upper limit to this
  850. 34:04output range, maybe we do actually want
  851. 34:06to be able to play the video two times
  852. 34:08speed or even five times speed if if you
  853. 34:11so choose. So, I could put a value of
  854. 34:14two in that output range. And now on the
  855. 34:17left edge we'll have 0.1
  856. 34:19and on the right edge a value of two.
  857. 34:23Let's go ahead and practice by making
  858. 34:25the chop channel from this null four and
  859. 34:27we can see all of this come into action.
  860. 34:31So, I'm going to select the movie file
  861. 34:34in top, once again.
  862. 34:36I've got my speed parameter visible.
  863. 34:39I'll come down to my null four
  864. 34:41and activate the viewer here, and then
  865. 34:44mouse over TX,
  866. 34:47left click, and drag, and keep holding
  867. 34:49the button down until we hit the speed
  868. 34:51parameter.
  869. 34:53Then we can let go and choose chop
  870. 34:55reference.
  871. 34:56And you can see as I move my mouse
  872. 34:58towards the left edge of the screen, the
  873. 35:00video starts playing really, really
  874. 35:02slowly.
  875. 35:04Somewhere in the middle of the display,
  876. 35:06we get 100% speed, and then we can start
  877. 35:10speeding up even beyond 100% and start
  878. 35:13playing it back two times speed. So, in
  879. 35:16this third example, we've used the exact
  880. 35:18same set of techniques that we looked at
  881. 35:20previously to pull out specific chop
  882. 35:23channels that we wanted to work with,
  883. 35:25change their output range with our math
  884. 35:28chop,
  885. 35:30make a chop reference from our null chop
  886. 35:33to allow us to control this parameter of
  887. 35:37our movie file in, and just to
  888. 35:39reiterate, to showcase that these chop
  889. 35:42channels can be applied to just about
  890. 35:45any parameter in your TouchDesigner
  891. 35:49network. At the same time, it's just as
  892. 35:51easy to replace the input for the
  893. 35:54network that we've built today
  894. 35:56with something like a connect chop, for
  895. 35:58example, or any number of other
  896. 36:01interactive devices. You could then
  897. 36:03follow the same technique of pulling out
  898. 36:06specific channels, let's say the X
  899. 36:09position of your left hand,
  900. 36:12maybe the X and Y position of your left
  901. 36:13hand,
  902. 36:14which could then be used along with the
  903. 36:16math chop and the null chop to control
  904. 36:19the position of the circle, as in the
  905. 36:22first example, or
  906. 36:24again, the speed of the movie file in as
  907. 36:26in our last example. These techniques
  908. 36:29are foundational to building up more
  909. 36:32complex networks in TouchDesigner and
  910. 36:34things that you'll revisit again and
  911. 36:37again as you continue working with the
  912. 36:39program and hopefully really set the
  913. 36:42stage and open up a lot of possibilities
  914. 36:45for experimenting with and creating
  915. 36:47interactive functionality in
  916. 36:50TouchDesigner.

About this transcript

This page contains the full transcript of 11 - Working with CHOPs (Updated 2026) - TouchDesigner Tutorial: Beginner Crash Course by The Interactive & Immersive HQ, generated from the public captions YouTube serves with the video. The transcript has 6,198 words across 916 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.