Sharing my .tox Puzzle Matte tool - Cleanly isolate saturated RGB, CMY and White from images or video into separate mattes.

Hi there,

First time sharing (or posting) something on this forum!

This is a tool with 7 switches for RGB, CMY, and White color values, it extracts these from the image or video cleanly and presents a Luma or Alpha matte. If you have a 3D render, rotoscope (or several) ready from Davinci or After effects, possibly multiple objects tracked within the same frame, you can assign it one of these 7 bright colors, and use this tool to continue your VFX pipeline in TouchDesigner. It’s main component is a short GLSL script that has a pretty low CPU/GPU impact, probably could optimize some aspects of it, but then again it’s not intended for live purposes :slight_smile:
If your rotoscope is a bit jaggy or has color bleeding across overlapping fields, there’s some cleanup options and custom parameters include with which you can fiddle around with, to get rid of stray pixels, aliasing.
Side note: I recommend getting the NotchLC codec for your video exports, supports alpha channel in video and does pretty well with scrubbing forwards and backwards.

Perhaps it’s common knowledge but it’s called ‘Puzzle Matte’ because of professional 3D rendering pipeline conventions, so they can target any part of a rendered 3D scene and adjust it to their liking, without re-rendering the entire sequence. They have a lot more colors, use 32bit .EXR’s image sequences and expensive compositing software, I work with limited disc space, 8bit video and a laptop GPU :smiling_face_with_tear:
I made this nifty workflow tool for myself during a project for a short film where I had to anonymise and consequently stylize pretty much everyone and every thing in front of the camera, so there were a lot of rotoscoped shirts, jackets, jeans, shoes, faces, hats, hair, bags, etc. Then processed further in TD where I could retexture every part, with consistency and speed. I personally enjoy TouchDesigner for it’s realtime capabilities and complete customizability whereas setting up similar visuals that I had planned in After Effects would have definitely made for a more sluggish workflow.

Sorry for the wall of text, I yap a lot when I get nervous.
Didn’t see a similar tool like this after briefly searching online, save yourself from messing around in Channel mix and Reorder TOP and download my tool :slight_smile:

Made on TD version 2025.32820

PuzzleMatte.tox (2.6 KB)

Hi @viktormarcpaul

very nice contribution!

One thing I see is that you could skip the Parameter Execute DAT where you are bypassing the Antialias, Blur, and Threshold TOP by rather controlling the `Passes` parameters on the Common page of these operators.

cheers
Markus

1 Like

Thank you Markus!
I had no idea about the passes thing, I learn something new about this software everyday hahaha

1 Like