next up previous
Next: Shadowing Up: Shading Previous: Shading

Metal Shading

The metal shading technique we use assumes a principle direction of curvature and striping occurs in an orthogonal direction. We first compute a table of random intensities where sample is: b + ( r * a ), where the base b is -0.1, r is a random number in [0,1] and a is 1.4. This causes the distribution be to biased towards white and black. We then filter each element in the table with each of its neighbors using a 1-5-1 weighting scheme and clamp this value to be in the range of [0,1]. We make these values periodic so there is some coherence which will remain smooth as they wrap around the model.

The table is then resampled into a 1D texture map. The texture map is used as a cosine distribution because it is indexed via a dot product. The resampling makes sure the bands are uniformly distributed on a cylinder. We then render the model with this texture map. The texture matrix computes the dot product with a fixed axis orthogonal to the principle curvature direction, and remap the value into [0,1]. This technique can be scaled in order to change the spacing of the stripes.

By itself, this texture does not look convincing, therefore we add Phong highlights computed by lighting a texture map in eye space with several Phong light sources oriented in the directions of a icosahedron's vertices. A fairly large specular power, empirically around 30-50, seemed to work best with a specular coefficient of about 0.3.


next up previous
Next: Shadowing Up: Shading Previous: Shading