View Full Version : "Ambient bumpmapping"
03-24-2003, 12:39 AM
Here is a document of a technique we recently started using for Tenebrae. It allows you to do some sort of bumpmapping for ambient light (not totally correct) so that art with very few or no hard coded shading can still look good with ambient lighting. (Versus using black ambient as Doom3 does to preserve the quality.)
It also allows do to reasonably bright scenes without having huge slowdowns.
I would appreciate some comments or suggestions on this http://www.opengl.org/discussion_boards/ubb/smile.gif
03-24-2003, 05:17 AM
I couldn't see what it looked like, the images wouldn't load, but looking up lighting in a texture with a normal as texcoord is a very powerful technique. You can do great outdoor lighting this way. It actually get's easier outdoors since sun and skylight tend to overpower all other light sources, so you don't get as much problems with other lighting looking flat. I don't know if you already do this but when creating the averaged "bent" normals as a pre process make sure you weight them by cos(angle_to_normal). That way incident light whith high intensity but a grazing angle won't contribute unnatural amounts of lighting. There's lots of info about this technique in the advanced renderman course notes from siggraph 2002 at renderman.org. For image based lighting in general check out debevec.org if you haven't already.
03-24-2003, 12:10 PM
Looks good, altough it's too bad it's not available on a gf2. Just when I got one... Why can't the delux maps be stored in tangent space? That'd make it work.
03-24-2003, 09:15 PM
I mentioned a "dominant vector" shader approach for ambient illumination of bump maps a while back, your delux maps are definitely in that spirit.
It seems to me that a delux map could DEFINITELY be stored in tangent space. You should formulate that, since the preprocessing luxel computations are better than per pixel transform to tangent space.
One disappointment is that you seem to render your maps simply as a diffuse illumination for that vector (if not it's not clear what you do, sorry)? I think you get away with this because your color textures happen to look proximity shaded, and that's a bit of a fortunate coincidence.
Let me make a suggestion: A delux shader should perhaps interpolate between a precomputed proximity shaded (accessibility shaded) height field texture and diffuse dominant vector term, as a function of the incident light sharpness (some kind of clustering analysis of the incident vector). For specular you could vary the exponent in a similar way.
This would allow you to better represent truly diffused incident illumination from Bump maps without losing a directional component.
As I said I suspect that the reason your stuff looks OK now is that your color maps tend to look proximity shaded, but imagine a monotonc surface with a bump map. i.e. no color map or one with very consistent surface color. I think your solution would just look like another light source rather than an ambient term. For diffuse what you need is this IMHO:
((delux.normalmap ) * sharpness_scalar + proximity_map * (1.0-sharpness_scalar) ) * lightmap * color
This means that with a color texture that happens not to look like a shaded releif map (unlike your examples I'd suggest were slightly contrived) you end up with diffuse looking ambient results and sharpness gives you much more control over how directionally biased the ambient contribution is. Sharpness could perhaps be stored in the alpha of the delux map or simply be some other register, perhaps just per vertex.
[This message has been edited by dorbie (edited 03-24-2003).]
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.