BinaryAlpha

BinaryAlpha_SplashPage_v01.jpg

Binary Alpha is a very simple, yet super convenient expression that I use all the time, and decided to turn into a quick gizmo.

It analyzes a choice of the RGB, RGBA, or Alpha input and outputs an Alpha Channel (or RGBA result) that is Binary, 0 or 1.  Any Pixels that are not 0 will be turned into 1 (negative numbers also), and 0 will remain 0.  

This is perfect for those “blur, unpremult, set alpha, blur” for tricks extending colors, or if you need a quick matte for finding any rgb color above or below 0, in a CG render passes for example.

The good ol’ blur/unpremult/blur ❤ :

BinaryAlphaExample_v03_copy_2.gif

Basic properties:

binaryAlphaSettings_jpg.jpg

The literal tcl expression is just:

r!=0 || g!=0 || b!=0 || a! = 0 ? 1 : 0

Which in english, translates to something like: 
“if red is not 0, or green is not 0, or blue is not 0, or alpha is not 0, then be 1, or else, be 0”
So it will include negative pixels as an output as 1 as well.

Super simple but hopefully a time saver if you are like me and hate remembering expressions.

Find the tool on nukepedia here:
http://www.nukepedia.com/gizmos/channel/binaryalpha

You can also download this tool at my github, where you’ll find all my public tools in one place:
https://github.com/CreativeLyons/Lyons_Tools_Public/blob/master/04_Channel/BinaryAlpha.nk

Enjoy

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s