# What is A Specular Map?

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

## 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 on other sites
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 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 on other sites
Neither. It's a scalar, representing a coefficient applied to specular lighting at each point.

##### 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 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 on other sites
Quote:
 Original post by vetroXLThanks 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 on other sites
Hmm.. ok that helps alot, spec-mapping does make a difference...
thanks

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

(You must login to your GameDev.net account.)

• 17
• 14
• 10
• 9
• 11
• ### Forum Statistics

• Total Topics
634094
• Total Posts
3015500
×