Binary Logic In The Node Tree: Creating Procedural Node Structures

September 20, 2021

What does binary logic have to do with color grading? Colorist Joey D'Anna shows you how to build switches and logic into your Resolve node structure.


Binary Logic: The Basis Of Computing

It’s no secret that I’m a bit of a computer history nerd. The evolution of computing has always fascinated me, which recently had me thinking about the very basics that go into what makes a computer work.

So what do the building blocks of computing have to do with color grading? Well – let’s start at the beginning.

Binary logic describes functions done using inputs and outputs that consist only of true or false (represented by 1 or 0) values.

This is the smallest building block of modern computing. Data is represented entirely in 1s and 0s, and mathematical instructions to that data are done in binary. Inputs are fed into logic gates – which then provide an output based on the content of those inputs.

Simple logic gates are the foundation of computing

Computing devices like CPUs use transistors (small, electronic switches) to make these logic gates, and then combine millions of them into the complex processors we know of today.

Logic On The Resolve Color Page

The power of Resolve’s node based color grading got me thinking – what if I could use nodes on the color page as if they were binary logic gates? How could I use that concept to improve my grading workflow?

The first step is representing binary digits with color nodes. This was easy enough – I just used a solid color of black for 0, and white for 1.

The next step was figuring out how to use these 1 and 0 controls to adjust other nodes. This was also simple – by feeding the white or black color generator into the key input of any node, I could control weather that node was active or not!

From there – I actually went through the tedious task of mapping out all the types of logic gates using blending modes and layer mixers. At their core – most blending modes are simple logical operations done to each pixel in an image. For example, the difference blending mode is essentially an XOR gate, while multiply is an AND gate.

Finally – I put them all together in the most complex node tree I’ve ever built. I assembled a working binary adder circuit right on the Color page. That’s right – I turned a color node tree into a very basic, but functional calculator.

Node tree logic taken to the extreme: A color page binary calculator

From Theory To An Real, Usable Workflow

As fun as playing with logic gates to make the color page do silly things is – I really do think the idea of using logic switches to control a node tree has powerful workflow possibilities. That’s what this Insight is really all about.

In practice this means a node tree which can switch from HDR to SDR at any time. Not only does the output switch, but multiple other trim nodes, highlight nodes, or any other nodes you choose all toggle simultaneously.

Essentially this allows you to grade in HDR and SDR simultaneously, with shot by shot changes for each version always live in a single timeline.

Using shared nodes as switches – nodes can be controlled parametrically with their key inputs

This workflow is based around my Custom ACES node tree. But the concept could be applied to any fixed node structure. The key is to plan out exactly how you want the tree to be controlled. Then build and test it, and keep to that fixed structure.

If you’re head hurts already, don’t worry!  I’ll explain the mechanics and uses of all this in practical way in the video below

As always – leave me any comments or questions below!


Member Content

Sorry... the rest of this content is for members only. You'll need to login or Join Now to continue (we hope you do!).

Need more information about our memberships? Click to learn more.

Membership options
Member Login

Are you using our app? For the best experience, please login using the app's launch screen


Homepage Forums Binary Logic In The Node Tree: Creating Procedural Node Structures

  • Adam H

    Excellent job brother. This is a perfect specification for a node they need to add to Resolve. In Nuke, it’s called “Switch”. Maybe Fusion has a similar node…

  • Joey D’Anna

    Thanks! yea i would love a dedicated switch node because im guessing it would have less processing overhead then what I’m doing with solids/mattes.

    Or expressions on color nodes – now *that* would be fantastic.

  • andi winter

    you are a genius!!!

    luv to try this out!

  • Carey Dissmore

    LOL not because I’m critical…but because I LOVE THE WAY YOU THINK JOEY! Tracked with you all the way and this is really neat.

  • Joey D’Anna

    thank you! when i started talking about this with some other colorists a few of the really nerdy ones understood but most of them thought i was an insane person. honestly it took me a lot of thinking on it to distill it down into something not only really useful – but also not overly complicated (the first tree i built with this had WAY more switches/modes that probably didn’t need to be there)

  • Tony S

    Joey, you are not insane just highly advanced always “thinking outside the box” developing workflows which are light years ahead of others. Both you and I as former online tape to tape editors can truly appreciate “power user” workflows and macros. I urge you to keep up your “outside the box” workflows, techniques, articles and videos as they are invaluable and resourceful for us “nerdy” colourists. You inspire all of us both young and old to venture forth into deep outer colorspaces “where no colourist has gone before.” May you live long and prosper 🙂

  • Pat Inhofer

    @tao-ml-13dfe127c6d40641c7ad9fd60ef8701d:disqus Hear, hear! I think the reason we keep encouraging Joey to do these types of Insights is because it appeals to the Online Editor in us – always looking for the intelligent shortcut but without compromising on the image. Nice call on that.

  • Holy Shit, this is awesome! You’re a madman!

Log in to reply.

1,000+ Tutorials to Explore

Get full access to our entire library of over 1,100+ color tutorials for an entire week!

Start Your Test Drive!