Nuke Generation of Flocking

From RMIT Visual Effects
Jump to: navigation, search

This is not true flocking algorithm... but it produces a similar effect. Good for flies, sparks and suchlike.

Nuke generation of flocking fireflies... or something.

Press 'Expand' and select and copy everything below this line, then paste into the Nuke node graph.

set cut_paste_input [stack 0]
version 9.0 v7
push $cut_paste_input
NoOp {
 name fBm_Master
 selected true
 xpos -345
 ypos -1005
 addUserKnob {20 User}
 addUserKnob {26 text01 l "" +STARTLINE T "From the manual: \n   creates a 3D Perlin noise value. This produces a \n   signed range centerd on zero. The absolute \n   maximum range is from -1.0 to 1.0. This produces \n   zero at all integers, so you should rotate the \n   coordinates somewhat (add a fraction of y and z to x, etc.) \n   if you want to use this for random number generation."}
 addUserKnob {26 line01 l "" +STARTLINE}
 addUserKnob {26 text02 l "" +STARTLINE T "Change the values to add a complexity on top of the base \nnoise. Defualt values have no effect. To start, change the \noctaves parameter to a value greater than 2. Check out\nthe tooltips for details of paramaters. \n"}
 addUserKnob {7 octaves t "Determines the nature of \nthe complexity. Needs to be \nan integer greater than 2 in \norder for complexity to be viable" R 0 10}
 octaves 4.3
 addUserKnob {7 lucanacity t "This works in conjunction with octaves.\nNeeds to be a value greater than \n0 in order for complexity to be viable. " R 0 5}
 lucanacity 1.48
 addUserKnob {7 gain t "Adjusts the 'amount' of the \ncomplexty. Needs to be a \nvalue greater than 0 in order \nfor complexity to be viable"}
 gain 0.555
 addUserKnob {26 line02 l "" +STARTLINE}
 addUserKnob {26 text03 l "" +STARTLINE T "Change these values to edit the base noise.\n"}
 addUserKnob {7 yshift l "y shift" t "Shifts in X axis (amount)" R -100 100}
 yshift -55
 addUserKnob {7 xshift l "x shift" t "Shifts in time" R -5 5}
 xshift -2.75
 addUserKnob {7 amplitude t "Embiggens / de-embiggens \nthe noise on the y axis" R 0 500}
 amplitude 460
 addUserKnob {7 frequency t "Makes the noise more / less 'noisy'. " R 0 4}
 frequency 0.1
 addUserKnob {26 line03 l "" +STARTLINE}
 addUserKnob {7 seedx l "seed X" t "The 'seed' from which the X value grows. \nChange to entirly alter the shape of\nthe noise. " R 0 100}
 seedx 37.5
 addUserKnob {7 seedy l "seed Y" t "The 'seed' from which the Y value grows. \nChange to entirly alter the shape of\nthe noise. " R 0 100}
 seedy 31
 addUserKnob {26 line04 l "" +STARTLINE}
 addUserKnob {7 noisevaluex l "noise value X" t "This is the result of the above values.\nDon't try to edit thisvalue  directly. " R 0 100}
 noisevaluex {{"(fBm((frame+(xshift))*frequency, (seedx), 0, octaves, lucanacity, gain)*amplitude)+yshift"}}
 addUserKnob {7 noisevaluey l "noise value Y" t "This is the result of the above values.\nDon't try to edit thisvalue  directly. " R 0 100}
 noisevaluey {{"(fBm((frame+(xshift))*frequency, (seedy), 0, octaves, lucanacity, gain)*amplitude)+yshift"}}
}
NoOp {
 inputs 0
 name fBm_Master1
 selected true
 xpos -357
 ypos -945
 addUserKnob {20 User}
 addUserKnob {26 text01 l "" +STARTLINE T "From the manual: \n   creates a 3D Perlin noise value. This produces a \n   signed range centerd on zero. The absolute \n   maximum range is from -1.0 to 1.0. This produces \n   zero at all integers, so you should rotate the \n   coordinates somewhat (add a fraction of y and z to x, etc.) \n   if you want to use this for random number generation."}
 addUserKnob {26 line01 l "" +STARTLINE}
 addUserKnob {26 text02 l "" +STARTLINE T "Change the values to add a complexity on top of the base \nnoise. Defualt values have no effect. To start, change the \noctaves parameter to a value greater than 2. Check out\nthe tooltips for details of paramaters. \n"}
 addUserKnob {7 octaves t "Determines the nature of \nthe complexity. Needs to be \nan integer greater than 2 in \norder for complexity to be viable" R 0 10}
 octaves 4.3
 addUserKnob {7 lucanacity t "This works in conjunction with octaves.\nNeeds to be a value greater than \n0 in order for complexity to be viable. " R 0 5}
 lucanacity 0.5
 addUserKnob {7 gain t "Adjusts the 'amount' of the \ncomplexty. Needs to be a \nvalue greater than 0 in order \nfor complexity to be viable"}
 gain 0.555
 addUserKnob {26 line02 l "" +STARTLINE}
 addUserKnob {26 text03 l "" +STARTLINE T "Change these values to edit the base noise.\n"}
 addUserKnob {7 yshift l "y shift" t "Shifts in X axis (amount)" R -100 100}
 yshift 0.34
 addUserKnob {7 xshift l "x shift" t "Shifts in time" R -5 5}
 xshift 0.5
 addUserKnob {7 amplitude t "Embiggens / de-embiggens \nthe noise on the y axis" R 0 500}
 amplitude 1.4
 addUserKnob {7 frequency t "Makes the noise more / less 'noisy'. " R 0 4}
 frequency 0.1
 addUserKnob {26 line03 l "" +STARTLINE}
 addUserKnob {7 seedx l "seed X" t "The 'seed' from which the X value grows. \nChange to entirly alter the shape of\nthe noise. " R 0 100}
 seedx 37.5
 addUserKnob {7 seedy l "seed Y" t "The 'seed' from which the Y value grows. \nChange to entirly alter the shape of\nthe noise. " R 0 100}
 seedy 31
 addUserKnob {26 line04 l "" +STARTLINE}
 addUserKnob {7 noisevaluex l "noise value X" t "This is the result of the above values.\nDon't try to edit thisvalue  directly. " R 0 100}
 noisevaluex {{"(fBm((frame+(xshift))*frequency, (seedx), 0, octaves, lucanacity, gain)*amplitude)+yshift"}}
 addUserKnob {7 noisevaluey l "noise value Y" t "This is the result of the above values.\nDon't try to edit thisvalue  directly. " R 0 100}
 noisevaluey {{"(fBm((frame+(xshift))*frequency, (seedy), 0, octaves, lucanacity, gain)*amplitude)+yshift" i}}
}
Reformat {
 inputs 0
 format "1920 1080 0 0 1920 1080 1 HD_1080"
 name Reformat1
 selected true
 xpos -76
 ypos -1050
}
Radial {
 area {1004 588 1060 640}
 name Radial1
 selected true
 xpos -76
 ypos -1010
}
Transform {
 translate {{fBm_Master.noisevaluex} {fBm_Master.noisevaluey}}
 center {1032 620}
 black_outside false
 name Transform1
 selected true
 xpos -76
 ypos -986
}
Multiply {
 value 0
 mix {{fBm_Master1.noisevaluex i}}
 name Multiply1
 selected true
 xpos -76
 ypos -962
}
Blur {
 size 37
 filter triangle
 mix {{1-fBm_Master1.noisevaluex}}
 name Blur1
 selected true
 xpos -76
 ypos -930
}
set N5e4274c0 [stack 0]
push $N5e4274c0
TimeOffset {
 time_offset 40
 time ""
 name TimeOffset1
 selected true
 xpos -142
 ypos -832
}
Transform {
 translate {40 140}
 center {926 354}
 name Transform2
 selected true
 xpos -142
 ypos -808
}
Merge2 {
 inputs 2
 name Merge2
 selected true
 xpos -76
 ypos -752
}
set Na0b15030 [stack 0]
TimeOffset {
 time_offset 80
 time ""
 name TimeOffset2
 selected true
 xpos -138
 ypos -710
}
Transform {
 translate {370 -280}
 center {855 820}
 name Transform3
 selected true
 xpos -138
 ypos -686
}
push $Na0b15030
Merge2 {
 inputs 2
 name Merge3
 selected true
 xpos -76
 ypos -635
}
set N94183450 [stack 0]
TimeOffset {
 time_offset 80
 time ""
 name TimeOffset3
 selected true
 xpos -138
 ypos -589
}
Transform {
 translate {190 8}
 rotate -30.2998085
 center {855 820}
 name Transform4
 selected true
 xpos -138
 ypos -565
}
push $N94183450
Merge2 {
 inputs 2
 name Merge4
 selected true
 xpos -76
 ypos -514
}
set N1d9c4c40 [stack 0]
TimeOffset {
 time_offset 80
 time ""
 name TimeOffset4
 selected true
 xpos -138
 ypos -464
}
Transform {
 translate {-54 62}
 rotate -90
 center {1030 515}
 name Transform5
 selected true
 xpos -138
 ypos -440
}
push $N1d9c4c40
Merge2 {
 inputs 2
 name Merge5
 selected true
 xpos -76
 ypos -390
}
Constant {
 inputs 0
 channels rgb
 format "1920 1080 0 0 1920 1080 1 HD_1080"
 name Constant1
 selected true
 xpos 146
 ypos -517
}
Merge2 {
 inputs 2
 bbox A
 name Merge1
 selected true
 xpos 146
 ypos -390
}
Write {
 name Write1
 selected true
 xpos 146
 ypos -366
}
Viewer {
 frame_range 1-100
 name Viewer1
 selected true
 xpos 146
 ypos -342
}
StickyNote {
 inputs 0
 name StickyNote1
 label "Sorta fireflies... or somthing.\n\nTheir movment, lightness and blur \nis being moderated by a noise expression. "
 selected true
 xpos 72
 ypos -827
}