Do Math in Nuke Knobs

Did you know you can do simple math directly inside almost any nuke knob? That right! All you need to do is use mathematical operators like + - * / or even ()

Time to brush up on your BEDMAS


“Let’s try half as much… no twice as much!”

Next time they ask something like this, try doing it via division, or multiplication. Just be sure to check the result after, art is subjective after all!

“Split the Diff”

How many times have you heard this? The split (median number) between two known values can be calculated easily by adding them together, then dividing the result by 2

I.E to find the value between 67.5 and 33.75, you can use this formula ( 67.5 + 33.75 ) / 2 = 50.625

This can be done in two steps, as the gif below shows

or as a single step with brackets around the addition portion of the equation, as shown here

Working with Percentages

Let’s say your notes are a little more specific, and your asked for 66% more of something. This can be done by converting the percentage to a decimal, and multiplying the original value against it

I.E to find what 66% of 50 is, and add that to the base value, you can use this formula 50 + 50 * 0.66 = 83 This finds out that 66% of 50 is 33, and then adds that value back to 50 for the result of 83

If they want 66% less, all you need to do is swap the addition to subtraction, and BEDMAS will take care of the rest!

And to find what 10% of 50 is, you can use this formula 50 * 0.1 = 5

Merging Values

Let’s say you have two of the same node, and you want to remove the redundancy. You can use some basic addition to combine them into one node

*Note* Not all knobs types can be added together to get the same result as having two nodes with different values. I don’t have an exhaustive list atm, but keep in mind that gamma knobs need to be multiplied together, and gain and lift knobs have an unseen relationship. So always make sure to double check your results are visually the same before deleting the redundant node(s)

The Order of Things

It may have been a while since you’ve heard about BEDMAS or PEDMAS, but it will help greatly if you brush up on this order of operations that math equations follow. For example If you want to work quickly, I find that skipping the brackets, and just doing the math in the correct order is faster, and easier than doing it with brackets (Parentheses) because holding the shift key is one extra step, and Nuke’s knob fields are two small to view most full equations anyways

Previous
Previous

Rename Your Viewer Nodes

Next
Next

How to Make a Camera Fast