I'm trying to implement radiosity normal maps from the old Valve paper:

Half-Life® 2 / Valve Source™ Shading.pdf | valvesoftware.com

I've tried generating the light maps using Vray and 3dStudio max, by overriding the normals to point in these three directions:

enter image description here

It works to an extent, applying normal maps over walls and such makes them appear like they are light mapped and bumpy. It's when I set the normal map to (128,128,255) that i can't get the same result as if it were a regular light map and i see artifacts.

I'm not sure if understand at all how the basis is used to capture light, so i omitted the GI part and tried to bake just a directional light.

If i set a directional light at (-1,0,0) in the basis from the picture above, the first dot product (red arrow) will be less than 0, however both the green and the blue will get some value from that light.

Same way if i set it at (1,0,0) there will be some value greater than 0, and two less than.

This doesn't make sense, the directional light at this angle shouldn't contribute any light to this surface? enter image description here

The white arrow represents the light dir to be baked. The red one is pretty affected by it, but then scaling it by 1/3 doesn't really help much. It feels like it's missing some negative light (?).

enter image description here

Here it is with (1,1,1) normalized ^


The lightmap representation used in Valve's stuff, like any finite-storage representation of the surfaces response to light, is only approximate, and the error in the approximation is higher or lower in different scenarios.

Since it doesn't store the light in a direction tangent to the surface (where it would be exactly zero), you don't get an exact zero for this case. However, this isn't that important:

  • Normal maps generated from height maps will never yield a normal vector exactly perpendicular to the geometry, and tend not to be not that steep anyway.
  • The 3 generated lightmaps are normalized so that their sum is equal to the light for the "straight up" direction. This reduces directional contrast, but also eliminates light from the tangent direction.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.