Bump mapping in software?

I need to do software bump mapping in OpenGL. No hardware please.
Does not matter if I have to slowly render it in multiple passes.

Where can I find some examples or code to do this?

You might want to pay a visit to Nehe’s tutorial 22 as it seems to cover bump mapping.
http://nehe.gamedev.net/

Tina

I already looked at that demo.

From what I can tell, it doesn’t do bump mapping.
The box looks totally flat on my computer.

Hmm, seemed non flat to me when I ran it just now. I can see it working for say a planet requiring the ground to be bumped.

Did you use the letters E, M and B to see the different effects. B changes the bump setting. Flat or not flat. E changes emboss setting and M allows multi-texturing.

Hopefully it isn’t the case that your card will not allow you to use the extensions.

Tina

I can see all the textures, but I don’t see any bump shadows.

The textures have some shadowing to them (as in the actual
texture pixels), but I don’t see any exaggerated bump mapping
shadows. It’s all flat.

Maybe my card doesn’t support these extensions. I wish
a screenshot came with this demo.

I’ve incorporated my screenshot routines into the program and dumped the bumped,embossed and normal views of the object on my site so that you can see the effects I have.
http://programming.swangen.co.uk/opengl/bumpmapping.asp

If this is what you get then either we both have no support for this or this is what the lesson is showing us. Perhaps someone who gets a different effect will let us know.

Tina

Thanks, I see it now. I changed MAX_EMBOSS to 0.02f.

The problem with the demo is that the bump mapping is so subtle,
you really don’t notice the difference, even if it is working
correctly.

If I increase MAX_EMBOSS to 0.05 or higher, the bump mapping
does not look very good. Do you know if hardware bump mapping
does the same thing if I want to use a very exaggerated, but
realistic bump mapping that looks good?

To improve the quality you need a higher resolution bump map with filtering like MIPmaps too. You can still displace by the same s&t magnitude

Ok, but say if I replaced bump.bmp with a 1024x1024 B&W checker pattern.
The quality is the same as a 256x256 B&W checker pattern. Is that what
you mean by higher resolution?

(Oh, nevermind. You mean if the texture has a wider range of colors,
not necessarily the size of the texture. )

BTW, a checker pattern shows off the bump mapping in this demo much better.

[This message has been edited by Syslock (edited 09-01-2002).]