Difference between revisions of "Nuke Gizmos"

From Antoine Vienne | Wiki
Jump to navigation Jump to search
(Push pixel)
Line 1: Line 1:
 
=Nuke Custom Gizmos=
 
=Nuke Custom Gizmos=
 +
=== Normal Relight ===
 +
<pre>
 +
//Custom adaptation from "V-Ray Relight" Gizmo.
 +
//Choose the channel of your Normal pass in "NameNormal".
 +
 +
Root {
 +
inputs 0
 +
frame 11
 +
last_frame 16
 +
lock_range true
 +
format "2048 2048 0 0 2048 2048 1 square_2K"
 +
proxy_type scale
 +
proxy_format "1024 778 0 0 1024 778 1 1K_Super_35(full-ap)"
 +
colorManagement Nuke
 +
workingSpaceLUT linear
 +
monitorLut sRGB
 +
int8Lut sRGB
 +
int16Lut sRGB
 +
logLut Cineon
 +
floatLut linear
 +
}
 +
add_layer {ShN ShN.red ShN.green ShN.blue ShN.alpha}
 +
Group {
 +
inputs 0
 +
name Normal_Relight
 +
selected true
 +
xpos 840
 +
ypos 86
 +
addUserKnob {20 settings}
 +
addUserKnob {41 longitude T Constant1.longitude}
 +
addUserKnob {41 latitude T Constant1.latitude}
 +
addUserKnob {6 postmult l post-multiply +STARTLINE}
 +
postmult true
 +
addUserKnob {20 NameNormal}
 +
addUserKnob {41 in l "in 1" T Shuffle8.in}
 +
}
 +
Constant {
 +
  inputs 0
 +
  channels rgb
 +
  color {{sin(radians(longitude))*cos(radians(latitude))} {sin(radians(latitude))} {cos(radians(longitude))*cos(radians(latitude))} 0}
 +
  format "256 256 0 0 256 256 1 square_256"
 +
  name Constant1
 +
  xpos 180
 +
  ypos -105
 +
  addUserKnob {20 User}
 +
  addUserKnob {7 longitude R -180 180}
 +
  longitude 82
 +
  addUserKnob {7 latitude R -90 90}
 +
  latitude 44.5
 +
}
 +
set N5ac82000 [stack 0]
 +
Input {
 +
  inputs 0
 +
  name Input1
 +
  xpos -36
 +
  ypos -202
 +
}
 +
add_layer {VRay_Normals VRay_Normals.X VRay_Normals.Y VRay_Normals.Z}
 +
Shuffle {
 +
  in ShN
 +
  out VRay_Normals
 +
  name Shuffle8
 +
  xpos -36
 +
  ypos -154
 +
}
 +
Expression {
 +
  channel0 {none none none VRay_Normals.Z}
 +
  expr0 VRay_Normals.Z-(1-a)
 +
  channel1 none
 +
  channel2 none
 +
  channel3 none
 +
  name Expression1
 +
  xpos -36
 +
  ypos -118
 +
}
 +
Unpremult {
 +
  channels VRay_Normals
 +
  name Unpremult1
 +
  xpos -36
 +
  ypos -71
 +
}
 +
MergeExpression {
 +
  inputs 2
 +
  expr0 Ar*BVRay_Normals.X
 +
  expr1 Ag*BVRay_Normals.Y
 +
  expr2 Ab*BVRay_Normals.Z
 +
  channel3 none
 +
  name MergeExpression1
 +
  xpos 21
 +
  ypos 2
 +
}
 +
Expression {
 +
  channel0 rgb
 +
  expr0 r+b+g
 +
  channel1 none
 +
  channel2 none
 +
  channel3 none
 +
  name Expression2
 +
  xpos 21
 +
  ypos 54
 +
}
 +
Premult {
 +
  name Premult1
 +
  xpos 21
 +
  ypos 111
 +
  disable {{1-parent.postmult}}
 +
}
 +
set Na4942380 [stack 0]
 +
Output {
 +
  name Output1
 +
  xpos 21
 +
  ypos 172
 +
}
 +
push $N5ac82000
 +
push 0
 +
push 0
 +
push 0
 +
push 0
 +
push 0
 +
push 0
 +
push 0
 +
push 0
 +
push $Na4942380
 +
Viewer {
 +
  inputs 10
 +
  frame_range 1-16
 +
  name Viewer1
 +
  selected true
 +
  xpos 233
 +
  ypos 152
 +
}
 +
end_group
 +
 +
</pre>
 +
 
=== Push pixel ===
 
=== Push pixel ===
 
<pre>
 
<pre>

Revision as of 00:18, 8 June 2019

Nuke Custom Gizmos

Normal Relight

//Custom adaptation from "V-Ray Relight" Gizmo.
//Choose the channel of your Normal pass in "NameNormal".

