What is A Specular Map?
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
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.
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
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
Neither. It's a scalar, representing a coefficient applied to specular lighting at each point.
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.
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement