From BlenderWiki

Jump to: navigation, search

Specular Shaders

Mode: All Modes

Panel: Shading/Material Context → Shaders

Hotkey: F5

Description

Specular shaders create the bright highlights that one would see on a glossy surface, mimicking the reflection of light sources. Unlike diffuse shading, specular reflection is viewpoint dependent. According to Snell's Law, light striking a specular surface will be reflected at an angle which mirrors the incident light angle (with regard to the surface's normal), which makes the viewing angle very important.

Note
It is important to stress that the specular reflection phenomenon discussed here is not the reflection we would see in a mirror, but rather the light highlights we would see on a glossy surface. To obtain true mirror-like reflections you would need to use the internal raytracer. Please refer to section RENDERING of this manual.


Options

Each specular shader shares two common options:

Specular colour
The colour of the specular highlight
Spec
The intensity, or brightness of the specular highlight. This has a range of [0-2], which effectively allows more energy to be shed as specular reflection as there is incident energy.

As a result, a material has at least two different colours, a diffuse, and a specular one. The specular color is normally set to pure white, but it can be set to different values for various effects.

Technical Details

Specular Reflection.

In reality, Diffusion and Specular reflection are generated by exactly the same process of light scattering. Diffusion is dominant from a surface which has so much small-scale roughness in the surface, with respect to wavelength, that light is reflected in many different directions from each tiny bit of the surface, with tiny changes in surface angle.

Specular reflection, on the other hand, dominates on a surface which is smooth, with respect to wavelength. This implies that the scattered rays from each point of the surface are directed almost in the same direction, rather than being diffusely scattered. It's just a matter of the scale of the detail. If the surface roughness is much smaller than the wavelength of the incident light it appears flat and acts as a mirror.

If it is difficult for you to understand the relation between roughness' scale and light's wavelength, try to imagine a ball (say, of centimetre scale): if you throw it against a wall of raw stones (with a scale of roughness of a decimetre), it will bounce in a different direction each time, and you will likely quickly lose it! On the other hand, if you throw it against a concrete wall (with a roughness of, say, a millimetre scale), you can quite easily anticipate its bounce, which follow (more or less!) the same law as the light reflection…

CookTorr

Mode: All Modes

Panel: Shading/Material Context → Shaders

Hotkey: F5

Cook-Torrance Shader

Description

CookTorr (Cook-Torrance) is a basic specular shader that is most useful for creating shiny plastic surfaces. It is a slightly optimised version of Phong.

Options

Hard
The hardness, or size of the specular highlight


Phong

Mode: All Modes

Panel: Shading/Material Context → Shaders

Hotkey: F5

Phong Shader

Description

Phong is a basic shader that's very similar to CookTorr, but is better for skin and organic surfaces

Options

Hard
The hardness, or size of the specular highlight

Planet Atmosphere

Because of its fuzzyness, this shader is good for atmosphere around a planet. Add a sphere around the planet, slightly larger than the planet. For its material, use a phong specular shader. Set it very low alpha (.05), zero diffuse, low hardness (5) but high specularity (2).

Blinn

Mode: All Modes

Panel: Shading/Material Context → Shaders

Hotkey: F5

Blinn Shader

Description

Blinn is a more 'physical' specular shader, often used with the Oren-Nayar diffuse shader. It can be more controllable because it adds a fourth option, an index of refraction, to the aforementioned three.

Options

Hard
The hardness, or size of the specular highlight. The Blinn shader is capable of much tighter specular highlights than Phong or CookTorr.
Refr
The 'Index of Refraction'. This parameter is not actually used to compute refraction of light rays through the material (a ray-tracer is needed for that), but to correctly compute specular reflection intensity and extension via Snell's Law.


Toon

Mode: All Modes

Panel: Shading/Material Context → Shaders

Hotkey: F5

Toon Specular Shader

Description

The Toon specular shader matches the Toon diffuse shader. It is designed to produce the sharp, uniform highlights of cartoon cels.

Options

Size
The size of the specular highlight
Smooth
The softness of the highlight's edge

Hints

Toon shader can be also be accomplished in a more controllable way using ColorRamps.

WardIso

Mode: All Modes

Panel: Shading/Material Context → Shaders

Hotkey: F5

WardIso Shader

Description

WardIso is a flexible specular shader that can be useful for metal or plastic.

Options

rms
rms controls, in effect, the size of the specular highlight, though using a different method to that of the other specular shaders. It is capable of extremely sharp highlights.