I’m working on an LED mapping project and I’m attempting to translate pixels in a TOP into values that can be sent out via python. The gist of the technique I’m using is TOP->TOPtoCHOP->Evaluate DAT to look up where each LED should sample from on the texture.
I’ve got the system working, but there seems to be a massive CPU bottleneck in the Evaluate DAT. I have to look up five values (XY coords from a DAT, RGB from the TOPtoCHOP) for each LED each frame. Is this just too heavy for python? Is there a better technique?
If you first use a “remap” top you can get an output TOP that is exactly in the correct order of the pixels you are outputting.
This way you don’t need a top-to-chop for the whole image, just the pixels you need.
And you won’t need to look up the DAT and then the CHOP for your python script. Just loop the chop and know they are in the correct order.
Yeah if you’re using a controller that you can only send data to via python (UDP or serial OUT for example) then you are going to hit some bottlenecks. If this is a teensy with OctoWS2800, then this is well travelled ground and I would recommend looking at GeoPix where there is already code for getting thousands of pixels worth of data to said device over the USB connection.
Otherwise I second Harveymoon’s suggestion and go for something like the advatek that can be controlled by the DMX Out CHOP. I’ve driven tens of thousands of pixels with that method and also making sure to do as much in TOP land as possible before your TOPto CHOP.
That being said, Harveymoon’s method could be even more optimized by using the remap TOP to pre-arrange your pixels into columns of 170 pixels each (every column will become another DMX universe starting at the bottom) and then a single Shuffle CHOP set to “Swap Channels and Samples” would be all you need before the DMX Out CHOP to get a bunch of channels with 510 samples each already arranged in RGB order. Then it’s just a matter of filling out your Routing Table DAT to direct each TouchDesigner multi-sample “channel” to the proper Art-Net or sACN “net, subnet, and universe”.
Driver is still TBD, possibly FadeCandy. Not trying to drive too many- approx 512 at a time. I figured it wouldn’t be too bad, but maybe it’s too much for py.
Thanks for the advice- I’ll let you know how it goes!