Maya Pattern Animation




The animation and notes on this page explain how custom shaders written in the RenderMan Shading Language can be animated using SLIM parameter expressions.


Renderman Shader

Custom Pattern
I decided to animate a pattern I created in a previous exercise for this project. Code was added to create controls which manipulate the sweep of the two curves, change the colors, and rotate the entire shader.


My goal with this shader was to create a stylistic animated eye. By controlling the sweep values of the two curves I was able to keyframe a simple animation of the eye blinking in Maya. To spice things up I also had the shader progress through the color spectrum with every blink of the eye. Adding a control to rotate the entire shader was necessary to orient the eye properly.



Controls Code
stCustom_pattern(float Kd = 1, /* fake brightness */
  Ks = 0.1, /* specular brightness */
  roughness = 0.1, /*controls size of specular highlight*/
  doOcclusion = 1,
  samples = 64,
  curve1Rad = .5,
  curve2Rad = 1,
  curve1S = 0,
  curve1T = 0,
  curve2S = 0,
  curve2T = 0,
  rotAngle = 0; /* [0 360] */
  color orange_1 = (1.0,0.588,0.113),
  orange_2 = (1.0,0.929,0.568),
  hilitecolor = 1; /*color of spec highlight*/
  string filename="";
  output varying float occ = 1
)

*Green indicates values that were keyframed to create the animation.








Scene Creation

The scene was constructed in Maya using a few lights and some polygonal models I created in the past. I wanted to go for an overall dark scene with a single lit corner using primarily green hues for the lights. I positioned a blue spot light facing away from the TV onto the floor to create the glow effect coming from the screen. This light was also keyframed to match the blinking of the eye shader to add a little more complexity to the scene.





Animation

To animate the eye I had to find values for the curves that would create an image of a closed and open eye. Here are the values I ended up using:


Closed
curve1S = 0.42
curve1T = 0.48

curve2S = 0.38
curve2T = 0.31
Open
curve1S = 0.18
curve1T = 0.17

curve2S = 0.08
curve2T = 0.12




Final Render


flash content will replace this text