YouTube2Text

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

by The Interactive & Immersive HQ · 6,219 words · 921 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, [snorts] in our case, we want to
  259. 8:32take the channel from this mouse in chop
  260. 8:36and have it control the translate
  261. 8:39parameter of this 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:45>> [snorts]
  359. 12:45>> you'll notice right around 75% of the
  360. 12:49width of the display, the circle
  361. 12:51disappears and there's this kind of dead
  362. 12:52zone where we can no longer see the
  363. 12:54circle even though we're moving our
  364. 12:57mouse
  365. 12:58uh quite a bit. And likewise, if we move
  366. 13:00to the left, roughly a quarter, a third
  367. 13:05uh of the display's width from the left
  368. 13:07edge, the circle disappears and again,
  369. 13:09we have this kind of dead zone. So, this
  370. 13:11provides us with a great opportunity to
  371. 13:13look at one of the most common
  372. 13:17methods for manipulating chop channels,
  373. 13:19which is to change their output range.
  374. 13:23We're going to use this in this scenario
  375. 13:25to set up sort of a boundary so that our
  376. 13:28circle never disappears, but at the same
  377. 13:29time we're also changing the output
  378. 13:31range of that data as well.
  379. 13:34And [snorts] the way that we do this is
  380. 13:36to use a math chop.
  381. 13:39So, I'm going to go ahead and move my
  382. 13:41mouse up to the connecting cable between
  383. 13:44the select one chop and the null on the
  384. 13:47right and right click on this cable and
  385. 13:50choose insert operator.
  386. 13:52I'm then going to choose the math chop
  387. 13:54from the list and place that in between.
  388. 13:58So, [snorts] the math chop is a super
  389. 14:00useful operator that you'll no doubt
  390. 14:02revisit time and time again. It contains
  391. 14:05a wide variety of you guessed it math
  392. 14:08related operations. But specifically for
  393. 14:10this example, it has this very useful
  394. 14:13page called range, which includes two
  395. 14:17different parameters for setting an
  396. 14:19input range and an output range. These
  397. 14:22are called from range and two range. So,
  398. 14:25for the from range parameter, we need to
  399. 14:27set this to match the range of the data
  400. 14:30that is coming into the math chop
  401. 14:33>> [snorts]
  402. 14:33>> in order for us to correctly remap it
  403. 14:37and rearrange that data to the new
  404. 14:41desired range, which is the two range.
  405. 14:43This This is our output range that we
  406. 14:45want the data to fall within.
  407. 14:49So, let's have a quick look before we
  408. 14:51make any changes here at what the data
  409. 14:53currently looks like.
  410. 14:55So, as I move my mouse to the left and
  411. 14:58finally reach the left edge of my
  412. 15:00display, we'll see that the the values
  413. 15:03coming out of the mouse in chop
  414. 15:05directly, visible well, really in all
  415. 15:08three of these operators,
  416. 15:10will hit a value of -1 in the x-axis on
  417. 15:15this left edge of the display. So,
  418. 15:16that's our that's our minimum or our
  419. 15:19lower limit of this data.
  420. 15:22And then on the right edge of the
  421. 15:23screen, we should see that the value
  422. 15:26hits just about one. The value range
  423. 15:29that we're going to use here, this input
  424. 15:31range for our from range parameter is -1
  425. 15:34to +1. That is the minimum and maximum
  426. 15:38values that we'll be seeing in that
  427. 15:41incoming data. In terms of our output
  428. 15:44range, we need to think about where we
  429. 15:46want our circle to end up when we hit,
  430. 15:53let's say, the left edge or the right
  431. 15:54edge of the screen. So, the overtop
  432. 15:56bases its positioning of the circle on
  433. 15:59the center point of that shape. So, when
  434. 16:02the center point hits an x coordinate of
  435. 16:05-0.5,
  436. 16:08that will correspond to the circle being
  437. 16:11aligned on the center point with the
  438. 16:15left edge of the display. And likewise,
  439. 16:17when I move my mouse to the right, when
  440. 16:20the x coordinate is +0.5,
  441. 16:24the center point of the circle, again,
  442. 16:26will fall on the right edge of the uh
  443. 16:30the texture that is in the background.
  444. 16:33So, I can use that -0.5
  445. 16:36to +0.5
  446. 16:38range as my new to range output, and
  447. 16:42that will cause the, again, the the
  448. 16:45positioning of this circle,
  449. 16:47at least in terms of the center point,
  450. 16:49to never leave the boundaries of this uh
  451. 16:53texture that we've set up. So, let's
  452. 16:56let's go ahead and practice doing that.
  453. 16:57So, I'm going to change the from range
  454. 16:59of this math chop to read -1
  455. 17:02for this lower limit to +1, and then I
  456. 17:06want the new output range to fall
  457. 17:08between -0.5
  458. 17:10and +0.5.
  459. 17:13Once I hit enter, we should see that
  460. 17:15now, when I hit the right edge of or the
  461. 17:18left edge, excuse me, of my display,
  462. 17:21the circle is bounded as well and does
  463. 17:24not disappear. It now
  464. 17:27uh is more closely kind of following the
  465. 17:29behavior of my mouse. And likewise, on
  466. 17:32the right side of the screen, when my
  467. 17:35mouse hits the right edge of my display,
  468. 17:37the center point of the circle hits that
  469. 17:40edge of the texture as well. Another
  470. 17:42thing that we can do is to work
  471. 17:44creatively to fine-tune the range of
  472. 17:47that data to impact the behavior of the
  473. 17:51circle even more. So, let's say, for
  474. 17:52example, I don't want the circle to have
  475. 17:56this basically half of it cut off as the
  476. 17:59center point reaches the left edge of
  477. 18:02the texture or maybe the right edge as
  478. 18:04well. I can bring up
  479. 18:07reduce, rather, this like overall output
  480. 18:10range just slightly to make sure that my
  481. 18:13circle is always fully visible and
  482. 18:15doesn't get cut off as it moves maybe a
  483. 18:17little bit too far to the left or right.
  484. 18:19And I can do that by changing slightly
  485. 18:22the lower and upper boundaries of this
  486. 18:25output. So, let's say, for example, I
  487. 18:27set this to
  488. 18:28um -0.442.
  489. 18:32And then for the upper limit,
  490. 18:34+0.442.
  491. 18:37What will happen now is as I move
  492. 18:39towards the left edge of my display,
  493. 18:41my circle stops just short of that edge.
  494. 18:45And likewise, as I move to the right, it
  495. 18:47stops just short of that edge, as well.
  496. 18:51So, you can really work with this
  497. 18:52two-range parameter to, again, create
  498. 18:56this sort of boundary and and limiting
  499. 18:58based on the type of look or behavior
  500. 19:01that you want to create. I'm going to
  501. 19:03set those back to -0.5
  502. 19:07and +0.5
  503. 19:09before I move on. Next up, we're going
  504. 19:12to have a look at using the output of
  505. 19:14our left mouse button, which is the
  506. 19:17click chop channel that we've set up.
  507. 19:20And we're going to use that to control
  508. 19:23the level top that we set up previously,
  509. 19:26specifically the opacity value, so that
  510. 19:29we can create a sort of animation when
  511. 19:31we click the button down, we can have
  512. 19:34this opacity value go from zero to one,
  513. 19:37and likewise, when we let go of it, have
  514. 19:40it reduce back to zero. So, again,
  515. 19:42another way of adding some interactive
  516. 19:44control over our setup.
  517. 19:48The first thing that I want to do, as we
  518. 19:50talked about in the earlier portion of
  519. 19:53this video,
  520. 19:54is to add a null chop.
  521. 19:57And this is a a best practice you're
  522. 20:00going to use constantly as you develop
  523. 20:03projects in TouchDesigner.
  524. 20:05We want to ensure that we have this null
  525. 20:07chop, so we don't have to keep
  526. 20:09recreating chop references as we add
  527. 20:11additional operators to our network.
  528. 20:14So, I've added this null chop, and we
  529. 20:17can now create a chop reference for this
  530. 20:21alpha, or excuse me, opacity parameter
  531. 20:24in my level top. So, again, I'm going to
  532. 20:28click on the level top to select it, and
  533. 20:32have the parameters appear over here on
  534. 20:34the right.
  535. 20:35The opacity parameter is on the post
  536. 20:37page. So, if you're not there already,
  537. 20:39make sure you've got that page selected,
  538. 20:41and you'll see it as the second option.
  539. 20:44Then, I'm going to come over to my null
  540. 20:46three operator, and like I did before,
  541. 20:50I'll click the viewer active little star
  542. 20:52icon in the bottom right, and then I'll
  543. 20:54mouse over the click channel,
  544. 20:57left click, and hold, and drag all the
  545. 21:00way over to the opacity parameter,
  546. 21:03then let go, and choose chop reference.
  547. 21:06Now, what will happen, as we can see, is
  548. 21:09that when I click the button down in the
  549. 21:12channel changes from a value of zero to
  550. 21:15one,
  551. 21:16the circle will appear, and then as soon
  552. 21:19as I let go of that button, it will
  553. 21:21disappear as it becomes transparent once
  554. 21:24again. So, this is pretty cool, but
  555. 21:26there's more that we could do to finesse
  556. 21:28and kind of push this further and create
  557. 21:30something a little bit more interesting.
  558. 21:32We can actually modify the signal coming
  559. 21:35out of the click channel slightly so
  560. 21:39that it can kind of taper off rather
  561. 21:43than having our circle immediately
  562. 21:46disappear when we let go of the button.
  563. 21:49So, we can use another new operator to
  564. 21:51us called the lag chop to
  565. 21:54uh create this kind of behavior.
  566. 21:56So, I'm going to right-click on the
  567. 21:58cable connecting select two and null
  568. 22:00three
  569. 22:02and choose insert operator and then grab
  570. 22:05the lag chop.
  571. 22:08The lag chop, as you can see, as soon as
  572. 22:10we add it into our network, adds a
  573. 22:13little bit of smoothing to the data.
  574. 22:15It's a kind of filtering type effect
  575. 22:18that will smooth out the changes in data
  576. 22:22over time so that instead of having
  577. 22:25these harsh on and off binary type
  578. 22:29states in our click channel, we have
  579. 22:32this smooth transition from zero to one
  580. 22:35and then from one back to zero.
  581. 22:38A handy way to kind of wrap your head
  582. 22:41around what's happening in this chop
  583. 22:44channel over time is to use something
  584. 22:47called the trail chop, which we're going
  585. 22:49to put at the end of our network here.
  586. 22:52And this is just a utility operator that
  587. 22:55we're going to use as a sort of
  588. 22:57oscilloscope to look at how this channel
  589. 23:00changes over time.
  590. 23:02So, I'll grab the trail chop and put it
  591. 23:04at the end.
  592. 23:06And we'll see here
  593. 23:08that
  594. 23:09when we click
  595. 23:11again, we have that kind of smooth curve
  596. 23:13going from zero to one, and when we let
  597. 23:15go
  598. 23:16again, we have a smoothing applied as we
  599. 23:20go from this peak of one back to zero.
  600. 23:24What's cool about the trail chop is
  601. 23:26besides showing us the changes
  602. 23:29in a graph format, which is basically
  603. 23:32showing us the last 4 seconds of data
  604. 23:34that is coming out of our null
  605. 23:37>> [snorts]
  606. 23:37>> we can also connect multiple operators
  607. 23:39to this. So, I could connect this this
  608. 23:42actually we don't want the lag, but we
  609. 23:44could connect the
  610. 23:45select chop before the lag
  611. 23:48to the second input
  612. 23:50and this gives us a comparison between
  613. 23:53those two
  614. 23:55chop channels of data. So, again, this
  615. 23:57one on the bottom
  616. 23:59is pre us applying lag, and the one on
  617. 24:02the top is post applying lag. So, you
  618. 24:04can see
  619. 24:06immediately the difference. We add a
  620. 24:07little bit of smoothing anytime the
  621. 24:10channel changes.
  622. 24:12Now, what's cool about the lag is that
  623. 24:14we don't have to apply this sort of
  624. 24:18smoothing effect uniformly. We can
  625. 24:20actually choose when the values in the
  626. 24:23chop channel are going from zero to one,
  627. 24:27that is they're moving in the positive
  628. 24:28direction, to apply a different amount
  629. 24:31of lag than when the values are moving
  630. 24:34in a negative direction. And we have
  631. 24:36these two lag parameters
  632. 24:39in our parameter window for this lag
  633. 24:40chop that let us decide how much lag we
  634. 24:43want to apply in that upward direction,
  635. 24:45in the positive direction, versus in the
  636. 24:47negative direction. So, for example, if
  637. 24:49I want to apply no lag when the values
  638. 24:53are moving in a positive direction I
  639. 24:55simply can put a value of zero in for
  640. 24:58this first lag value. I can increase the
  641. 25:01value in the second lag parameter to add
  642. 25:06more smoothing, more filtering when
  643. 25:08those values start to move in a negative
  644. 25:11direction. So, I could put, for example,
  645. 25:13a value of one here, and then we'll
  646. 25:15notice what happens is, especially if
  647. 25:18you look at the um trail chop here,
  648. 25:22when we let go of the mouse, when the
  649. 25:25the value moves from that value of one
  650. 25:28from the mouse being held down, and then
  651. 25:31goes back to zero, this larger lag value
  652. 25:34gives us a much longer kind of sloping
  653. 25:37decay. What is cool, though, is that the
  654. 25:39lag value of zero when the values go
  655. 25:42upwards, because it has no lag applied,
  656. 25:45we're still getting that really sharp
  657. 25:47attack as soon as we click the mouse
  658. 25:49button down. So, that allows for this
  659. 25:52circle to immediately appear as soon as
  660. 25:55we click the button down, but take a
  661. 25:57longer time to fade out. So, the lag
  662. 26:00chop in that way is really cool and
  663. 26:03useful for processing the data that
  664. 26:06you're getting out of the mouse or any
  665. 26:08other kind of interactive device you
  666. 26:10might have access to. Now, for the next
  667. 26:12step here, we're going to look at adding
  668. 26:15some additional processing with the math
  669. 26:18chop again. So, we're going to be using
  670. 26:20the math chop in a creative way once
  671. 26:22again to showcase how you can start to
  672. 26:25implement that in your project as well.
  673. 26:27So, I'm going to get rid of the trail
  674. 26:28chop for now, but feel free to add it
  675. 26:30back at any point to get a a sense for
  676. 26:32how your channels are changing.
  677. 26:35I'm going to add, after the lag and
  678. 26:38before the null three, by right clicking
  679. 26:41on this cable and choosing insert
  680. 26:43operator,
  681. 26:44the math [snorts] chop. And this time, I
  682. 26:47want to reverse the range of the data
  683. 26:50that I've got coming out of my lag. So,
  684. 26:53what this means is I'm going to be
  685. 26:55taking the input range of data and
  686. 26:58basically inverting it or flipping it.
  687. 27:00So, where we had a value of one
  688. 27:03previously, I want that to now
  689. 27:06output a value of zero, and where we had
  690. 27:08a value of zero, I want that to output a
  691. 27:11value of one.
  692. 27:12What this all means in terms of the
  693. 27:15change in the behavior of this chop
  694. 27:18network that we're creating is that now,
  695. 27:21when I have not clicked down my mouse
  696. 27:24button, we'll see the circle, and when I
  697. 27:27click the mouse button down, it will
  698. 27:29disappear and then fade back in. So, to
  699. 27:32do this, just like in our previous
  700. 27:34example, we're going to head to the
  701. 27:35range page,
  702. 27:36and here, we basically are just again
  703. 27:40flipping the from range and the two
  704. 27:43range so that they're sort of the
  705. 27:44opposite of one another. We know already
  706. 27:48that the mouse button here is only going
  707. 27:50to ever output data between zero when
  708. 27:54it's not clicked down and one when it is
  709. 27:57clicked down, and that's true even with
  710. 27:58this lag function applied to it. So,
  711. 28:01that means my from range is okay.
  712. 28:04But, my two range now I want to reverse,
  713. 28:06so I can set the lower boundary now to
  714. 28:09one and the upper boundary to zero to
  715. 28:12again reverse the range of that data.
  716. 28:16And we'll see, now, when we had a value
  717. 28:19of zero coming out of the lag,
  718. 28:21we now output a value of one.
  719. 28:23And when I click down my mouse and we've
  720. 28:26got that value of one coming out of the
  721. 28:27lag, we can see out of the math comes a
  722. 28:31value of zero.
  723. 28:33Then, when I let go of my mouse, the
  724. 28:35circle will slowly fade back in. So, the
  725. 28:39point here is just to showcase that, you
  726. 28:41know, the math might be seen as a kind
  727. 28:43of simple utility function for just
  728. 28:46matching the range of the data or
  729. 28:48applying simple
  730. 28:50mathematical functions to it, but you
  731. 28:51can work with it creatively to in this
  732. 28:54case adjust the output range and
  733. 28:56basically reverse the way the animation
  734. 28:59to the the opacity is being applied or
  735. 29:02as in our previous example create more
  736. 29:04of a tight boundary of movement for the
  737. 29:09circle so that it doesn't ever disappear
  738. 29:11off the edge of the display. For our
  739. 29:14final example, I want to point out that
  740. 29:16we don't have to use our chop channels
  741. 29:20in such a one-to-one way as we've done
  742. 29:23so far. Meaning we don't have to do
  743. 29:25something as maybe obvious as using the
  744. 29:30X position of our mouse to control the X
  745. 29:33position of this circle. We can take
  746. 29:36these chop channels and apply them to
  747. 29:38anything that we want at all in the
  748. 29:40program and create new forms of
  749. 29:42interactivity.
  750. 29:44So, [snorts] what we're going to do in
  751. 29:45this case is actually to take the same X
  752. 29:48chop channel
  753. 29:50uh TX that is chop channel from the
  754. 29:52mouse and use that instead to control
  755. 29:54the speed of playback for a movie file.
  756. 29:58So, in this case I'm going to turn the
  757. 29:59little display flag off for the circle
  758. 30:02example that we've been looking at so we
  759. 30:04don't see it in the background anymore.
  760. 30:06And then I'm going to add in the area
  761. 30:10above our network a movie file in top
  762. 30:13and place that roughly up here. Now, I
  763. 30:16want to load in a different movie file
  764. 30:19than what I've got here. So, I'm going
  765. 30:20to choose the little plus sign next to
  766. 30:22the file parameter
  767. 30:23and in the samples folder I want the one
  768. 30:26called count.mov.
  769. 30:29And once we do that, we'll see this nice
  770. 30:31little counting animation appear.
  771. 30:34>> [snorts]
  772. 30:34>> Now, I want to basically follow the
  773. 30:37technique that I had worked through
  774. 30:39initially to select the chop channels I
  775. 30:43want to use,
  776. 30:44adjust their range via a math chop, and
  777. 30:47then use a null chop to actually create
  778. 30:50the chop reference
  779. 30:52um to the speed parameter of this movie
  780. 30:54file.
  781. 30:56Now, just to give us an idea of where
  782. 30:58we're headed,
  783. 30:59let's have a look at the speed
  784. 31:00parameter. When the speed parameter is
  785. 31:02set to a value of one, that will play
  786. 31:04the the video back at full speed.
  787. 31:08But, when we decrease this
  788. 31:10to something like 0.5,
  789. 31:13that's going to play back the video at
  790. 31:1550% speed.
  791. 31:17And [snorts] likewise, if I keep
  792. 31:18reducing that, we're now at 23.1%.
  793. 31:21We can go all the way to zero if we want
  794. 31:24and basically pause the playback of the
  795. 31:27video.
  796. 31:28So, what that tells me is that a an
  797. 31:31output range of something like zero to
  798. 31:33one might be a good option because that
  799. 31:37will,
  800. 31:38you know, allow us to go full speed or
  801. 31:40go all the way essentially to pausing
  802. 31:43the playback of the video if we wanted
  803. 31:45to. We could also think about increasing
  804. 31:47the range, so maybe we go beyond one and
  805. 31:51we can move that up to like two and play
  806. 31:53the video at double speed.
  807. 31:56Um we have lots of options with the math
  808. 31:58chop, so feel free to play around with
  809. 32:01that however you'd like. But, what we
  810. 32:04can do to make this really simple for
  811. 32:07ourselves is to box select by right
  812. 32:10clicking and dragging all three of the
  813. 32:14select one, the math one, and the null
  814. 32:17two chops because we're going to reuse
  815. 32:20each one of these chops for our new
  816. 32:23network up top.
  817. 32:25This is a another handy method you'll be
  818. 32:27using a lot,
  819. 32:29especially when you know you need the
  820. 32:30exact same operators. So, I I went ahead
  821. 32:32and hit control C and then control V to
  822. 32:36paste. That would be command C or
  823. 32:38command V on Mac. And then with those
  824. 32:43still selected, I left clicked and
  825. 32:45dragged to move them up as a group.
  826. 32:48And now I've got again a second copy of
  827. 32:51my select with those same channels, a
  828. 32:54math chop to manipulate the range of the
  829. 32:57output, and a new null to make my chop
  830. 33:00reference from.
  831. 33:02So, in the math chop,
  832. 33:04I know that my input range is already
  833. 33:08correct because we're going to be using
  834. 33:10the TX channel once again. We know that
  835. 33:13the left edge of the display corresponds
  836. 33:16to -1 and likewise the right edge will
  837. 33:20give us a value of positive one.
  838. 33:23>> [snorts]
  839. 33:23>> All this to say that the input range is
  840. 33:26fine for this application and so we're
  841. 33:29going to leave that. But the output
  842. 33:31range now needs to change.
  843. 33:34So, we can set the two range
  844. 33:37minimum or the lower part of this limit
  845. 33:39to something else. Now, remember a value
  846. 33:42of zero in terms of our speed would give
  847. 33:45us basically a paused video. So, we
  848. 33:48might want to think about increasing
  849. 33:50that just a hair above zero in order to
  850. 33:54get some kind of playback out of our
  851. 33:56movie file. So, I might try something
  852. 33:57like 0.01,
  853. 34:00maybe.
  854. 34:01And then for the upper limit to this
  855. 34:04output range, maybe we do actually want
  856. 34:06to be able to play the video two times
  857. 34:08speed or even five times speed if if you
  858. 34:11so choose. So, I could put a value of
  859. 34:14two in that output range. And now on the
  860. 34:17left edge we'll have 0.1
  861. 34:19and on the right edge a value of two.
  862. 34:23Let's go ahead and practice by making
  863. 34:25the chop channel from this null four and
  864. 34:27we can see all of this come into action.
  865. 34:31So, I'm going to select the movie file
  866. 34:34in top, once again.
  867. 34:36I've got my speed parameter visible.
  868. 34:39I'll come down to my null four
  869. 34:41and activate the viewer here, and then
  870. 34:44mouse over TX,
  871. 34:47left click, and drag, and keep holding
  872. 34:49the button down until we hit the speed
  873. 34:51parameter.
  874. 34:53Then we can let go and choose chop
  875. 34:55reference.
  876. 34:56And you can see as I move my mouse
  877. 34:58towards the left edge of the screen, the
  878. 35:00video starts playing really, really
  879. 35:02slowly.
  880. 35:04Somewhere in the middle of the display,
  881. 35:06we get 100% speed, and then we can start
  882. 35:10speeding up even beyond 100% and start
  883. 35:13playing it back two times speed. So, in
  884. 35:16this third example, we've used the exact
  885. 35:18same set of techniques that we looked at
  886. 35:20previously to pull out specific chop
  887. 35:23channels that we wanted to work with,
  888. 35:25change their output range with our math
  889. 35:28chop,
  890. 35:30make a chop reference from our null chop
  891. 35:33to allow us to control this parameter of
  892. 35:37our movie file in, and just to
  893. 35:39reiterate, to showcase that these chop
  894. 35:42channels can be applied to just about
  895. 35:45any parameter in your TouchDesigner
  896. 35:49network. At the same time, it's just as
  897. 35:51easy to replace the input for the
  898. 35:54network that we've built today
  899. 35:56with something like a connect chop, for
  900. 35:58example, or any number of other
  901. 36:01interactive devices. You could then
  902. 36:03follow the same technique of pulling out
  903. 36:06specific channels, let's say the X
  904. 36:09position of your left hand,
  905. 36:12maybe the X and Y position of your left
  906. 36:13hand,
  907. 36:14which could then be used along with the
  908. 36:16math chop and the null chop to control
  909. 36:19the position of the circle, as in the
  910. 36:22first example, or
  911. 36:24again, the speed of the movie file in as
  912. 36:26in our last example. These techniques
  913. 36:29are foundational to building up more
  914. 36:32complex networks in TouchDesigner and
  915. 36:34things that you'll revisit again and
  916. 36:37again as you continue working with the
  917. 36:39program and hopefully really set the
  918. 36:42stage and open up a lot of possibilities
  919. 36:45for experimenting with and creating
  920. 36:47interactive functionality in
  921. 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,219 words across 921 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 choose a caption track available on the video.

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, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.