Advertisement

How do you make bump mapping in OpenGl ?

Started by August 21, 2002 10:30 AM
3 comments, last by Slyer 22 years, 6 months ago
How do you make bump mapping in OpenGl ? I want to make bump mapping in a textured sphere!!
Take a look at NeHe''s bump mapping tutorial.

Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
Advertisement
There are more than one method for bump mapping.
NeHe hosts a tutorial of emboss at nehe.gamedev.net in the tutorials section. It''s a very old, very fake yet very fast method which works on all graphics cards. You should start with this to have an overview of how to implement it in OpenGL. All bump mapping techniques use the same basis : the bumps are stored in a texture, and at each frame you have to compute something between the viewed object, the camera and the lights to add bump effects.

There exists DOT3 bump mapping if you can use OpenGL1.3 features or higher.

Apart from that there exist hardware-specific methods that give better results thanks to register combiners (nVidia) or fragment shaders (ATI) for instance.
Look for an article called "A Practicle and Robust Bump-Mapping Technique For Todays GPU''s", it''s on the nVidia developers site. Thats most of what you would need to do a decent bump mapping algorithm.

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
pyhton regious : yes it''s a good article, but implementations are limited to nVidia platforms. Apart from that, all the theory is excellent.

This topic is closed to new replies.

Advertisement