Jump to content
  • Advertisement
Sign in to follow this  
vetroXL

What is A Specular Map?

This topic is 4283 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

Hi, I just purchased some models, and it came with a specular map. What do I do with it. I can't seem to take advantage of it? Is it like a bumpmap? does it hold normals? or do I just multiply it with the diffuse map? Any insight would be helpful. Thanks

Share this post


Link to post
Share on other sites
Advertisement
It's used with Per-Pixel lighting. It defines how "Shiny" a surface is and therefore the intensity at which light is reflected from it. That's my understanding of it anyway.

Share this post


Link to post
Share on other sites
Thanks Dom_152,

Ok, so, what do i do with it? I Guess the question I'm asking is the information in a specular map just a color or is it a vector like a bump-map?

Thanks

Share this post


Link to post
Share on other sites
A basic specular light contribution is usually calculated as follows:

halfvector = normalize(normalize(camerapos - primitiveposition) + primitiveposition - lightposition)
specular = (primitivenormal dot halfvector)specularpower * specularcolor

where primitivenormal is the normal of the current drawing primitive (be it a vertex or a pixel), specularpower is the power to which the specular contribution is raised (for "sharpening" the light) and specularcolor is the color of the specularity of the primitive.

Your specular map most probably contains per-texel values for either lightcolor or specularpower, or both.

Do note that the method I described is not by far the only method of calculating specular contribution, but a simple one for the sake of clarity.

Share this post


Link to post
Share on other sites
Thanks Guys, that helped! I was using it as the specularpower, I guess I just don't see the benefits of adding another texture to the mix.

Share this post


Link to post
Share on other sites
Quote:
Original post by vetroXL
Thanks Guys, that helped! I was using it as the specularpower, I guess I just don't see the benefits of adding another texture to the mix.

Certain objects really do have widely varying specularity. Also, since it's a scalar texture, it's often packed into the alpha channel of some other texture, thus not requiring much extra texture memory.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!