Root {
 inputs 0
 frame 11
 last_frame 16
 lock_range true
 format "2048 2048 0 0 2048 2048 1 square_2K"
 proxy_type scale
 proxy_format "1024 778 0 0 1024 778 1 1K_Super_35(full-ap)"
 colorManagement Nuke
 workingSpaceLUT linear
 monitorLut sRGB
 int8Lut sRGB
 int16Lut sRGB
 logLut Cineon
 floatLut linear
}
add_layer {ShN ShN.red ShN.green ShN.blue ShN.alpha}
Group {
 inputs 0
 name Normal_Relight
 selected true
 xpos 840
 ypos 86
 addUserKnob {20 settings}
 addUserKnob {41 longitude T Constant1.longitude}
 addUserKnob {41 latitude T Constant1.latitude}
 addUserKnob {6 postmult l post-multiply +STARTLINE}
 postmult true
 addUserKnob {20 NameNormal}
 addUserKnob {41 in l "in 1" T Shuffle8.in}
}
 Constant {
  inputs 0
  channels rgb
  color {{sin(radians(longitude))*cos(radians(latitude))} {sin(radians(latitude))} {cos(radians(longitude))*cos(radians(latitude))} 0}
  format "256 256 0 0 256 256 1 square_256"
  name Constant1
  xpos 180
  ypos -105
  addUserKnob {20 User}
  addUserKnob {7 longitude R -180 180}
  longitude 82
  addUserKnob {7 latitude R -90 90}
  latitude 44.5
 }
set N5ac82000 [stack 0]
 Input {
  inputs 0
  name Input1
  xpos -36
  ypos -202
 }
add_layer {VRay_Normals VRay_Normals.X VRay_Normals.Y VRay_Normals.Z}
 Shuffle {
  in ShN
  out VRay_Normals
  name Shuffle8
  xpos -36
  ypos -154
 }
 Expression {
  channel0 {none none none VRay_Normals.Z}
  expr0 VRay_Normals.Z-(1-a)
  channel1 none
  channel2 none
  channel3 none
  name Expression1
  xpos -36
  ypos -118
 }
 Unpremult {
  channels VRay_Normals
  name Unpremult1
  xpos -36
  ypos -71
 }
 MergeExpression {
  inputs 2
  expr0 Ar*BVRay_Normals.X
  expr1 Ag*BVRay_Normals.Y
  expr2 Ab*BVRay_Normals.Z
  channel3 none
  name MergeExpression1
  xpos 21
  ypos 2
 }
 Expression {
  channel0 rgb
  expr0 r+b+g
  channel1 none
  channel2 none
  channel3 none
  name Expression2
  xpos 21
  ypos 54
 }
 Premult {
  name Premult1
  xpos 21
  ypos 111
  disable {{1-parent.postmult}}
 }
set Na4942380 [stack 0]
 Output {
  name Output1
  xpos 21
  ypos 172
 }
push $N5ac82000
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push $Na4942380
 Viewer {
  inputs 10
  frame_range 1-16
  name Viewer1
  selected true
  xpos 233
  ypos 152
 }
end_group

Push pixel

//Don't know the source of this custom Push pixel

set cut_paste_input [stack 0]
version 10.5 v7
push $cut_paste_input
Unpremult {
 name Unpremult4
 selected true
 xpos 180
 ypos 3374
}
Grade {
 channels alpha
 blackpoint 0.99
 name Grade15
 selected true
 xpos 180
 ypos 3416
}
Premult {
 name Premult1
 selected true
 xpos 180
 ypos 3470
}
EdgeBlur {
 size 1
 name EdgeBlur2
 selected true
 xpos 180
 ypos 3536
}
Unpremult {
 name Unpremult11
 selected true
 xpos 180
 ypos 3590
}
Expression {
 channel3 alpha
 expr3 "r == 0 ? 0 : 1"
 name Expression7
 selected true
 xpos 180
 ypos 3638
}
EdgeBlur {
 size 2
 name EdgeBlur3
 selected true
 xpos 180
 ypos 3704
}
Unpremult {
 name Unpremult12
 selected true
 xpos 180
 ypos 3758
}
Expression {
 channel3 alpha
 expr3 "r == 0 ? 0 : 1"
 name Expression8
 selected true
 xpos 180
 ypos 3806
}
EdgeBlur {
 size 4
 name EdgeBlur4
 selected true
 xpos 180
 ypos 3872
}
Unpremult {
 name Unpremult14
 selected true
 xpos 180
 ypos 3926
}
Expression {
 channel3 alpha
 expr3 "r == 0 ? 0 : 1"
 name Expression9
 selected true
 xpos 180
 ypos 3974
}
EdgeBlur {
 size 8
 name EdgeBlur12
 selected true
 xpos 180
 ypos 4040
}
Unpremult {
 name Unpremult15
 selected true
 xpos 180
 ypos 4094
}
Expression {
 channel3 alpha
 expr3 "r == 0 ? 0 : 1"
 name Expression10
 selected true
 xpos 180
 ypos 4142
}
EdgeBlur {
 size 16
 name EdgeBlur13
 selected true
 xpos 180
 ypos 4208
}
Unpremult {
 name Unpremult16
 selected true
 xpos 180
 ypos 4262
}
Expression {
 channel3 alpha
 expr3 "r == 0 ? 0 : 1"
 name Expression11
 selected true
 xpos 180
 ypos 4310
}