Last active
March 25, 2017 17:14
-
-
Save jedypod/b68197f543a966080a31 to your computer and use it in GitHub Desktop.
Breakdown Transition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Group { | |
name BreakdownTransition | |
addUserKnob {20 Breakdown} | |
addUserKnob {4 transition_type l "Transition Type" M {Dissolve Wipe "Depth Wipe"}} | |
transition_type Wipe | |
addUserKnob {3 start_frame l "Start Frame" t "The frame to start the transition on"} | |
start_frame 1001 | |
addUserKnob {22 set_current_frame l Current t "Sets the start frame to the current frame" -STARTLINE T "n = nuke.thisNode()\nn\['start_frame'].setValue(nuke.frame())"} | |
addUserKnob {3 transition_length l "Transition Length"} | |
transition_length 6 | |
addUserKnob {6 rev_wipe l reverse t "reverse direction of wipe\n" -STARTLINE} | |
addUserKnob {6 vertical_wipe t "wipe from top to bottom instead of from left to right." +STARTLINE} | |
addUserKnob {6 manual_wipe t "use manual keyframing to control wipe/dissolve instead. Useful if you need to wipe halfway to reveal something, then wipe back." -STARTLINE} | |
addUserKnob {7 wipe_progression} | |
wipe_progression 0.25 | |
addUserKnob {26 ""} | |
addUserKnob {26 depth_wipe_ctrls_label l "@b; Depth Wipe Ctrls" t " " T " "} | |
addUserKnob {20 depth_wipe_ctrls_grp l "" +STARTLINE n 1} | |
depth_wipe_ctrls_grp 0 | |
addUserKnob {41 from0 l "depth channel" T _Choose_Z_.from0} | |
addUserKnob {6 view_depth_alpha +STARTLINE} | |
addUserKnob {41 normalize_depth l "normalize depth" T DepthSlice.normalize_depth} | |
addUserKnob {41 slice_type l "slice type" T DepthSlice.slice_type} | |
addUserKnob {41 slice_center T DepthSlice.slice_center} | |
addUserKnob {41 slice_width T DepthSlice.slice_width} | |
addUserKnob {41 feather T DepthSlice.feather} | |
addUserKnob {20 endGroup n -1} | |
addUserKnob {26 ""} | |
addUserKnob {26 wipe_ctrls_label l "@b; Wipe Ctrls" t " " T " "} | |
addUserKnob {7 wipe_softness R 0 50} | |
addUserKnob {7 line_width R 0 10} | |
line_width 2 | |
addUserKnob {41 color T _LINE_COLOR_.color} | |
addUserKnob {26 ""} | |
addUserKnob {3 seq_num l "seq num"} | |
seq_num 2 | |
addUserKnob {3 pause_length} | |
pause_length 5 | |
addUserKnob {1 parent_name} | |
parent_name "\[value parent_name].start_frame+(transition_length+pause_length)*seq_num" | |
} | |
Input { | |
inputs 0 | |
name Input2 | |
label "\[value number]" | |
xpos 400 | |
ypos 272 | |
number 1 | |
} | |
Dot { | |
name Dot1 | |
note_font_size 42 | |
note_font_color 0x7f7f7f01 | |
xpos 434 | |
ypos 498 | |
} | |
set N2eb3a950 [stack 0] | |
push $N2eb3a950 | |
Dot { | |
name Dot9 | |
note_font_size 42 | |
note_font_color 0x7f7f7f01 | |
xpos 984 | |
ypos 498 | |
} | |
set N2eb3dbc0 [stack 0] | |
Input { | |
inputs 0 | |
name Input1 | |
label "\[value number]" | |
xpos -370 | |
ypos 272 | |
} | |
Dot { | |
name Dot3 | |
note_font_size 42 | |
note_font_color 0x7f7f7f01 | |
xpos -336 | |
ypos 426 | |
} | |
set N2eb46110 [stack 0] | |
Dot { | |
name Dot4 | |
note_font_size 42 | |
note_font_color 0x7f7f7f01 | |
xpos 104 | |
ypos 426 | |
} | |
set N2eb4a460 [stack 0] | |
Dot { | |
name Dot13 | |
label " " | |
note_font "Helvetica Bold Bold Bold" | |
note_font_size 24 | |
note_font_color 0xff000000 | |
xpos 324 | |
ypos 426 | |
} | |
set N2eb4e760 [stack 0] | |
Dot { | |
name Dot10 | |
note_font_size 42 | |
note_font_color 0x7f7f7f01 | |
xpos 1094 | |
ypos 426 | |
} | |
set N2eb53570 [stack 0] | |
Dot { | |
name Dot8 | |
label "Depth Wipe" | |
note_font_size 42 | |
note_font_color 0x7f7f7f01 | |
xpos 1204 | |
ypos 426 | |
} | |
Dot { | |
name Dot7 | |
note_font_size 42 | |
note_font_color 0x7f7f7f01 | |
xpos 1361 | |
ypos 498 | |
} | |
Copy { | |
inputs 2 | |
to0 rgba.alpha | |
bbox B | |
name _Choose_Z_ | |
xpos 1170 | |
ypos 488 | |
} | |
Dot { | |
name Dot11 | |
note_font_size 42 | |
note_font_color 0x7f7f7f01 | |
xpos 1314 | |
ypos 570 | |
} | |
Dot { | |
name Dot12 | |
note_font_size 42 | |
note_font_color 0x7f7f7f01 | |
xpos 1534 | |
ypos 570 | |
} | |
Grade { | |
channels rgba | |
white 0 | |
add {15000 15000 15000 1} | |
name Grade1 | |
xpos 1500 | |
ypos 638 | |
} | |
push $N2eb3dbc0 | |
Shuffle { | |
in depth | |
name Shuffle4 | |
label "\[value in]" | |
xpos 1170 | |
ypos 560 | |
} | |
Merge2 { | |
inputs 2 | |
operation under | |
bbox B | |
name Merge5 | |
xpos 1170 | |
ypos 638 | |
} | |
Group { | |
name DepthSlice | |
tile_color 0xce8453ff | |
xpos 1170 | |
ypos 758 | |
addUserKnob {20 DepthSlice} | |
addUserKnob {41 from0 l "depth in" t "Choose what channel to use as your Z-Depth source." T CopyDepth.from0} | |
addUserKnob {41 to0 l " slice out" t "Choose what channel to output the depth slice to." -STARTLINE T SliceOut.to0} | |
addUserKnob {7 normalize_depth l "normalize depth" t "Set the white point of your z depth. Useful if you want to normalize the range of your Z-Depth if the values are absolute world units from camera." R 0 30000} | |
normalize_depth 8700 | |
addUserKnob {26 ""} | |
addUserKnob {4 slice_type l "slice type" t "This assumes depth type of 0 at camera with value increasing linearly over depth.\n\nChoose the type of slice: \nSlice: a slice in depth with width and falloff on each side.\nNear: a slice with area closer than center as white + falloff\nFar: a slice with z farther than center as white + falloff " M {slice near far ""}} | |
slice_type near | |
addUserKnob {41 slice_center t "Set the center of your slice. If the value is 0.5, the center of the Z-slice will be at 0.5 in your depth." T CalculateSlice.slice_center} | |
addUserKnob {41 slice_width t "The width of your slice. A value of 0.2 will create a slice width with 0.1 on either side of your slice center." T CalculateSlice.slice_width} | |
addUserKnob {41 feather t "How much feather softening to create on either side of your slice." T CalculateSlice.feather} | |
} | |
Input { | |
inputs 0 | |
name Input | |
xpos -260 | |
ypos 207 | |
} | |
Dot { | |
name Dot3 | |
note_font_size 42 | |
note_font_color 0x7f7f7f01 | |
xpos -226 | |
ypos 329 | |
} | |
set N30028a30 [stack 0] | |
Dot { | |
name Dot1 | |
note_font_size 42 | |
note_font_color 0x7f7f7f01 | |
xpos -446 | |
ypos 329 | |
} | |
set N3002cab0 [stack 0] | |
push $N3002cab0 | |
Copy { | |
inputs 2 | |
from0 rgba.red | |
to0 rgba.alpha | |
bbox B | |
name CopyDepth | |
xpos -480 | |
ypos 347 | |
} | |
Grade { | |
channels alpha | |
whitepoint {{parent.normalize_depth}} | |
name NormalizeDepth | |
xpos -480 | |
ypos 404 | |
} | |
Expression { | |
temp_name0 fea | |
temp_expr0 "feather == 0 ? 0.0001 : feather" | |
temp_name1 far | |
temp_expr1 "clamp(1-(1-(clamp(a*1/slice_center + slice_width/2) ))*1/fea)" | |
temp_name2 near | |
temp_expr2 clamp(1-(1-clamp((-a*1/slice_center+2)+slice_width/2))*1/fea) | |
expr0 "near == 1 ? far : near" | |
expr1 near | |
expr2 far | |
channel3 none | |
name CalculateSlice | |
xpos -480 | |
ypos 471 | |
addUserKnob {20 User} | |
addUserKnob {7 slice_center t "The Center to take the depth slice from" R 0 3} | |
slice_center {{curve x1165 0 s0 x1175 1.46 x1179 1}} | |
addUserKnob {7 slice_width t "The slice width - falloff is extra"} | |
addUserKnob {7 feather t "The amount of falloff"} | |
feather 0.085 | |
} | |
set N30048570 [stack 0] | |
Shuffle { | |
red blue | |
green blue | |
alpha blue | |
name FAR | |
tile_color 0xff00 | |
xpos -370 | |
ypos 519 | |
} | |
push $N30048570 | |
Shuffle { | |
red green | |
blue green | |
alpha green | |
name NEAR | |
tile_color 0xff0000 | |
xpos -480 | |
ypos 519 | |
} | |
push $N30048570 | |
Shuffle { | |
green red | |
blue red | |
alpha red | |
name SLICE | |
tile_color 0xff0000ff | |
xpos -590 | |
ypos 519 | |
} | |
Switch { | |
inputs 3 | |
which {{parent.slice_type}} | |
name Choose_Type | |
xpos -480 | |
ypos 591 | |
} | |
push $N30028a30 | |
Copy { | |
inputs 2 | |
from0 rgba.red | |
to0 rgba.alpha | |
bbox B | |
name SliceOut | |
selected true | |
xpos -260 | |
ypos 587 | |
} | |
Output { | |
name Output1 | |
xpos -260 | |
ypos 735 | |
} | |
end_group | |
Shuffle { | |
red alpha | |
green alpha | |
blue alpha | |
name Shuffle3 | |
label "\[value in]" | |
xpos 1170 | |
ypos 824 | |
} | |
set N300942b0 [stack 0] | |
push $N300942b0 | |
push $N2eb53570 | |
push $N2eb3dbc0 | |
Keymix { | |
inputs 3 | |
channels rgba | |
invertMask true | |
bbox B | |
name Keymix1 | |
xpos 950 | |
ypos 830 | |
} | |
Switch { | |
inputs 2 | |
which {{parent.view_depth_alpha}} | |
name Switch4 | |
xpos 1170 | |
ypos 926 | |
} | |
Dissolve { | |
inputs 2 | |
which {{parent.DepthSlice.CalculateSlice.slice_center}} | |
name Dissolve1 | |
xpos 1170 | |
ypos 1016 | |
} | |
Dot { | |
name Dot6 | |
note_font_size 42 | |
note_font_color 0x7f7f7f01 | |
xpos 1204 | |
ypos 1410 | |
} | |
push $N2eb4a460 | |
Shuffle { | |
alpha white | |
name Shuffle1 | |
label "\[value in]" | |
xpos 70 | |
ypos 573 | |
} | |
set N30833ae0 [stack 0] | |
Dot { | |
name Dot19 | |
label " " | |
note_font "Helvetica Bold Bold Bold" | |
note_font_size 24 | |
note_font_color 0xff000000 | |
xpos 324 | |
ypos 594 | |
} | |
Dot { | |
name Dot17 | |
label Vertical | |
note_font "Helvetica Bold Bold Bold Bold" | |
note_font_size 24 | |
note_font_color 0xff000000 | |
xpos 324 | |
ypos 642 | |
} | |
set N2b6dbdf0 [stack 0] | |
Dot { | |
name Dot18 | |
label " " | |
note_font "Helvetica Bold Bold Bold Bold" | |
note_font_size 24 | |
note_font_color 0xff000000 | |
xpos 214 | |
ypos 642 | |
} | |
Rectangle { | |
output alpha | |
replace true | |
area {0 {0+height*trans_prog+.000001+parent.line_width} {width} {height}} | |
name _WIPE_2 | |
xpos 180 | |
ypos 704 | |
addUserKnob {20 User} | |
addUserKnob {7 trans_prog} | |
trans_prog {{"parent.manual_wipe ? parent.wipe_progression : parent.rev_wipe ? 1 - clamp((t-parent.start_frame)/transition_length) : clamp((t-parent.start_frame)/transition_length)"}} | |
} | |
push $N2b6dbdf0 | |
Rectangle { | |
output alpha | |
replace true | |
area {0 {0+height*trans_prog+.000001} {width} {height}} | |
name _WIPE_3 | |
xpos 290 | |
ypos 704 | |
addUserKnob {20 User} | |
addUserKnob {7 trans_prog} | |
trans_prog {{"parent.manual_wipe ? parent.wipe_progression : parent.rev_wipe ? 1 - clamp((t-parent.start_frame)/transition_length) : clamp((t-parent.start_frame)/transition_length)"}} | |
} | |
set N30851ba0 [stack 0] | |
Merge2 { | |
inputs 2 | |
operation stencil | |
bbox B | |
name Merge6 | |
xpos 180 | |
ypos 758 | |
} | |
push $N30833ae0 | |
Dot { | |
name Dot15 | |
label Horizontal | |
note_font "Helvetica Bold Bold Bold" | |
note_font_size 24 | |
note_font_color 0xff000000 | |
xpos 104 | |
ypos 642 | |
} | |
set N3086bdc0 [stack 0] | |
Dot { | |
name Dot16 | |
label " " | |
note_font "Helvetica Bold Bold Bold" | |
note_font_size 24 | |
note_font_color 0xff000000 | |
xpos -6 | |
ypos 642 | |
} | |
Rectangle { | |
output alpha | |
replace true | |
area {{0+width*trans_prog+.000001+parent.line_width i} 0 {width i} {height i}} | |
name _WIPE_1 | |
xpos -40 | |
ypos 704 | |
addUserKnob {20 User} | |
addUserKnob {7 trans_prog} | |
trans_prog {{"parent.manual_wipe ? parent.wipe_progression : parent.rev_wipe ? 1 - clamp((t-parent.start_frame)/transition_length) : clamp((t-parent.start_frame)/transition_length)" i}} | |
} | |
push $N3086bdc0 | |
Rectangle { | |
output alpha | |
replace true | |
area {{0+width*trans_prog+.000001} 0 {width} {height}} | |
name _WIPE_ | |
xpos 70 | |
ypos 704 | |
addUserKnob {20 User} | |
addUserKnob {7 trans_prog} | |
trans_prog {{"parent.manual_wipe ? parent.wipe_progression : parent.rev_wipe ? 1 - clamp((t-parent.start_frame)/transition_length) : clamp((t-parent.start_frame)/transition_length)"}} | |
} | |
set N2b6e3a20 [stack 0] | |
Merge2 { | |
inputs 2 | |
operation stencil | |
bbox B | |
name Merge2 | |
xpos -40 | |
ypos 758 | |
} | |
Switch { | |
inputs 2 | |
which {{parent.vertical_wipe}} | |
name vertical_switcher | |
xpos -40 | |
ypos 830 | |
} | |
Constant { | |
inputs 0 | |
color {1 1 1 0.4} | |
name _LINE_COLOR_ | |
xpos -150 | |
ypos 663 | |
} | |
Shuffle { | |
alpha white | |
name Shuffle2 | |
label "\[value in]" | |
xpos -150 | |
ypos 776 | |
} | |
Merge2 { | |
inputs 2 | |
operation mask | |
bbox B | |
name Merge3 | |
xpos -150 | |
ypos 902 | |
} | |
Dot { | |
name Dot14 | |
label " " | |
note_font "Helvetica Bold Bold Bold" | |
note_font_size 24 | |
note_font_color 0xff000000 | |
xpos -116 | |
ypos 1026 | |
} | |
push $N30851ba0 | |
Dot { | |
name Dot20 | |
label " " | |
note_font "Helvetica Bold Bold Bold" | |
note_font_size 24 | |
note_font_color 0xff000000 | |
xpos 324 | |
ypos 834 | |
} | |
push $N2b6e3a20 | |
Switch { | |
inputs 2 | |
which {{parent.vertical_wipe}} | |
name vertical_switcher1 | |
xpos 70 | |
ypos 830 | |
} | |
Blur { | |
channels alpha | |
size {{parent.wipe_softness} 0} | |
name Blur1 | |
xpos 70 | |
ypos 896 | |
} | |
Premult { | |
name Premult1 | |
xpos 70 | |
ypos 950 | |
} | |
Merge2 { | |
inputs 2 | |
bbox B | |
name Merge4 | |
xpos 70 | |
ypos 1022 | |
disable {{"parent.line_width == 0 ? 1 : 0"}} | |
} | |
push $N2eb3a950 | |
Merge2 { | |
inputs 2 | |
bbox B | |
name Merge1 | |
xpos 290 | |
ypos 1022 | |
} | |
push $N2eb3a950 | |
push $N2eb4e760 | |
Switch { | |
inputs 3 | |
which {{"_WIPE_.trans_prog == 0 ? 0 : ( _WIPE_.trans_prog == 1 ? 1 : 2)"}} | |
name Switch2 | |
selected true | |
xpos 400 | |
ypos 1022 | |
} | |
push $N2eb3a950 | |
Dot { | |
name Dot2 | |
note_font_size 42 | |
note_font_color 0x7f7f7f01 | |
xpos -116 | |
ypos 498 | |
} | |
set N308bfbf0 [stack 0] | |
push $N308bfbf0 | |
push $N2eb46110 | |
Dissolve { | |
inputs 2 | |
which {{"parent.manual_wipe ? parent.wipe_progression : smoothstep(start, start+dt, t)"}} | |
name breakdown1 | |
label Smooth | |
xpos -480 | |
ypos 563 | |
addUserKnob {20 User} | |
addUserKnob {3 start l "Start Frame"} | |
start {{parent.start_frame i}} | |
addUserKnob {7 dt l "Dissolve Time" R 0 20} | |
dt {{parent.transition_length i}} | |
} | |
Switch { | |
inputs 2 | |
which {{"_WIPE_.trans_prog < 1 ? 0 : 1"}} | |
name Switch3 | |
xpos -370 | |
ypos 686 | |
} | |
Dot { | |
name Dot5 | |
note_font_size 42 | |
note_font_color 0x7f7f7f01 | |
xpos -336 | |
ypos 906 | |
} | |
Switch { | |
inputs 3 | |
which {{parent.transition_type}} | |
name Switch1 | |
xpos -370 | |
ypos 1406 | |
} | |
Output { | |
name Output1 | |
xpos -370 | |
ypos 1574 | |
} | |
push $N308bfbf0 | |
push $N2eb46110 | |
Dissolve { | |
inputs 2 | |
which {{"parent.manual_wipe ? parent.wipe_progression : clamp((t-start)/dt)"}} | |
name breakdown | |
label " Linear" | |
xpos -370 | |
ypos 563 | |
addUserKnob {20 User} | |
addUserKnob {3 start l "Start Frame"} | |
start {{parent.start_frame}} | |
addUserKnob {7 dt l "Dissolve Time" R 0 20} | |
dt {{parent.transition_length}} | |
} | |
StickyNote { | |
inputs 0 | |
name StickyNote1 | |
tile_color 0x40454aff | |
label "If you want the math then you can do smoothstep like this: 0.5 - 0.5 * cos( value * pi ) or Gaussian: ( 1- exp( -4 * pow(value,2)) ) * 1.018657" | |
note_font_size 8 | |
xpos -798 | |
ypos 519 | |
} | |
end_group |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment