Specular lightmaps to define material's shininess
This mesh actually is composed by 2 main sub-meshes: the human and his armature.
We should set some shininess to the armature material but no shininess to the human sub-mesh.
This can be easily done in Blender and most 3d editors, but in some engines like Unity it is very hard or impossible to apply different materials to different parts of a mesh.
A solution in those cases would be to take advantage of multi-texturing and apply 2 textures to the mesh
(source: http://wiki.splashdamage.com/index.php/Basic_Texture_Overview)
1- the diffuse texture which defines the basic image
2- the specular map which defines the shininess value at each area of the mesh
What i don't understand is why many specular maps i see around are coloured? I thought they should be in 8-bit greyscale to indicate just how shiny the material is (0=no shininess, 255=maximum specularity).
For example here http://wiki.splashdamage.com/index.php/Specular_Maps you see a specular map for a door, which has a light grey color on the metallic parts because they are shiny, and that's correct, but the rest is wood and it is blue instead of black(no shininess) or dark grey (low shininess), why?
I think the color here indicates the specular color of the material, but in that case the wood would have a blue reflection against the light which is definitely not realistic.
Another sample colored specular map: http://image.slidesharecdn.com/les2-game3d-texturingmaterials-120227044952-phpapp02/95/les-2-game-3d-texturing-materials-24-728.jpg?cb=1330318379
Any info on this please? Thanks!
I think the color here indicates the specular color of the material, but in that case the wood would have a blue reflection against the light which is definitely not realistic.
This is one of the reasons we have a new hype, called PBR = physical based rendering. In previous rendering ages artists tried to fake realistic materials by tweaking things like colored reflection on wood etc. The rendering techniques used were not really realistic and with some fake the artists could create the illusion of a more realistic materials.
"New" is, that the rendering engines try to use a rendering technique based on physical properties, so that realistic materials can be created with more realistic parameters. Instead of using a colored (fake) specular map, you would use an albedo (for color information only) and a monochrome specular channel and hope that the rendering engine will handle it in a (more) realistic way.
I think, that most modern engines like the newest version of unreal, crytek and unity, will use PBR now.
Ashaman73 is correct of course, I will just elaborate a bit.
First you should know that specular highlights are a product of the shader not the light, yet it simulates the light source on the material.
Second is that the blue specular map is a old trick, like seven or eight years old.
The problem was that the material could take input from more than one texture but could only show a single texture on the object, so textures had to be blended into a single out texture.
The basic way doing it was to take the diffuse and add the white specular texture to it, if you used a yellowish wood the end result would have been some thing like this: 0.8,0.6,0 + 1,1,1 = 1.8,1.6,1 the result would then be normalized but still have a slight yellow color to it.
This work because some materials do absorb more light and as a result reflected a bit more of there own color, however these factors depended on how rough the object surface was not on the color of the diffuse light. Wood had a hard smooth surface and reflected most of the light at the specular point, yet the light was yellow not white as it should have been. To fix this artist made the specular a slight bit blue and found that if they added a lot of blue, they could cause a slight blue tinge to the specular light.
This was the birth of the specular color map, a artist could add blue for outdoor lighting, yellow for indoor light and the color of a metal object to the specular for a realistic look.
Shaders improved and the only reason to add a specular color map was for effect.
However the problem was that now artist needed to use more textures to get a better material, games that depend on performance couldn't allow a diffuse, normal, specular intensity, specular color, gloss, emissive, displace, alpha, Fresnel, reflection, subsurface scattering and ambient occlusion for every object.
Artist mixed texture maps to save space, specular intensity and color where merged and gloss plugged into the alpha channel. The problem now was that metal needed a bright intensity but a dark color and couldn't have both.
The new PBR materials allow the artist to state how much of a metal the object is, this then adds the correct amount of reflection color to the object based om the color of the albedo map, needing less textures for a realistic material. Color correction is now done with post-processing.
I'm using Unity and i learned to use the Specular shader which basically takes:
- a single texture with the color info taken from RGB channel and specular power taken from alpha channel
- a specular color parameter which applies to the whole mesh
So that requires you to know what is the correct specular power of all materials in your mesh (for the soldier example, skin, clothes and iron), but that info is freely available on the web anyway.
The Specular shader is somewhat "legacy", now there is the new Standard shader which supports PBR, but i still don't know how to tell that shader to use different material settings to different parts of the mesh, mainly because when you put a mesh on the scene, it only lists the whole mesh without the possibility to expand its submeshes so you can't select a submesh to apply a material to it.
Well i think for multi-material meshes i'll stick with the ol' good Specular shader and for single-material meshes i'll use PBR - Standard shader
The Specular shader is somewhat "legacy", now there is the new Standard shader which supports PBR, but i still don't know how to tell that shader to use different material settings to different parts of the mesh, mainly because when you put a mesh on the scene, it only lists the whole mesh without the possibility to expand its submeshes so you can't select a submesh to apply a material to it.
That is is the reason that these are called maps and not textures.
When looking at your UV map you will see that the metal objects occupy some space and the rest of the model occupies some other space. You can make a gray scale texture that tells the shader that the pixels under what part of the UV should be how metallic. Just stick the metallic map into the metallic slot.(I don't use Unity so it could be that you need to edit the shader to allow a texture input.)
As a last resort, you can look into texture masks and use them to tell the object what part should have what material. However Doing so means that you will be using three materials instead of two.