Optimisation in TouchDesigner

So for the past few months I’ve been putting together a bit of a realtime MediaServer System called Mara. As this is more of a personal project than a work project (our workflow is d3 with touchdesigner capturing in) I went in all guns blazing, no planning and building it as I went along. Every time I saw something I didn’t like with the system I’d simply rebuild the whole thing and because of this process it’s taken a bit longer but is much much neater than if I’d just kept adding and adding to it.

More recently I’ve finally completed most of my system and am now in Optimisation mode.

So here are some of the common tricks that people use when optimising, whether all of them are really beneficial is up for discussion but I’ve been implementing them anyways.

Get rid of references

This is not something I discovered myself but having lots and lots of expressions and references in parameters is not as efficient as exporting to or scripting to those parameters. I decided to do a bit of a test on this and couldn’t really prove it to be true I tried out Idzs test on the TouchDesigner help group, it’s 100x more efficient. Unless you have a huge system you probably needn’t bother with this. Nonetheless I’d be foolish to not just get on and have it in the system. It’s also nice to keep things “stateless” too whereby any op can set a value on any other op quickly. For sliders this isn’t advisable as running a script every frame can get quite heavy.

The 2×2 trick

Back in the olden days when VJ’ing on my macbook pro with 256mb of gpu memory or whatever it had the only thing that would ever be quick was the rate at which your fps dropped as you loaded lots of generative effects. Movies are fine as they can be preloaded and unloaded at your hearts desire however this unfortunately doesn’t seem to be the case for generator TOPs. The solution is fairly simple. If we aren’t using a generator TOP we set its resolution to 2×2 or something very low and suddenly we get all our GPU memory back. There is one caveat to this though, the stutter when loading your entire network into memory is very ugly and can cause problems, so on more modern cards it’s probably advisable to just leave your generative bits and bobs loaded into memory if you can. You can also split things across a couple of TouchDesigner instances and this will certainly help out a bit too.

COMP once

All those overs, multiplies and composite TOPs are never doing you any good really. A very elegant solution to this would be to check out Keith Lostracco’s  Archo-Ps? GLSL composite which uses one op for all your compositing needs. My own method is pretty much the same as that example but I’m generating my GLSL TOP from a bunch of table values, basically python writes the GLSL shader for me. The GLSL TOP scales with the system then and it’s much more manageable.

Maras Timeline

Realtime timelines can be a tricky one to get running fast.

Keep your UI separate

I’d always suggest keeping the UI on another machine or in a seperate instance. It’s handier and much more scaleable if you need to fork out to other machines. It forces you to be a bit more disciplined and helps you when you need to start putting previz tools etc in. I’ve been very careful to take care of the little details in the ui too such as making sure TOPs scale with the UI (but not using expressions) and making sure that CHOPs are kept to a minimum. Only one type of UI element really needs a CHOP and that’s a slider, sometimes even they don’t need them.

mara, 3d viewer, stage, toucdesigner

Maras 3d Viewer is pretty heavy with all of it’s opacity nonsense etc and billion and one switches.

One window to rule them all

Multiple windows are slower than having one big window. The general method most people seem to use is to have their containers and set their positions to wherever they need them in the window. For Mara I’m just throwing in a d3 style feed mapper so you can throw things wherever you want and split them up nicely.

TOP colour channel trick

Got a black and white movie? Then head to the common page and set your pixel format to 8bit fixed (R) and you’ve just removed everything except the one channel you need. This wont work with transparency but is really useful for fast UI elements.

Keep away from SOP transforms and materials

Why transform in a SOP when you can transform in a Geometry COMP? The reason for this being that transforms on the COMP supposedly happen on the GPU whereas transforms on the SOP level happen on the CPU. (or so I’ve been told) I’m actually very guilty of using transform SOPs because I’m a lazy noodler but it’s definitely one worth noting.

Applying a material to a COMP is much faster than to a SOP too.

SOP to DAT is also apparently slower than a SOP to CHOP so for SOP deformations etc too you’re better off using a CHOP than a DAT.

General Rendering Efficiency

Got more than one camera on one scene? Then use render selects rather than having 5 render TOPs. They’re much more efficient.
Projecting your project onto a building? Set your anti-aliasing to 2x rather than 4x and you’ll pretty much half your memory load.
Transparency seems to be a wee bit heavier than you’d like. Try and keep away from it
Use instancing in the Geometry COMP rather than the copy SOP.

Chain reorganisation

