I‘m currently trying to accomplish the following tasks:
get video input (in my case syphon)
pixelate it via a Resolution TOP (e.g. to 30x20px)
path ‚visual preview‘: make specific pixels black > output in small preview window
path ‚LED stripe‘: convert the 30x20 pixels into a big array of RGB values (while ignoring the in 3. specified pixels) > output to LED stripe
Currently I‘m struggling with 3. “make specific pixels black” and 4. “convert to array”
Reason for my struggles:
No matter what settings I choose for the „TOP to CHOP“ and „CHOP to TOP“ and whatever I place between those 2, I can only make entire rows or columns black but not specific pixels.
I already programmed nearly the entire sequence in Processing, but I read that TouchDesigner is better suited for tasks such as this.
My questions are:
Is Processing ok for such a (in my opinion) simple task even if it would run for a couple of hours? Should I expect stutters/frame drops/crashes? Or should I try to figure it out in TouchDesigner?
If TouchDesigner is better suited for this: How would I can I solve my problems with 3. and 4.?
My Processing file:
My TouchDesigner file:
Cheers
PS: I already asked this question in a reddit-post, hope this is ok…
. I think Processing is perfectly fine for the job. Just get the computer to run the code with the hardware attached an entire day to test it out.
I have used Processing in the past for professional installations for all sort of stuff (live and automated installations) and never had a problem. What you are trying to do doesn’t seem heavy from a computing point of view.
. if you want to use TouchDesigner, there are several ways this could be approached. I have starting working on something to send it to you, it’s unfinished but it gives you an idea of a possible solution. example below, but as I said it’s unfinished (and punk ) and definitely not the only way to approach this but maybe it’ll get you started
I might be missing part of the issue, but if you are using the table as a mask, you could also convert it to a CHOP and then to a TOP - a simple 1 to 1 conversion from DAT to Texture.
What I find interesting:
I had to enter the values in the “Table Dat” flipped:
The top row of the “Table Dat” is in reality the bottom row of the mask and vice versa.
I don’t know why it behaves like this, but that’s not really a problem.
I know you said it doesn’t bother you that the table and the mask are reversed, but I would fix it, as upstream as possible.
The easiest way would be to add a flip TOP at the end, and flip the mask whichever way you need it, but the dat to CHOP will still be reversed.
Try with with a sort DAT after the table DAT, set on reverse output (and tweak the index).
Now the table dat and the mask are identical, but also the Dat to (CHOP) is correct, which might be useful elsewhere.
for the LED set up, drop a DMX out CHOP in your network, right click and click on “operator snippets”. The example “LED tape pixel mapping” is usually the starting point for LED mapping.
thanks. With the Sort in place it now reverses the order correctly: 4_mask.toe (4.5 KB)
As for the LEDs:
I do not yet have the hardware and am right now in the research stage.
Since it’s only a private one time thing, I’m not sure, what the cheapest option is, which is at the same time still kind of reliable. Depending on the matrix resolution I’m using for the LED display (e.g. 40 cols x 25 rows) I will be needing ~1.000 LEDs. They are separated by about 20cm each, which in turn makes it kind of hard to get.
But that is all a question for future me.