This beginner level TouchDesigner tutorial covers using the Noise TOP to generate vertex displacement effects within the Phong MAT. It also touches on how to create a render network from scratch, recoloring with the Lookup TOP, and adding post-render shading with the SSAO TOP. Below I discuss these topics in more depth. If you have questions, comments, suggestions or corrections please leave them below, and thanks for watching and reading!
Note: This tutorial makes use of new features found in the Spring 2019 update for TouchDesigner (Build 2019.14650) so make sure you have an up-to-date version!
01:31 Setting up the render network
06:12 Normal, color and height maps with noise
13:12 Coloring with the Lookup TOP
15:09 Adding motion to noise
16:33 Exploring noise parameters
17:50 Noise coordinate map input
22:55 Adding detail with the normal map
25:30 Changing camera angles
26:50 Changing geometry input
28:50 Screen Space Ambient Occlusion TOP
What is Noise?
Noise means different things in different contexts. For instance, in communication systems noise is the unwanted disturbance of a signal. It is the static of an old television, or the hiss and pop of a record, or the high pitched whine of electromagnetic interference when walking through library security scanners while wearing headphones (I would suggest you try it sometime, except it is rather uncomfortable!) Within the practice of sound art and video art many practitioners intentionally incorporate noise into their work, recontextualizing unwanted or unpleasant signals. This idea is present in a plethora of artistic mediums and movements: from musique concrète, to harsh noise music, to hardware hacking and contemporary glitch art. So often noise provides a fresh perspective that can surprise and inspire you as the artist.
I think it’s important to make a distinction between analog noise, and its digital counterpart. Given the same initial conditions, a program is expected to behave the same way every time. The predictability of software is a double-edged sword: what is great for a developing a consistent user interface is also what makes it challenging to intentionally create the unexpected. One way to start engineering randomness is with noise, which in this case refers to pseudorandom patterns of numbers. I say pseudorandom because computer algorithms are inherently deterministic and cannot provide randomness in the way specialized hardware can sample physical processes to produce “true” random numbers. The next best thing is to use functions which provide sequences of numbers that approximate randomness. Such noise functions provide a variety of interesting and useful patterns that seemingly never repeat (though ultimately they do).
A sequence of random noise will typically be discontinuous, where adjacent values jump around and have no apparent connection to the previous (as illustrated by the two examples of random noise below). This can be desirable, for instance, when each sample needs to effect a separate object. On the other hand, often one wants randomness with smooth transitions between points. There are several noise variants that accomplish this, with the more common examples being Perlin and Simplex noise, both of which were developed by Ken Perlin in the 1980’s. Noise is easily generated in TouchDesigner through the native noise operators (Noise TOP, Noise CHOP and Noise SOP). If you’re looking for more variation beyond the noise types found in the Noise TOP check out the noise component found in the generators section of the palette. For more information on noise I suggest checking out The Book of Shaders articles on Randomness and Noise, and the TouchDesigner Generative Design Examples (specifically M.1. Randomness and Noise).
Noise is an important tool for creating digital generative art. For a work to be generative, there must be autonomous (or non-human) systems involved in the decision making process. To that end, generative art need not be digital. Artists have long incorporated randomness in their work. In the 1950’s Ellsworth Kelly used chance operations to determine color choices in his paintings, while John Cage and Merce Cunningham are known for using chance (such as consulting the I Ching) to make choices in music composition and choreography. In the digital domain, noise can be a coin flip, or it can move smoothly like the path that a leaf takes as it falls from a tree (like the continuous curves generated using sparse noise in TouchDesigner). In my own practice, I often come back to the term shepherding random numbers, which I first encountered through Anders Hoff’s (Inconvergent) work. For me, it embodies the balance of control between the artist and machine. Jason Bailey’s article Why Love Generative Art? goes much deeper into this question, while providing detailed historical context for generative art.
Video as Data: Using Noise to Displace Geometry
My response after encountering two dimensional noise for the first time was “I’ve got something that can generate clouds… but now what? What else can I do with this?” I think it’s a valid question: what can we do with noise that pushes it beyond its surface level aesthetic? In the above video tutorial, I use pixel values to control the vertical displacement of vertices using the Phong MAT, though this is just the tip of the iceberg. Noise can be used in many contexts, from creating turbulence in particle systems, to generating varied movement in reaction diffusion simulations.
It helps to start thinking about video textures beyond their visual representation. The idea that the pixel values in a video texture can be used to store non-visual information is an important concept to working in TouchDesigner, or computer graphics in general for that matter. RGBA values can represent anything from positions, velocities, rotations, distances, height, and more. It’s best to think about them simply as variables, or containers for values, instead of colors. If you are familiar with GLSL or shader language this will seem like old news, but it took me a while working in TouchDesigner before I fully understood how powerful this can be. Paketa12 has some great tutorials that fully embody the idea of processing data in TOPs. For instance, his plexus tutorial provides methods for calculating distance thresholds and 3D point positions entirely in TOPs.
Screen Space Ambient Occlusion
Ambient Occlusion is an indirect lighting approximation – a way of darkening the creases, holes and surfaces that are close to one another to create shadows. Ambient Occlusion is an expensive process, meaning it takes too long to compute for real-time video applications (e.g. games, installations, or interactive media.) Screen Space Ambient Occlusion is a further approximation, which only takes into consideration a scene’s depth post-render instead of looking at the geometry itself. It’s much faster than real ambient occlusion and can be used to add a nice shading effect. This openGL tutorial has quite a bit more history and technical information about SSAO if you want to dive deeper. TouchDesigner’s SSAO TOP can perform Screen Space Ambient Occlusion on the output of Render TOPs and Render Pass TOPs. It must be connected directly to these outputs with no operators in between. Note that while SSAO is much faster than real Ambient Occlusion it can still dramatically slow down a system. It takes a bit of tweaking and is often a compromise between frame rate and quality.