Only cook what you need to. there’s no point in cooking more than required so if you have a level thats cooking and it can go further up the chain so it no longer needs to cook then put it further up the chain.

Anything I missed?

This article is kind of a work in progress so if there’s anything I missed you’d like to share let me know and I’ll add it in.

TouchDesigner Beginner Workshop in London


Image courtesy of ab30 on the Derivative Forum.

It’s time for another London workshop. This is a two day 12 hour workshop on TouchDesigner with Richard Burns on 18th/19th June 2016. The price for the full event is £160. To purchase a ticket you can use the form below below details. This workshop will focus more on creation of content and VJing than building of systems which the last one was quite strongly using. This workshop will be held at Projection Artworks new headquarters.

Note: If the event is sold out then you can register interest by emailing richard@richard-burns.com. Also there is the comments/suggestions section of this post.

Day One (6 hours) – Introduction to TouchDesigner 088

– TouchDesigner user interface and an introduction to operators.
– Working with different operator families, generators and filters.
– A simple project using all operator families to create an audio reactive visual.
– Using Live controllers, Gamepads, MIDI devices and OSC.
– An introduction to Python and how Python works within TouchDesigner.

Day One Evening

On the evening we will likely go to the local pub to talk about projects, general catchup etc. The invitation to this extends to anyone and everyone who’d like to come as this’ll likely be a big meetup. We’ll be in The Vine from 6.30 in Kentish Town.

Day Two (6 hours)- TouchDesigner 088 Techniques & Workflow

– Hooking TouchDesigner up to Resolume via Spout
– Movie Playback and rendering techniques for rendering loops.
– An in-depth look at SOPs and what can be achieved with them.
– An overview of the Animation Component and keyframing techniques.
– An in-depth look at audio analysis using CHOPs.

Location, Date and Time: 

Date: 18th-19th June
Time: 10.00am-6.00pm both days.
Projection Artworks
Unit 400, Highgate Studios
53-79 Highgate Road


A Laptop with TouchDesigner FTE 088 and mouse
It would also be recommended to have a copy of Resolume for part of this workshop although it is not vital
Knowledge from First things to know about TouchDesigner


Purchase Here:

this workshop has now finished.

Keeping in Touch 03 – SOP Tricks

In this video I go through some SOPs and explain a few tips and tricks you can use when working with 3d objects in TouchDesigner.

Keeping in Touch 02 – Particle Attractors & Kinect

Spoutkit Version 1.0

I had a little idea today, wouldn’t it be great if I could give people who don’t use touchdesigner visuals which they can use in their own applications. If there was a little control panel that had some generative visuals in that could then be sent out via spout and picked up in other programs such as arena and people who don’t know TouchDesigner could still go ahead and use generative clips. Well…here’s what I mocked up tonight….Spoutkit:



Windows (sorry mac people although apparently there may be a way to send from windows to mac using >>>TCPSpout<<<)
TouchDesigner FTE. For 1080p you will need a commercial licence. Only the last build found >>here<< and above will work. (version 30580)
Spout which can be downloaded >>here<<

To run the file just extract the .zip and double click spoutkit.toe. This will open up a control panel, on the left hand side are your parameters, audio input, effectors etc and at the bottom is a bank of 5 different visuals which can be loaded. Once loaded move the effector sliders around to see what they do. To set the resolution to 1080p as opposed to 720p just use the toggle at the top right of the screen.

The project will automatically send out a spout texture handle named “spoutkit” which you can select in the program you wish to use.
It will use whatever the default audio input is as an audio input.

I’m going to expand on this idea over the weekend and make it a bit more useful, this is more just a proof on concept at the moment really, heck I wrote the whole thing in T-Script.


For information on how to install spout within resolume see the following video:

Abstract Still Pieces

I’ve been playing about a bit trying to do some t-shirt designs and things for myself since I can’t seem to find many online that are nice geometric shapes and so on…anyways I got completely distracted with all that and ended up doing these little SSAO pieces this evening.crablikething foxheadthingwithbg treething


Maybe I’ve been playing a bit too much pokemon or something but they seem to be kind of Fire, Grass and Water/Ice based. Anyways I’ve attached the .toe files so people can have a look at how they’re done.


WARNING: These files are HUGE, like…massive 4k renders running in realtime with an SSAO TOP in there too. I recommend pausing the timeline or turning off cooking and if you want to modify them turn the SSAO TOP off until you’re ready to render, the grass one I made can get into some really cool variations with the feedback.

Download .TOE Files

