Tangent Shading

Using the 'tangent' option in the Material → Shaders panel alters the direction of shading to use the tangent vectors, giving anisotropic shading for any of Blender's diffuse and specular shaders. This is useful for creating brushed metal or wood, where the microscopic grooves in the material give highlights that follow a direction, rather than just being circular.

 

Currently, Blender uses a mesh's UV co-ordinates to define the direction of the shading (along the V axis). This means that models must be UV unwrapped to take advantage of tangent shading.

 

Todo:

? Automatically generate tangents for meshes without UV (with some options)

? Use tangents from Curves/Surface

? Implement the Ashikhmin shader patch

Examples

An anisotropic brushed metal material (1), by Claas Kuhnen ( .blend file )
A more complex, but more realistic, higher quality brushed metal material, using material blending (2), by Claas Kuhnen ( .blend file )
Close up of brushed metal material (2)
Node setup for brushed metal material (2)

Fresnel Diffuse

The Fresnel Diffuse shader uses the same fresnel formula as in use for transparency or mirroring.

Since it hilights edges (away from lamp), it's useful to fill darker parts with.

Shadow options

Bias

A new slider "Shadow Bias" has been added, to precisely extend the boundary between shadow or no shadow a little bit. It uses same threshold function as the "Bias" button.

(That latter still works, and will then use an automatic bias value instad, based on the geometry, to prevent terminator errors in raytracing).

 

With this manual bias you can get rid of terminator problems for weird diffuse shaders now as well (like tangent or fresnel).

 

OnlyCast

New Material option: "OnlyCast" makes the object only cast shadows, not showing up in renders, nor being mirrored.

 

ShadBuf - Traceable

Separated the old option "Traceable" in two. The "ShadBuf" option indicates whether the faces with this Material get filled in the ShadowBuffer, the "Traceable" option now only denotes if the faces with this Material can be detected by a ray.

Stress Maps

'Stress' is a new option in the Map Input panel, for controlling the mapping of a texture based on the stress in geometry. The stress is based on the difference between the "Orco" (original undeformed texture co-ordinate) and the actual render co-ordinate.

 

Stress maps can be useful for various things including changing facial textures/materials (such as lips) when they deform and making materials like rubber get more translucent then they are stretched.

 

The texture coordinate is neutral (0) on relaxed state. -1 is squeezed to zero, +1 is stretched to infinity. Note that scaling (object itself or parent) also will result in stress values.

Examples

A softbody mesh, with stress as a mask for colour and opacity ( Video: QuickTime H.264 / Xvid AVI / .blend file )
The stress mask ( Video: QuickTime H.264 / Xvid AVI )

Using Stress Maps

The easiest way to take advantage of stress maps is to make a mask of the stress values, which can then be used as a stencil to mask textures, or as a node, to blend materials and more. To do this, add a Blend texture, and set it's Map Input to stress. Because the range of different stresses that geometry can be under can differ so greatly from object to object, you'll need to tweak the blend texture with a colorband, so you can get a nice range from dark to bright that's relevant to the amount of distortion experienced by your object. Below is a screenshot of the tweaked Blend texture settings of the above softbody example:

Blending Modes

Seven new blending modes have been added with this release, available in ramps, material nodes and compositing nodes. They are:

 

Overlay

A combination of screen and multiply, which darkens dark areas, and brightens bright areas.

 

Color Dodge

Color dodge has a similar effect to Screen. The difference is that Color Dodge don't affect dark parts of the base color, and that it tends to saturate colors. It is mainly used to add some heat to a picture, or to obtain overbright/saturated hilights. The factor of Color Dodge is similar to the "Fill" Factor in photoshop. If you want the opacity factor, combine it with a mix node. Notes : - Color dodge has no effect on black. - Output is clamped to 0-1, but inputs aren't.

 

Color Burn

Color Burn is the opposite of color Dodge, it is similar to multiply, but it also saturates dark colors, and doesn't affect bright parts of the base pictures. It is also used to add some heat to an already dark picture, or to add scratches / dirt. The factor of Color Burn is similar to the "Fill" Factor in photoshop. If you want the opacity factor, combine it with a mix node. Notes : - Output is clamped to 0-1, inputs aren't.

 

Hue

Hue replaces the Hue of the base color with the hue of the secondary color. If the secondary color is completely desaturated, the base color is left untouched.

 

Saturation

Same as Hue, but for saturation. The saturation filter doesn't modify completely desaturated base colors.

 

Value

Once again, same as Hue but with "Value". (Value is a synonym of brightness)

 

Color

Replaces the Hue and the saturation of the base color with those of the secondary.