OSL Shader Animation

  • Below are rendered stills.
  • I really liked the aesthetic of a crystal cave with a fantasy feeling. I chose to emulate this feeling by using the custom shader animations on the larger crystals, allowing them to change color and have a colored light emit from them. I enjoyed making simple shaders that had an interaction with another object (in this case, a coordinate system). Below are the two shaders I wrote, and their controls within Maya.
  • The controls for the gem feature the ability to change the near and far colors, the space in which affects the shader, and the distance used by the shader.
  • The controls for the light feature the ability to change the near and far colors of the light, the space in which the light is affected, the distance used by the shader, and the "brightness" which is the number by which the exposure is multiplied on after the distance is calculated.
  • A work-around was required to achieve this look, because lights do not have  shader groups and cannot have shaders applied to them like geometry can. Because of this, I instead created the shader OSL with an output for the exposure of the light, as well as the color. In the .rib version of the light controls, I created an area light where one would normally put a shader. I linked up the color and exposure to the controls to reach the desired effect.