I’m probably going to throw them up on RedBubble too as prints/t-shirts etc, why not…just set one up at redbubble.com/people/visualesque


On a final note, theres a keeping in touch coming very soon. I’m currently laptopless as I’ve leant it to a friend for a VJ set.


Keeping in Touch 01

TouchDesigner Community News – January

A year ago if somebody asked me where to go to talk all things computational and in my case TouchDesigner based I’d look at them blankly and maybe just point them in the direction of the Derivative forums and hope that they find what they need via the much used search function. Asking questions would sometimes yield responses quite fast but I remember two years ago when learning was extremely slow due to lack of tutorials and I guess you could say lack of community togetherness.

Well no need to worry now as times are changing, over the past year I’ve encountered hundreds of people now using TouchDesigner and at the last London Workshop we decided to do something about it.


TouchDesigner Help Group – Facebook

We created the TouchDesigner help group which can be found here. The group has been a massive success and has dramatically sped up peoples learning processes as people log into facebook and see there’s a new post and check it out straight away, over 100 people have joined now so I’m really pleased it’s proving to be helpful. If you haven’t joined yet I strongly suggest checking it out.

TouchDesigner Google Hangout – Google +

The TouchDesigner Google Hangout is looking to be pretty busy, for those of us in the GMT area it’s quite a difficulty as it’ll be starting at 4am but I might jump on there early (and I imagine a few others will) so no doubt it’ll end up being from 10pm GMT time where the Europeans can have a bit of banter all the way through to 4am which is where the actual structured hangout starts, we’ll see…maybe we can do some speed artworks whilst we wait. Details of the hangout are below.

From tgreiser on the Derivative forum:

Calling interested parties to participate in online peer education with screen sharing via google hangout or skype.

* Learn about TouchDesigner and/or share your knowledge
* All skill levels welcome
* Q & A session
* Show and tell about your projects
* Short educational presentations
* Component sharing

Tentatively the first meetup will be Wed Jan 15, at 8pm PST via google hangout – here
If it goes well I would like to meet every other week for maybe an hour or two.

“Make Art Now” – Realtime/Generative/Interactive Art Collective – Facebook

Right after I’d setup the TouchDesigner help group Louis D’Aboville invited me to join a rather wonderful facebook group that each month has a themed challenge for it’s members to complete. People then vote on the artworks they like and there’s a winner. This months theme is Minimal and so far I’ve seen some pretty amusing posts in relation to it. It’s a very similar concept to the independent gaming scenes “Ludum Dare” competition, Actually go check that out too. This is a really good resource as there are people who use all the different software packages/programming languages you could imagine. You can find the Make Art Now group here

VJ Union Group – Facebook

For those of you inclined towards VJ’ing there is a main global VJ Union group alongside a host of smaller groups aimed at local areas or sharing. These are VERY active groups with a lot of inspiration and resources posted daily. These are listed in this rather long list below, they’re all quite self explanatory. (Thanks to Grigori for letting me know where they all are, that’s a lot of sub-groups)

The Global Group can be found here

Content specific/Regional Groups:

Loops (Sell & Share) | Showreels |  Europe | Australia | USA | Canada | Russia | Middle East | Israel | Africa | Asia | Mexico | South America | Sweden


Matthew Ragans Blog – Website

I’d never known about it until I just published this post but here’s a wonderful resource for learning, including a lot of Matthews work so this stuffs as real as it gets, check out his blog here. (Thanks for mentioning this Ali)

Ian Cassels tutorials – Vimeo

Ian came to visit me in London to do some one to one tutoring in the ways of TouchDesigner, I uploaded one of the videos to vimeo. What was more remarkable though is that Ian has started his own tutorial series, it’s all a bit dutch to me (seriously)  but you can find them on his vimeo channel here.

Also if you want to see the one featuring myself that’s on using the Web DAT thats here.

Momo the Monsters Sprite Tutorial – Vimeo

I’ve been watching a lot of amazing external device demos coming from Momo (There’s a great kinect headtracking demo that I can’t seem to re-locate right now) but heres a tutorial from him explaining how to create custom sprites. That’d be here.

Workshop: Two day introductory/intermediate workshop in TouchDesigner 088

Image courtesy of ab30’s rather wonderful layout comp example from the TouchDesigner forum

