From Zero to Hero: Python for TouchDesigner
Many TouchDesigner beginners think they can create the massive, dazzling interactive and immersive installations of their dreams without learning how to code.
Oh, how I wish this were true.
The truth is that, if you can’t code Python, you can’t use TouchDesigner – at least not at anything resembling a professional level.
No high-end (or even medium-tier) TouchDesigner installation has ever been built without the use of Python.
Python is responsible for all show control, playback systems, state machines, network controls, algorithmic systems and decision trees present in a TouchDesigner project. Without Python, the best you can hope for is to create “interactive” installations that run using on/off buttons.
Hell, many TouchDesigner operators don’t even work without Python.
So yeah, you need to know how to code Python.
But learning Python in TouchDesigner is tough for almost anyone who hasn’t invested dozens of hours in learning how to do so:
- Many artists looking to leverage TouchDesigner have never coded before. These aspiring designers are faced with having to learn both Python and TouchDesigner at the same time. Compounding the difficulty is the fact that there’s no intuitive resource for how Python works in TouchDesigner. This means that even the best Python courses will still leave you guessing at how to implement Python in TouchDesigner (until now).
- Computer science majors and programmers typically also struggle here, as interaction between objects and python in TouchDesigner has its own paradigm that works different from any other scenario. Deducing how Derivative implemented Python in TouchDesigner ends up being frustrating at best, and enough to halt a project in its tracks at worst.
But once you know what you’re doing, leveraging Python in TouchDesigner is both extremely powerful and easy. That’s why I’m releasing my first 2-training bundle, From Zero to Hero: Python for TouchDesigner.” This bundle consists of “Python in TouchDesigner 101” and “Intermediate Python for TouchDesigner.”
Here’s exactly what you get in From Zero to Hero: Python for TouchDesigner:"
Python in TouchDesigner 101:
- Learn the basics of Python and Object-Oriented Programming in TouchDesigner: To understand how Python works in TouchDesigner, you first need to understand object-oriented programming. The way in which Python interacts with TouchDesigner’s native elements – such as parameters and operators - is based on the concept of object oriented programming. If you don’t understand the object oriented paradigm, anything you do with Python will be a mystery – it might work, but you won’t know why, and your ability to customize and dive deeper will be limited. So we start by learning the fundamentals of object oriented programming.
- How to reference different values from operators to customize your projects: Want to change a color on a screen based on specific user input? How about change the music being played according to images being projected? To do this, you’ll need to draw data from TouchDesigner and reference it using Python. I demonstrate how to do exactly this.
- Take control of your operators and parameters using Python: This is where things start to get fun. You’ll learn how to write and use Python scripts that will take control of the state of different parts of your projects. For example, if you’re building a generative particle system, and you want the forces to change based on the number of people, you need Python scripts that will take control of the particles – or at least the parameters that tell them to do things.
- Build basic decision trees and control flows with reactive scripts: Through the use of “if” and “else” statements, you’ll uncover the secrets to crafting reactive Python scripts that allow you to customize your projects with decision trees and control flows. Control flows and reactive scripts blow open the doors on your your installations can accomplish. They’re the difference between an installation that can be only interacted with through an on/off button, to one that can take input from multiple sources and react based on whatever conditions you set.
Intermediate Python for TouchDesigner:
- Level-up your reactive scripts with Callbacks and Replicator COMP: If you’ve ever been impressed by a large scale TouchDesigner installation, you can be guaranteed the developer leveraged Replicator COMP to make it happen. Building off basic reactive scripts covered in part 1, callback scripts attach to specific operators to provide you with pinpoint control over what that operator does. Using Replicator COMP as an example, you’ll view a demonstration of how to use callbacks to dynamically create and control copies of operators within your project, at scale. The principles of creating responsive scripts you learn here apply to many other operators in TouchDesigner.
- Going beyond “if” and “else” for total TouchDesigner control: To get the most out of your scripts – and your installations – you need more than just “if” and “else.” In this segment, you’ll get real-world examples of how to use “try” and “except” blocks, “for” loops, and “while” loops.
- Time saving Python tricks that TouchDesigner doesn’t tell you: Like most things with TouchDesigner, there isn’t a lot of guidance in terms of best-practices and efficiency. That’s what this section is for. You’ll learn how to keep your code clean – this translates to installations that are bug-free and easy to scale. We’ll also cover advanced string formatting, changing data types quickly and easily, and global OP shortcuts. Finally, we’ll cover how to programmatically set parameters en-masse. Normally, this takes 10-20 lines of code – we’ll show you how to do it in 2.
- Scaling your projects and installations with advanced Python workflow and script management techniques: Building professional-grade TouchDesigner installations requires the ability to chain together many small scripts and control when they’re running. To accomplish this, you need a workflow that lets you manage 100s of interacting scripts without any barriers. The workflow you’ll be taught provides exactly that, and has been used to create dozens of world-class installations.
- Get the most out of Python libraries: TouchDesigner has a wealth of Python resources in their library. From generating random numbers to accessing external web APIs, you’ll learn how to leverage everything these libraries have to offer. If your mind hasn’t been blown by this point, it’s about to be: we then go outside TouchDesigner and discover how you can link the thousands of 3rd party Python libraries out there into your TouchDesigner installations.
Understanding how to use Python with TouchDesigner is fundamental to any professional designer’s skillset. Over the course of 5 hours and over 13 downloadable project file templates and examples, you’ll gain all the Python knowledge you need to start building and scaling the TouchDesigner installations you’ve always dreamt of.
If you’re serious about TouchDesigner but don’t have a good grasp on Python, "From Zero to Hero: Python for TouchDesigner" is for you.
So don’t wait – click below and get "From Zero to Hero: Python for TouchDesigner" today:
"Elburz has been an essential guide for me in this exciting and growing industry. He demystified many of the inner workings of TouchDesigner in my early days and has come in clutch with solutions on a number of high-profile installations we've worked on together since."
Elburz is the co-founder of The Interactive & Immersive HQ, the Immersive Technical Director of zero11zero, lead of nVoid division, and is one of the leading authorities on TouchDesigner.
He has worked on product launches, permanent installations, and worldwide tours with clients like Google, Kanye West, Giorgio Armani, Burj Khalifa, VISA, Nike, US Open, TIFF, American Express, Seattle Art Museum, Cannes Lions, Axwell & Ingrosso, Verizon, McDonalds, IBM, and many more. Elburz has lead teams across the world from Los Angeles, New York, Chicago, San Francisco, Montreal, Toronto, Shanghai, Singapore, Tokyo, Bangkok, Dubai, Scotland, and Paris.