## How Can We Help?

# Mathematical Functions in Nuke Cheat Sheet

Adding Mathematical Functions to Expressions in Nuke

atop = AB+B(1-A)

average = (A+B)/2)

color-burn = Darken B towards A

color-dodge = brighten B towards A

conjoint-over = A+B(1-a/b), A if a>b

copy = A

difference = abs(A-B)

disjoint-over = A+B(1-a)/b, A+B if a+b<1

divide = A/B, 0 if A<0 and B<0

exclusion = A+B-2AB

from = B-A

geometric = 2AB/(A+B)

hard-light = multiply if A<0.5, screen if A>0.5

hypot = sqrt (A*A+B*B)

in = Ab

mask = Ba

matte = Aa+B(1-a)

max = max (A,B)

min = min (A,B)

minus = A-B

multiply = AB, A if A<0 and B<0

out = A(1-b)

over = A+B(1-a)

overlay = multiply if B<0.5, screen if B>0.5

plus = A+B

screen = A or B ≤1? A+B-AB: max(A,B)

soft-light = Image B gets lit up.

stencil = B(1-a)

under = A(1-b)+B

xor = A(1-b)+B(1-a)

http://help.thefoundry.co.uk/nuke/content/comp_environment/expressions/adding_math_functions.html