Programming Nodes, physics, multi-pc display, exe

Hi all, I’m a complete noob to TouchDesigner, but quite fluent with C++, and also various graphics apps like Cinema4D, Shake etc.

I’m trialling TouchDesigner for an upcoming project and so far am very impressed, however I have a couple of questions which I couldn’t find answers to:

  1. Is it possible to create (program) nodes? If so where is the documentation / SDK for this?
  2. Is there any dynamics / physics (e.g. bullet physics) support?
  3. Is there anything built in touchdesigner to have multiple pc’s run in sync and render different tiles for a super high-res output
  4. Is it possible to build to an executable or something? Or a runtime version or something?

hey memo,

you can currently create CUDA TOPs and c++ TOPs and c++ CHOPs. There’s some info on the wiki
derivative.ca/wiki/index.php … a_CUDA_DLL
derivative.ca/wiki/index.php … ry:C%2B%2B
You can also use the shared memory ops to get data to/from custom code. Python support has been announced for the next version.

unfortunately there are no physics yet

some (file management) info to sync multiple computer has recently been posted here
viewtopic.php?f=8&t=2923&p=10285&hilit=sync#p10285
but there’s no tool to give you frame accurate sync over multiple computers. If that is important, you can also go the multi-gpu way using quadro cards. Touch supports gpu_affinity on those, so you can run multiple instances of touch on a single machine, and assign a seperate gpu to each. You “should” be able to run up to 8 instances of touch outputting 16x HD. In theory, most I’ve seen in a single system was 5 GPUs outputting 12x HD . And by using nvidias g-sync board you can make sure the graphic cards are also synced (not sure if you need only 1 g-sync board or 1 per GPU)…

Or you could use nvidias new SLI-Mosaic mode, then you only have to deal with a single instance of touch (watch out for the limitations on the various quadro cards when using mosaic)

You can’t create an exe file, but if you have the pro version, you can save a file as private, then on all client machines, they will just see the controlpanel, but never the internals.

Hey, thanks for the info. Is there a roadmap online somewhere? The frame synchronized multi-pc setup is quite important for me. Multi GPU is obviously quite cool too, but ultimately there is a limit on how scalable it is.

Regarding the private file, would I need a pro license on each of the clients? Or can I run the non-commercial license on the clients as long as I create the file on a PC with a pro license? (I often ask galleries, museums etc. to supply the computers and just provide the software).

Cheers,

Memo.

Hey,
Thanks for your interest. You can open a private saved .toe file in any version of TouchDesigner, you don’t need Pro. You clients should be use FTE Commercial though, not Non-Commercial, to run your files.

there’s no official roadmap. regarding the sync, guess it depends on your projects. You could just send a scripts commands over the network, much like it was shown in the previous link, just instead of loading components, you trigger animations … Or you just send an increasing (per frame) counter from the server and have the clients do their work based on that lookup value … but I guess you’ll always have something of around a 2-3 frames offset on all the machine (network latency, GPU not synced, …). How do you usually sync multiple machines and do you then get frame accurate sync?

Hey, I use a pretty basic client-server setup where only the server has a timer (e.g. set to run at 60fps) and sends a ‘drawframe dt’ command to each client. The clients calculate and draw the frame, and send a ‘frame complete’ message back to the server. When the server receives ‘frame complete’ messages from all clients (or checks against a timeout in case one of the clients lost connection), it waits to advance to the next frame and then sends another ‘drawframe dt’ command. The clients advance by the time specified and repeat the process. Also a few other things to synchronize the random seed on all computers etc. The key is that the clients do not have an automatically running update+draw loop, the client update+draw loop is triggered by the server. This means that almost whatever you do in your update loop (whether it be physics simulations, random numbers, noise etc.), the values stay in sync. (Floats growing out of sync due to inaccuracies accumulating was initially a concern, but I tried this setup with a particle system physics simulation with attractors & springs etc, ran it for days and logged all the values, then did file comparison against the logs and they were all totally in sync!).

You can easily do something similar in Touch actually. At the root of a an empty file look at the /local/time component. This is the default time component that drives playback for all the nodes outside the COMP. The magic node is the CHOP named ‘clock’, and it’s channel named ‘frame’. All the nodes look at the frame channel in the local/time/clock node to drive their cooking.
All the rest of the nodes in this time COMP is just related to the playback controls (pausing, frame range etc.), so you can ignore them.
So what you can do is use something like an OSC In CHOP to bring your frame value in from your server (which can also be a Touch file) and just plug that value into the clock node (make sure the channel is named ‘frame’).

All the files will only update when they get a new frame number.

hello,

i’m struggling to get a reliable sync between two machines and have tried several things suggested here, sending the local/clock/frame over TouchIN/OUT or OSC. OSC is much faster than the TouchIN/OUT TCP btw (about half the latency).

I also tried firing off a ‘reset’ bang from the master to the slaves over OSC and then putting a delay before the output windows of the client machines to compensate for the latency. This method so far seems to be the most reliable way to get frame accurate sync, this seems to work even when the timelines are not synchronized via clock/frame. When i finished setting my parameters via the control panel on the Master i hit the resync button, dial in the delay on the client machines, hit resync once again and everything seems to stay in sync, even on a setup with different machines.

Provided the master/slave machines are running the same hardware (same gpu, same SSD, same cpu) and can maintain the same framerate and cooktimesthe sync shouldn’t drift too much, my only worries are how to keep the system from running out of sync in an unsupervised long term installation and how to make sure the latency is not changing in any of the machines in which case the delay settings would be off and the system be out of sync.

Another method you can try with the more recent builds of TouchDesigner is to use an LTC CHOP and have all machines getting the same SMPTE timecode from some device outputting linear timecode. The machines should stay close to 1-2 frames within each other, but it is not frame-locked as the machines and processes have no sync of when to start/end cooking frames. Just another approach to consider.

Ben, could you please explain this in a bit more detail please?
The thread is a bit old so i should ask, is there still no way to frame sync multiple machines reliably and accurately?

There is now a build in sync, check the sync chops on the wiki