I have read the HL2 Paper and Presentation for Radiosity Normal Mapping. I am currently trying to implement it myself. I already managed to generate a single radiosity lightmap by drawing a hemicube and downsample it to a single pixel.

For Radiosity Normal Mapping like HL2 I need 3 different Radiosity Lightmaps, one for each Directional Component, But why only 3 and not 5? If we take a flat plane as our destination polygon, shouldn't I generate 5 different radiosities, one for the Normal, One For the Tangent, One for the Bitangent, one for the Inverted Tangent and one for the Inverted Bitangent?

enter image description here

enter image description here


1 Answer 1


You can see this explained in this figure from Valve's slide presentation on the topic at GDC 2004:

Basis for Radiosity Normal Mapping

They don't measure the lighting along 5 basis vectors \$(\pm 1, \pm1, 0), (0, 0, 1)\$, where only one is locally perpendicular to the surface and the rest look along the horizon (and so only half their domain is capturing light that's likely to illuminate this surface)

Instead they use three perpendicular basis vectors, arranged to all make the same angle with the horizon (about 54.7°):

  • \$\left( \sqrt{\frac 2 3}, 0, \frac 1 {\sqrt 3} \right)\$
  • \$\left( -\frac 1 {\sqrt 6}, \frac 1 {\sqrt 2}, \frac 1 {\sqrt 3} \right)\$
  • \$ \left( -\frac 1 {\sqrt 6}, -\frac 1 {\sqrt 2}, \frac 1 {\sqrt 3} \right)\$

This makes the three basis vectors more uniformly distributed above the surface, rather than having one "special" vector that's dead-on and the rest squeezed to the outer limit where they'd be more prone to might leak light from over the horizon. Each one is now pulling about equal weight in terms of how often a bump will use its contribution.

This of course also gives an optimization: it's 40% cheaper to store, sample, and do math on 3 maps instead of 5!

  • \$\begingroup\$ That sounds plausible. I am currently trying to implement a baker myself and currently it just does Radiosity based on the World Space Normal. Do you have an Idea how I could transform the Normal into these basis vectors? I don't have Tangents or Bitangents... \$\endgroup\$
    – Raildex
    Commented Jan 15, 2023 at 14:52
  • \$\begingroup\$ To use this effect, you will need tangents and bitangents at runtime, so you'll need to generate them at some point. Now's as good a time as any. \$\endgroup\$
    – DMGregory
    Commented Jan 15, 2023 at 15:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .