Bent Normals != GI
Today I've been giving my chapter on HDR some serious hell (I'm writing a chapter on HDR lighting for an upcoming book called "More OpenGL Game Programming"). I've just gotten to the section where I'm describing Image Based Lighting, Ambient Occlusion, and Bent Normals.
For those of you who don't know what the above topics are about, visit wikipedia.org, they're hella cool subjects in computer graphics. Everyone else, this rant's for you:
Bent Normals do not give you free radiosity or GI! Not even close! It may look like it sometimes but it's merely a coincidence.
A bent normal is used as a lookup into the Diffuse Irradiance Map (DIM) for parts of the model surface that lie in crevasses. The reason for using bent normals is the true normal of a surface that is a crevasse on a model is usually obscured by the model and the surface is not receiving lighting from the portion of the DIM the normal would otherwise sample. Instead the bent normal is used. The bent normal is the average of all the unoccluded rays radiating out from that point on the surface (see wikipedia for a better explanation). The result is, the illumination value that is sampled from the DIM is closer to the color of light that should be reaching the crevasse. The problem with this method is that the light, though now closer to the correct color, is still striking the crevasse surface at an angle but the DIM sampling method assumes the light is striking the surface dead on (directly along the normal). This means the illumination value sampled from the DIM with the bent normal is much brighter than it should be, giving the ILLUSION of light pooling in crevasses like radiosity illumination would pool in corners.
Many people use bent normals in such a way as a substitute for radiosity because it can run in real-time and is responsive to dynamic changes in the lighting environment. The more I look at it though the more wrong it starts looking. I don't like it, I should like it!
I propose the value sampled from the DIM with the bent normal be modulated by both the Ambient Occlusion (AO) term and the dot product between the normal and bent normal. The result is closer to accurate though still thrown off by the fact that the DIM is not just a map of light color, it's a precomputed sum of diffuse illumination from N light sources. I'm gonna have to think about that one.
Another neat trick that Jeff Russell proposed could be used along with the Better-Bent-Normal Technique (tm and patent pending :-P). Traditional DIMs assume every texel in the hemisphere about the normal contributes diffuse illumination to the point. However in a crevasse, only a portion of the environment texels are visible, the others are occluded completely. Jeff suggested precalculating several DIMs, including some with partial occlusion. Essentially there is a full DIM where every texel of the normal's hemisphere contributes light, and several partial DIMs where only a sub-cone of the hemisphere contributes light. When it comes time to sample, the AO term is used to interpolate between the various DIM samples. The AO term tells you what percentage of the ambient light is coming in essentially, so if it's close to 0% then a very narrow coned DIM should be sampled.
This technique sounds cool, especially when used together with bent normals (otherwise its all sorts of wrong still). I'm wondering if the results will be noticeably different. Gotta try it out though, sounds neat.
For those of you who don't know what the above topics are about, visit wikipedia.org, they're hella cool subjects in computer graphics. Everyone else, this rant's for you:
Bent Normals do not give you free radiosity or GI! Not even close! It may look like it sometimes but it's merely a coincidence.
A bent normal is used as a lookup into the Diffuse Irradiance Map (DIM) for parts of the model surface that lie in crevasses. The reason for using bent normals is the true normal of a surface that is a crevasse on a model is usually obscured by the model and the surface is not receiving lighting from the portion of the DIM the normal would otherwise sample. Instead the bent normal is used. The bent normal is the average of all the unoccluded rays radiating out from that point on the surface (see wikipedia for a better explanation). The result is, the illumination value that is sampled from the DIM is closer to the color of light that should be reaching the crevasse. The problem with this method is that the light, though now closer to the correct color, is still striking the crevasse surface at an angle but the DIM sampling method assumes the light is striking the surface dead on (directly along the normal). This means the illumination value sampled from the DIM with the bent normal is much brighter than it should be, giving the ILLUSION of light pooling in crevasses like radiosity illumination would pool in corners.
Many people use bent normals in such a way as a substitute for radiosity because it can run in real-time and is responsive to dynamic changes in the lighting environment. The more I look at it though the more wrong it starts looking. I don't like it, I should like it!
I propose the value sampled from the DIM with the bent normal be modulated by both the Ambient Occlusion (AO) term and the dot product between the normal and bent normal. The result is closer to accurate though still thrown off by the fact that the DIM is not just a map of light color, it's a precomputed sum of diffuse illumination from N light sources. I'm gonna have to think about that one.
Another neat trick that Jeff Russell proposed could be used along with the Better-Bent-Normal Technique (tm and patent pending :-P). Traditional DIMs assume every texel in the hemisphere about the normal contributes diffuse illumination to the point. However in a crevasse, only a portion of the environment texels are visible, the others are occluded completely. Jeff suggested precalculating several DIMs, including some with partial occlusion. Essentially there is a full DIM where every texel of the normal's hemisphere contributes light, and several partial DIMs where only a sub-cone of the hemisphere contributes light. When it comes time to sample, the AO term is used to interpolate between the various DIM samples. The AO term tells you what percentage of the ambient light is coming in essentially, so if it's close to 0% then a very narrow coned DIM should be sampled.
This technique sounds cool, especially when used together with bent normals (otherwise its all sorts of wrong still). I'm wondering if the results will be noticeably different. Gotta try it out though, sounds neat.
