Colorband used for material ramp shades

In many real life situations - like skin or metals - the color of diffuse and specular reflections can differ slightly, based on the amount of energy a surface receives or on the light angle of incidence.

Since such calculations are in the core of the shading algorithms, it is not well possible to do with the current Blender texture system.

 

The new "Ramp" options in Blender now allow to set a range of colors for a Material, and define how the range will vary over a surface, and how it blends with the 'actual color' (typically from material or as output of texture).

Since texture calculations in Blender happen before shading, the Ramp shade can completely replace texture or material color. But by use of the mixing options and Alpha values it is well possible to create an additional layer of shading in Blender materials.

Diffuse

Ramp shader panel and settings for Diffuse

The Ramps Panel is by default tabbed in the Material Panel. Here you can use the top two buttons to show either settings for "Col" (diffuse) or "Spec" (specular).

 

  • Press the button "Colorband" to enable using ramp shades
  • By default it opens with 2 colors, with the first having Alpha=0. Note that Alpha here blends with material color, as defined by the "Method" pop-up.

 

The two pop-up buttons in the bottom define how the Ramps work:

 

Input:

  • Shader: the value as delivered by the basic shading formula (like Lambert or Phong) defines the color. Here the amount of light doesn't matter for color, only the direction of the light.
  • Energy: as previous, but now also lamp energy (color, distance) is taken into account. This makes the material changing color when more light shines on it.
  • Normal: the surface normal (relative to camera) is used for the Ramp. This is possible with a texture as well, but added for convenience.
  • Result: All three previous options work per lamp, this option only does it in the end of all shading calculus. This allows a full control over the entire shading, including 'Toon' style results. Using alpha values here is most useful for tweaking a finishing touch to a Material.

 

The "Method" menu has four options to denote blending type; "Mix", "Add". "Mult" and "Sub".

 

The last button, "Factor", denotes the overall factor the Ramp works.

Color changes based on shade calculation itself (like lambertian dot product)
Color changes based on energy it receives (shade plus light)
Color changes based on view and normal
Color changes based on end result of all shading

Specular

Settings for specular Ramp

Buttons and options for Specular Ramps work like for "Color" Ramps above.

Color changes based on shade calculation itself (like Phong)
Color changes based on energy it receives (phong plus light)
Color changes based on view and normal
Color changes based on end result of all specular shading
picture by Aner