Introduction to Shaders in Maya

Understanding Shaders in Maya

Shaders are sets of properties that define how a surface reacts to lighting in a scene. They are rendering nodes that define the material qualities of a surface. When you apply a shading node to your modeled geometry, you use the shader’s settings to determine how the surface will look when it’s rendered.

Key Concepts in Shading

Three key concepts determine how a shader makes a surface react to light:

  • Diffusion: How light is scattered across a surface.
  • Reflection: How light bounces off a surface.
  • Refraction: How light bends as it passes through a transparent surface.

Generally, light rays are either reflected, absorbed, or pass through a surface. Diffusion and reflection describe how light rays bounce off a surface and back into the environment. Refraction refers to how a light ray is bent as it passes through a transparent surface.

Shading vs. Texturing

Shading refers to applying renderable attributes like color, surface bumps, transparency, reflection, and shine to an object in Maya. It’s closely related to, but distinct from, texturing, which involves applying a map or other node to an attribute of a shader to create surface detail.

For example:

  • Adding a scanned photo of a brick wall to the Color attribute of a shader is considered applying texture.
  • Adding another scanned photo of the bumps and contours of the same brick wall to the Bump Mapping attribute is also considered applying a texture.

Applying textures to shaders is also called texture mapping or simply mapping.

Types of Shaders

The Lambert Shader

The default shader type is Lambert, an evenly diffused shading type commonly found in dull or matte surfaces, such as a sheet of regular paper. A Lambert surface diffuses and scatters light evenly across its surface in all directions.

The Phong Shader

Phong shading introduces specular highlights and reflectivity to a surface’s rendering. A Phong surface reflects light with a sharp hot spot, creating a specular highlight that drops off sharply. Glossy objects like plastics, glass, and most metals often use Phong shading.

The Blinn Shader

The Blinn shading method provides a highly accurate specular lighting model with superior control over the specular’s appearance. A Blinn surface reflects light with a hot spot, creating a specular that diffuses more gradually than a Phong. This makes it suitable for shiny and metallic surfaces.

The Shaderfx Shader

This shader is an editing tool for creating shader networks for game engines. It’s located at the top of the Create Panel in the Hypershade. We won’t delve into its details here as it’s primarily used for game development.

General Workflow

Typically, the workflow involves shading and texturing, followed by adding lighting and cameras before rendering.

Accessing the Hypershade

Open the Hypershade window by choosing Window -> Rendering Editors -> Hypershade. This window displays the Shading Nodes in the left column.