nuke wave expressions

Nuke's flexibility and seamless integration of Python and TCL is perhaps the main reason I love working in it so much. Wave expressions are amazingly useful for controlling simple animations that would take quite a bit of keying without. The following expressions amazingly useful in generating these different types of waves and I wanted to make sure I shared what has become part of my toolbox.

I also have a simple Gizmo based on these expressions that you can download from Nukepedia.

Special Thanks to David Emeny whose blog these expressions are simplified and refined from.

 

The Expressions

The following expressions can be used in any node's knob value to control that knob. You can input the expression by right clicking on the value and selecting "add expression...". The expressions are visible by selecting the Curve Editor and selecting the value with the expression in it.

The waves are controllable by editing the following variables in the expressions.

waveLength -Controls the frequency of the wave, the number of frames before the pattern repeats. minVal -The lowest value the wave will touch. maxVal -The highest value the wave will touch. offset -Offsets the frame value to move the wave back and forth, allows control of value at a certain frame.

 

Random Wave

Formula:  

Quick Wave:  
 

Noise Wave

Formula:  

Quick Wave:  
 

Sine Wave

Formula:  

Quick Wave:  
 

Triangle Wave

Formula:  

Quick Wave:  
 

Square Wave

Formula:  

Quick Wave:  
 

Sawtooth Wave

Formula:  

Quick Wave:  
 

Sawtooth (Parabolic) Wave

Formula:  

Quick Wave:  
 

Sawtooth (Parabolic Reversed) Wave

Formula:  

Quick Wave:  
 

Sawtooth (Exponential) Wave

Formula:  

Quick Wave:  
 

Bounce Wave

Formula:  

Quick Wave:  
 

Blip

Formula:  

Quick Wave:  
 

SineBlip

Formula:  

Quick Wave: