I need to create a gloss map for one of the assets for work but I am a little lost. I know how it works and what it does, its just that I am a little confused in how to paint it. Is it just flat colors ranging from white to black for different areas of the texture? Any links , examples or tips would be greatly appreciated.
-Art
Replies
http://forums.cgsociety.org/showthread.php?f=87&t=364120&highlight=specular+power+map
http://forums.cgsociety.org/showthread.php?f=87&t=364120&highlight=specular+power+map
So I guess it really is mostly flat colors and gradients.
<font class="small">Code:</font><hr /><pre>float NdotH = saturate(dot(N, H)); //raw specular level
float specularLevel = pow(NdotH, gloss);</pre><hr />
So we can see that, say we return a value of .5 for NdotH (saturated dot products are always between 0 and 1), and we raise it to the gloss power, we get:
if gloss = 2, specular = .25
if gloss = 30, specular = 0.0000000009
As we can see, gloss makes the specular power fall off exponentially. A high gloss makes a very tight highlight, a low gloss makes a very broad highlight.
Anyway, it seems like those links provide more than enough knowledge about the gloss of certain materials, so no need to go into that, I hope the code-understanding makes you a bit more knowledgeable about it at least.