New to Bump Mapping

Started by
2 comments, last by GameDev.net 17 years, 9 months ago
Hi! I was wondering if anyone knows a program or tool that I can use to do bumpmapping. I really have no idea to begin with applying bumpmapping to my textures/ skins. Could someone please help me out a little bit? Any help is much appreciated! Thanks,
Advertisement
Is this for programming? You've pretty much given us no information besides you want to bumpmap. Google returns about 140,000 hits for the term "bumpmapping" alone. If you want to render pictures, use a 3d rendering program (or 2D I'm sure). If you're wanting to add it to your engine, what API are you using, OpenGL, Direct3D, software, something on top of the first 2, etc. What programming language are you using, etc.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

First you need to create your bump map. You do that with a 2d painting program either 'by hand' or by converting a picture into greyscale (fast but not really correct). Then you will need to transform your bump map into a normal map (for normal mapping).
Each pixel of the bump map defines how much 'high' is the surface at that point. In a normal map each pixel defines a vector, the normal at that point. To calculate it you can make your own function or (much easier) you can use one of the tools on the net (I think to remember something on the nvidia/ati site). Note that there are programs and plugins that build a normal map from a high-detailed polygonal model. Then you reduce the detail level of the model and apply the normal map (gon on the unreal3 site and download the video to see the amazing results).

After that, from your program you need to load the data: model and textures. You need to build tangets and (optionally) bitangents for you vertices: these two and the normal will form a tangent space space basis. Why? Because normals in the normal map are defined in this space.
Once you have done that, you need to write you fragment shader: you transform your light vector by the tangent matrix built up from the tangent space basis to put it in the same space as your normal, and then you calculate the lighting equation.
how do you calculate the normal map is it like vertex in calculating its normal ?
or is it another way to do it ?

This topic is closed to new replies.

Advertisement