Sign in to follow this  

Specular bump mapping

This topic is 4482 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 have been trying to find a good specular bump mapping tutorial but I cannot seem to find anything the explains it very well. There is a specular bump mapping example in the Shader X2 book, but trying to understand whats going on by looking through the code is near impossible. Does anyone know where a good tutorial for that would be? Thanks, Chris

Share this post


Link to post
Share on other sites
Do you know how to calculate specular lighting altogether? If not, DirectX SDK has a lighting topic that covers the algorithm.

When doing specular calculations per-pixel, you use the normal stored in the normal map (possibly transformed by the tangent-binormal-normal rotation matrix to get it to tangent space) instead of the normal from the vertex data.

If you have a modern card (>=2.0), you can feed the tbn matrix to the pixel shader, and transform the normals there. Otherwise, you can transform the light vector per-vertex using the inverse of the tbn matrix - you'll lose positional precision this way, but it works with simple pixel shader profiles.

Share this post


Link to post
Share on other sites
Hi there bengaltgrs,
How are you doing?

The Problem
Specular bump mapping tutorial.

The Solution
I would just like to add from where nik02 left off by saying that I have a sample of bump mapping on my site in the form of a normal mapping tutorial which is a bump mapping technique.
Normal Mapping tutorial


For other interesting reading look at
Steep Parallax Mapping

Share this post


Link to post
Share on other sites
Quote:
I have a sample of bump mapping on my site in the form of a normal mapping tutorial which is a bump mapping technique



I looked at the tutorials and they definitely have some important information to know in there. I was wondering though, if you could tell me how to use the HLSL shaders in C++, or at least point me in the direction of a good tutorial. Everything I have seen on HLSL just explains how to write HLSL, very little on the actual C++ code needed to use HLSL and apply it to objects. I feel like I understand HLSL better from the tutorials, but like I said, it is not too helpful unless I know how to do the C++ part to use the HLSL. (I am sure there have got to be tutorials on the web somewhere on this, I just cannot seem to find them.)

-Chris

Share this post


Link to post
Share on other sites

This topic is 4482 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this