Advertisement

How are these bump maps applied?

Started by July 22, 2004 06:51 AM
5 comments, last by FenrirWolf 20 years, 6 months ago
These textures have bumpmaps with them (the first free textures with bumpsmaps I've seen, but how are they combined? My understanding of bumpmaps is in the sense of normal maps where the r,g & b components of each pixel give a normal direction which is dot-producted with the light vector. But these bumpmaps are greyscale which presumably implies that's not how they're used.
They look like "3ds-max-style" bumpmaps (as opposed to a format suitable for real-time bumpmapping like DOT3 or normal maps), where the lightness of the pixel indicates a height offset (so for example, white areas are raised and dark areas are lower). Not sure how you go about converting that to a DOT3 or normal map, but then maybe you don't need to? :)
Advertisement
I'd guess (because they are greyscale) that they are heightmaps. At each texel, take the gradients in x and y and cross product them to get the texture space normal for that texel.
Yep, "heightmaps", that's the word I was looking for! :P
Texture Maker will output normal-style bump maps.

Nvidia has a Photoshop plugin on their website that will convert a height map into a normal map.

I'm sure if you poked around on Google you could find few more, maybe even a stand-alone convertor (in case you ain't got Photoshop).
--- - 2D/Pixel Artist - 3D Artist - Game Programmer - Ulfr Fenris[[ Gaping Wolf Software ]] [[ GameGenesis Forums ]]
Looks like something that you'd use in Photoshop as an alpha channel and then run some lighting settings through.

It's more of something used to make a texture rather than to be a texture, I guess?
Advertisement
You can store bumping (surface perturbations) in two manners.

Most non-realtime systems use the heightmap method, which works like Gooberius said: They just use the grayscale value, applied against the texel surface normal to simulate the appearance of a bumpy surface.

Then there's the method used for almost all realtime applications, which works like d000hg's original explanation.

You can convert from heightmap to normal map, however. I believe it has something to do with creating a triangle that's offset by each texel and then record the normal from that. That gives you the tangent space normals which can be imported straight into most realtime 3D engines.

(Well, OK, there's a third method in which the texture actually physically offsets the vertices in object space, called displacement bumpmapping, but AFAIK that's not used in realtime. I've only seen it used in non-realtime, because your mesh needs to be ungodly dense.)
--- - 2D/Pixel Artist - 3D Artist - Game Programmer - Ulfr Fenris[[ Gaping Wolf Software ]] [[ GameGenesis Forums ]]

This topic is closed to new replies.

Advertisement