Jump to content
  • Advertisement
Sign in to follow this  
Jaywalk

Normal Mapping

This topic is 4519 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm looking to add normal maps to a game I'm writing, but I've never worked with normal maps before and I really don't know where to start. Could someone give me some guidlines on how to add normal mapping to working D3D9 code (currently using the fixed function pipeline, but that can be changed if shaders are necessary).

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Well for starts a normal map is just a special texture, so to begin there you add the normal map texture type. Generating normals maps again depends on a few factors and the kind of technique you are using. Most likely you will want to use tangent space. This requires having to calculate an additional tangent vectors on your geometry. You can try object space normal mapping to, it has a few defects though.

Than how you do it depends on if you use shaders or the fixed-function dot3 ops. Well, you can support both of course. Where you add this in your pipeline depends on how you strcutured your rendering code. Most likely you will flag geometry somewhere to need normal mapping and than fork over the rendering to be bump mapped by a shader or in dot3 functionality.

Maybe that helps, maybe not.

Share this post


Link to post
Share on other sites
You may also wish to look at ATI and Nvidia's developer pages (and respective SDK's) - a lot of their stuff is 'advanced' level, but you should be able to find some good examples.

You could also check out the DirectX SDK samples - there isn't a sample exclusively for normal mapping, but a few of them do include it.

Normal Mapping is the foundation of a lot of common techniques and it was the cool thing that everyone was doing a couple of years ago. Google and the forum search tool can dig up a mountain of information and example [smile]

hth
Jack

Share this post


Link to post
Share on other sites
Probably not the best tutorial on the net covering Normal mapping but I have written a sample application that shows the use of normal maps and tries to explain how they work and how to implement them.

Normal mapping tutorial

I hope this helps.
Take care.

Share this post


Link to post
Share on other sites
Thank you for your replies.

I think I'll try the dot3 approach in the short term (so much easier to search google when you know the right word to use; thanks) and then look to implementing shaders.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!