Skip to content

Instantly share code, notes, and snippets.

@draconiansolo
Last active December 17, 2015 03:18
Show Gist options
  • Save draconiansolo/5541755 to your computer and use it in GitHub Desktop.
Save draconiansolo/5541755 to your computer and use it in GitHub Desktop.
Dodgy Normal Relight node for Nuke copypasta
set cut_paste_input [stack 0]
version 6.3 v5
push $cut_paste_input
Expression {
temp_name0 x
temp_expr0 pow(tangent.left.r-r,2)
temp_name1 y
temp_expr1 pow(tangent.left.g-g,2)
temp_name2 z
temp_expr2 pow(tangent.left.b-b,2)
temp_name3 d
temp_expr3 1-sqrt(pow((direction.x/width)-r,2)+pow((direction.y/height)-g,2)+pow((extraZ)-b,2))
expr0 1-sqrt(x+y+z)
expr1 1-sqrt(x+y)
expr2 0
expr3 d
name nMatte15
label "Evil Relight node of doom"
selected true
xpos 3737
ypos -8161
addUserKnob {20 User}
addUserKnob {7 extraZ}
extraZ 0.8
addUserKnob {12 direction}
direction {1128 -108}
addUserKnob {18 tangent}
tangent {0.4624023438 0.005630493164 0.435546875}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment