Nuke Generation of Candle Flame

From RMIT Visual Effects
Jump to: navigation, search

A fairly effective script that generates a candle flame. A Noise node is used as the basis for the variance. To add wobble to the flame an IDistort node is used. The movement that this generates is based on a noise that was moved into the motion channel using a ShuffleCopy. The candle has also been (somewhat crudely) generated using a Rectangle node.

Nuke generation of a candle flame.

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
BackdropNode {
 inputs 0
 name "CANDLE GENERATION"
 tile_color 0x87854701
 gl_color 0x87854701
 label "CANDLE GENERATION"
 note_font "Arial Black"
 note_font_size 20
 selected true
 xpos 5033
 ypos -3928
 bdwidth 313
 bdheight 297
}
BackdropNode {
 inputs 0
 name "FLAME WOBBLE"
 tile_color 0x87854701
 gl_color 0x87854701
 label "FLAME WOBBLE"
 note_font "Arial Black"
 note_font_size 20
 selected true
 xpos 4356
 ypos -4192
 bdwidth 337
 bdheight 193
}
BackdropNode {
 inputs 0
 name FLAME_MASK_AND_COLOR_CORRECT
 tile_color 0x87854701
 gl_color 0x87854701
 label "FLAME MASK AND COLOR CORRECT"
 note_font "Arial Black"
 note_font_size 20
 selected true
 xpos 4350
 ypos -4894
 bdwidth 343
 bdheight 190
}
BackdropNode {
 inputs 0
 name GLOW_ADDED
 tile_color 0x87854701
 gl_color 0x87854701
 label "GLOW ADDED"
 note_font "Arial Black"
 note_font_size 20
 selected true
 xpos 4349
 ypos -3615
 bdwidth 300
 bdheight 159
}
BackdropNode {
 inputs 0
 name "LIGHTEN CANDLE TOP"
 tile_color 0x87854701
 gl_color 0x87854701
 label "LIGHTEN CANDLE TOP"
 note_font "Arial Black"
 note_font_size 20
 selected true
 xpos 4661
 ypos -3910
 bdwidth 200
 bdheight 157
}
BackdropNode {
 inputs 0
 name "MANY FLAMES OVERLAY"
 tile_color 0x87854701
 gl_color 0x87854701
 label "MANY FLAMES OVERLAY"
 note_font "Arial Black"
 note_font_size 20
 selected true
 xpos 4440
 ypos -4641
 bdwidth 261
 bdheight 310
}
BackdropNode {
 inputs 0
 name "NOISE GENERATION"
 tile_color 0x87854701
 gl_color 0x87854701
 label "NOISE GENERATION"
 note_font "Arial Black"
 note_font_size 20
 selected true
 xpos 4493
 ypos -5246
 bdwidth 200
 bdheight 239
}
StickyNote {
 inputs 0
 name StickyNote11
 label "Makes a rapidly changing noise."
 selected true
 xpos 4503
 ypos -5273
}
StickyNote {
 inputs 0
 name StickyNote13
 label "Lays many flames on top of each other using time offset."
 selected true
 xpos 4476
 ypos -4671
}
StickyNote {
 inputs 0
 name StickyNote14
 label "Using another naimated noise, a wobble is addedd to the flame.\nFirst, the animated noise is added to the flame's motion channel.\nThen the motion is added using an IDistort. "
 selected true
 xpos 4407
 ypos -4242
}
StickyNote {
 inputs 0
 name StickyNote15
 label "The flame is used to add lightness variance to the candle tiop. "
 selected true
 xpos 4691
 ypos -3938
}
StickyNote {
 inputs 0
 name StickyNote12
 label "Makes the candle flame shape, and forces it to \nbe yellow to arange"
 selected true
 xpos 4465
 ypos -4948
}
Reformat {
 inputs 0
 format "1920 1080 0 0 1920 1080 1 HD_1080"
 name Reformat6
 selected true
 xpos 4387
 ypos -3552
}
Radial {
 area {822 644.75 1182 903.25}
 name Radial11
 selected true
 xpos 4387
 ypos -3520
}
Reformat {
 inputs 0
 format "256 256 0 0 256 256 1 square_256"
 name Reformat4
 selected true
 xpos 4376
 ypos -4101
}
Noise {
 size 400
 zoffset {{frame/20}}
 octaves 3
 center {1024 778}
 name Noise2
 selected true
 xpos 4376
 ypos -4069
}
Reformat {
 inputs 0
 format "256 256 0 0 256 256 1 square_256"
 name Reformat3
 selected true
 xpos 4370
 ypos -4822
}
Roto {
 curves {{{v x3f99999a}
  {f 0}
  {n
   {layer Root
    {f 2097664}
    {t x44800000 x44428000}
    {a pt1x 0 pt1y 0 pt2x 0 pt2y 0 pt3x 0 pt3y 0 pt4x 0 pt4y 0 ptex00 0 ptex01 0 ptex02 0 ptex03 0 ptex10 0 ptex11 0 ptex12 0 ptex13 0 ptex20 0 ptex21 0 ptex22 0 ptex23 0 ptex30 0 ptex31 0 ptex32 0 ptex33 0 ptof1x 0 ptof1y 0 ptof2x 0 ptof2y 0 ptof3x 0 ptof3y 0 ptof4x 0 ptof4y 0 pterr 0 ptrefset 0 ptmot x40800000 ptref 0}
    {curvegroup Bezier1 512 bezier
     {{cc
       {f 8192}
       {p
        {x41683550 x40400000}
        {x42fa7ef0 x43626664}
        {xc1683530 xc0400000}
        {x40a18940 x421c0002}
        {x42b31d30 x42a8cccc}
        {xc0a18930 xc21c0000}
        {xc1cc6dac xb81c0000}
        {x4302b5c0 x41c80008}
        {x41683560 xb7800000}
        {x4023f580 xc1da1478}
        {x4329306d x42a0cccd}
        {xc0850660 x4230ef16}}}
      {cc
       {f 8192}
       {p
        {x40a27a40 xbf00be00}
        {x4049eb80 xc32c0002}
        {xc1218900 x3f7ffe00}
        {x3ff24c80 x41500014}
        {x41d91068 xc19ffffa}
        {xbfe0a340 xc140d75c}
        {xc1cc6d9c xb7c00000}
        {xbf6f2700 x41742e88}
        {x41683570 xb7800000}
        {x403bd580 xc1608308}
        {xc1e16640 xc14f7cf0}
        {xbf8ba680 x40a6eaf0}}}}
     {t x42f3999a x42e00000}
     {a ft 1 osw x41200000 osf 0 str 1 spx x44800000 spy x44428000 sb 1 ltn x44038000 ltm x44038000 tt x40800000}}}}}}
 toolbox {selectAll {
  { selectAll str 1 ssx 1 ssy 1 sf 1 }
  { createBezier str 1 ssx 1 ssy 1 sf 1 sb 1 tt 4 }
  { createBezierCusped str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createBSpline str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createEllipse str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createRectangle str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createRectangleCusped str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { brush str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { eraser src 2 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { clone src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { reveal src 3 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { dodge src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { burn src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { blur src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { sharpen src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { smear src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
} }
 toolbar_brush_hardness 0.200000003
 toolbar_source_transform_scale {1 1}
 toolbar_source_transform_center {1024 778}
 colorOverlay {0 0 0 0}
 lifetime_type "all frames"
 lifetime_start 526
 lifetime_end 526
 motionblur_shutter_offset_type centred
 feather_type smooth0
 source_black_outside true
 name Roto1
 selected true
 xpos 4370
 ypos -4790
}
Reformat {
 inputs 0
 format "256 256 0 0 256 256 1 square_256"
 name Reformat2
 selected true
 xpos 4513
 ypos -5169
}
Noise {
 replace true
 type turbulence
 size {1135 455}
 zoffset {{frame/3}}
 octaves 3
 gain 0.166
 translate {0 {frame*30}}
 scale {1 3.3}
 center {128 128}
 name Noise1
 selected true
 xpos 4513
 ypos -5137
}
Invert {
 name Invert1
 selected true
 xpos 4513
 ypos -5113
}
Grade {
 gamma 0.04
 black_clamp false
 name Grade1
 selected true
 xpos 4513
 ypos -5077
}
Blur {
 size 4
 name Blur3
 selected true
 xpos 4513
 ypos -5053
}
Merge2 {
 inputs 2
 operation multiply
 name Merge1
 selected true
 xpos 4513
 ypos -4790
}
Crop {
 box {0 0 256 256}
 reformat true
 crop false
 name Crop2
 selected true
 xpos 4513
 ypos -4766
}
ColorCorrect {
 gain {1.539999962 1.169999957 1.539999962 1.539999962}
 shadows.gain {0.9499999881 0.2515504956 0.0522500053 1}
 midtones.gain {1 0.7039999962 0.1999999881 1}
 highlights.gain {2.480000019 2.013958454 0.4711999893 1}
 lookup {shadow {curve 1 s0 x0.6346681118 0 s0}
   midtone {1-shadow-highlight}
   highlight {curve x0.4786040783 0 s0 x0.896453023 1 s0}}
 name ColorCorrect1
 selected true
 xpos 4513
 ypos -4742
}
set N788156b0 [stack 0]
TimeClip {
 time ""
 first -5000
 last 5000
 frame_mode offset
 frame 300.000000
 origfirst -5000
 origlast 5000
 origset true
 name TimeClip1
 selected true
 xpos 4462
 ypos -4572
}
push $N788156b0
Merge2 {
 inputs 2
 operation plus
 name Merge2
 selected true
 xpos 4513
 ypos -4507
}
set N7882f850 [stack 0]
TimeClip {
 time ""
 first -5000
 last 5000
 frame_mode offset
 frame 500.000000
 origfirst -5000
 origlast 5000
 origset true
 name TimeClip2
 selected true
 xpos 4452
 ypos -4439
}
push $N7882f850
Merge2 {
 inputs 2
 operation plus
 name Merge3
 selected true
 xpos 4513
 ypos -4380
}
ShuffleCopy {
 inputs 2
 alpha alpha2
 black red
 white green
 red2 blue
 green2 alpha
 out2 motion
 name ShuffleCopy1
 selected true
 xpos 4513
 ypos -4069
}
IDistort {
 uv motion
 uv_scale {79 40}
 name IDistort1
 selected true
 xpos 4513
 ypos -4045
}
Glow2 {
 tolerance 0.34
 brightness 0.34
 saturation 0.875
 size 69
 name Glow1
 selected true
 xpos 4513
 ypos -3972
}
Transform {
 translate {894 732}
 center {104 20}
 name Transform1
 selected true
 xpos 4513
 ypos -3948
}
set N78904ae0 [stack 0]
Ramp {
 inputs 0
 p0 {128 548}
 p1 {128 870}
 name Ramp1
 selected true
 xpos 5183
 ypos -3701
}
push $N78904ae0
Transform {
 translate {-65 220}
 scale {10 2.51699996}
 center {1000 1065}
 name Transform2
 selected true
 xpos 4681
 ypos -3830
}
Blur {
 size 500
 name Blur1
 selected true
 xpos 4681
 ypos -3799
}
push $cut_paste_input
Reformat {
 format "1920 1080 0 0 1920 1080 1 HD_1080"
 name Reformat5
 selected true
 xpos 5057
 ypos -3855
}
Rectangle {
 area {941 66 1056 734}
 ramp linear
 color {0.467911 0.388028 0.16406 1}
 color_panelDropped true
 p1 {866 728}
 color0 {0.17482 0.067225 -0.107046 0}
 color0_panelDropped true
 p0 {866 134}
 name Rectangle1
 selected true
 xpos 5057
 ypos -3823
}
Add {
 inputs 1+1
 channels rgb
 value {0.46147 0.342429 -0.053899 0}
 value_panelDropped true
 unpremult rgba.alpha
 name Add1
 selected true
 xpos 5057
 ypos -3799
}
Glow2 {
 inputs 1+1
 channels rgba
 size 9.2
 name Glow3
 selected true
 xpos 5057
 ypos -3701
}
Merge2 {
 inputs 2
 name Merge4
 selected true
 xpos 4513
 ypos -3694
}
Glow2 {
 inputs 1+1
 name Glow15
 selected true
 xpos 4513
 ypos -3517
}
Write {
 name Write2
 selected true
 xpos 4513
 ypos -3423
}
Viewer {
 frame 123
 frame_range 1-640
 name Viewer1
 selected true
 xpos 4513
 ypos -3283
}