Visualesque are excited to announce our first workshop which will be located in central London. This is a two day 12 hour workshop on TouchDesigner with Richard Burns on 12th/13th October 2013. The price for the full event is £160, however if you are a student with proof of ID there is a student discount available. To purchase a ticket you can use the form below, full details are below that. The techniques in the tutorials will all apply to touchdesigner 077 as well as 088 and this workshop will fully support those with 077 licenses.

Note: If the event is sold out then you can register interest by emailing richard@richard-burns.com. Also there is the comments/suggestions section of this post.


A Laptop with TouchDesigner FTE 077/088 and mouse
Knowledge from First things to know about TouchDesigner (Optional)


Day One (6 hours) – Introduction to TouchDesigner 088

– TouchDesigner user interface and an introduction to operators.
– Working with different operator families, generators and filters.
– Practical: A simple project using all operator families to create an audio reactive visual.
– Live controllers, Gamepads, MIDI devices and OSC.
– Practical: An introduction to control panels and their use with live controllers.

Day Two (6 hours)- TouchDesigner 088 Techniques & Workflow

– Tips and techniques for network optimization and layout.
– An introduction to replicators, render picking and importing 3D models.
– An overview of the Animation Component and keyframing techniques.
– Practical: A more complex project using the techniques learned above by creating a simple projection mapping system with show control.

Location, Date and Time: 

Date: 12th-13th October
Time: 10.00am-6.00pm
Room: TBC
Birkbeck University, Malet Street Building
Malet Street

LEAP Motion – There’s elation but here’s the frustration…

A little disclaimer that this is a personal blog post and is in no way suggesting that other people will have the same experience with the device. For all I know I might be using it wrong. I haven’t time travelled with the device yet though.

So we got our hands on a Leap last week. For those who haven’t checked it out yet Leap is a new fangled kinect-style motion sensor that focuses on your hands rather than your full body. It’s a mere $80 to buy and is so small you’d barely notice it sitting on your desk. Most reviews I’ve seen have focused on the leap motion as a consumer, as you can play games and look at the shiny demos however I’m going to focus more on the aspects that are important to the demographic of this blog, what leap is like to develop for.

Firstly my setup. I’ve been using Leap with Derivative’s TouchDesigner and Morphic Creatives Leap OSC (version 0.5) for ease of use. All the data comes in beautifully and within minutes a particle system is flying around the screen courtesy of some wild finger waggling fun. I then decided to put the gestures through their paces and began playing with the swipe functionality which again worked wonderfully and had me up and running in minutes. It really does seem making a point and click Leap App in TouchDesigner is extremely rapid and extremely good fun too…unfortunately the down side comes when one attempts to go a step further.

Pinching is a simple gesture right? Well feeling very cocky with myself after my successful previous demo setups I decided to get stuck into it and make a mechanism which included my thumb moving towards my index finger as a trigger. I took the index finger position and my thumb position and then simply used the distance between those as my tipping point, lo and behold the second my thumb came into contact with my index finger Leap decided that my thumb was in fact an index finger and that humans don’t have thumbs at all. This is where my problem with Leap began to emerge, if it can’t see a finger, even for a split second that finger loses tracking.

So it’s clear my thumb didn’t go off the screen and safe to assume it is now sitting somewhere underneath my index finger so once those checks are added in it’s time to give the app a whirl again. Suddenly now both my thumb and my index finger have both vanished behind the back of my hand, for those of you who know me my hands aren’t very big…and my fingers are pretty spindly. The problem here is that the leap is below my hand, and unless I’m stretching my fingers out to the point where they ache it’s never tracking all of them at once, I actually checked my hand resting positions when using leap and 50% of the time (rough estimate) I was only tracking 2 or 3 fingers. This is fine for somebody who’s well versed in Leap composing however for the public (who I’m developing for) the excuses I was making for the software in my head simply weren’t holding up so I had to find another solution…

I 3D printed a stand for leap to sit in so rather than on the desk below my hand it could sit in front of my hand. This is something I did a lot with kinect however I then began to realise that unless leap is on the desk it’s not going to work. A little annoyed I decided to give up for a while and see if I could find any examples of intelligent gestures in the samples and online, I found none. So tomorrow I’m going to see how much further I can get in this regard. Leap is perfect for simple interactions but the small finger gestures which I was hoping would be integral to the device working unfortunately are more difficult to master than first thought. Perseverance is a great trait though and I shall persevere a while longer.

This article seems quite damning but with leap I must say that I have had more moments of elation than of frustration, for simple touchless interaction it’s pretty fun to use, this is more an illustration of the issues I’ve faced AND if you think you can help me out throw a comment in.

– Richard Burns