# LEAN Mapping

## Marc Olano and Dan Baker (Firaxis Games)

### Abstract:

We introduce Linear Efficient Antialiased Normal (LEAN) Mapping, a method for real-time filtering of specular highlights in bump and normal maps. The method evaluates bumps as part of a shading computation in the tangent space of the polygonal surface rather than in the tangent space of the individual bumps. By operating in a common tangent space, we are able to store information on the distribution of bump normals in a linearly-filterable form compatible with standard MIP and anisotropic filtering hardware. The necessary textures can be computed in a preprocess or generated in real-time on the GPU for time-varying normal maps. The method effectively captures the bloom in highlight shape as bumps become too small to see, and will even transform bump ridges into anisotropic shading. Unlike even more expensive methods, several layers can be combined cheaply during surface rendering, with per-pixel blending. Though the method is based on a modified Ward shading model, we show how to map between its parameters and those of a standard Blinn-Phong model for compatibility with existing art assets and pipelines, and demonstrate that both models produce equivalent results at the largest MIP levels.

Paper (11MB PDF), I3D 2010

Video (46MB MPEG-4 video, 4m16s)

Presentation (12MB PowerPoint PPTX)

### Errata

This following errors in the published version are fixed in the copy
posted here.
- The normalization factor in Section 3.1 should be s/(2*pi), not
s/sqrt(2*pi). This is the normalization for a 2D Gaussian.
- Similarly, the normalization factors in Equation (1) and the
un-numbered Beckmann distribution equation just before it should be
1/(2*pi*sqrt(determinant(Sigma))).
- Not really an error, but at Stephen Hill's suggestion, the terms
in Equation (4) and the last equation in the first column of page 4
have been re-ordered to match the pseudo-code.

Not fixed
- The standard normalization for the Beckmann distribution includes
an pow(dot(n,h),-4). This is necessary for normalization on the
hemisphere, but since we normalize on the projected plane, we end up
with the Gaussian normalization factor.