Alireza Khajehali: The Importance of Baked Shadows and Specular Maps

Alireza Khajehali: The Importance of Baked Shadows and Specular Maps

The artist continues his thread, giving us tips and tricks on PBR materials.

Environment Artist Alireza Khajehali continues his amazing thread on Polycount with a post on why PBR materials need baked shadows and specular maps. The artist is working on his own project called Our Ghosts of War, which is going to be a visual masterpiece, so his tips and tricks are definitely worth it. 

It doesn’t matter if it’s Megascans or what, once imported in game engine you get average looking materials. 

In Megascans library you’re looking at renders on surfaces with tons of triangles. Every tiny detail is in 3D and it receives shadows plus it casts shadow as well as generating AO. But once you import materials in a game engine it’s a different story. Your surfaces in game engines are low poly, your landscape surface consists of 2 triangles per 1 square meter. There are ways to overcome this. There is a false belief among some artists which is that in a PBR engine a none metal material doesn’t need a Specular map. Another false belief is that Albedo should be free of any shadows.

Your Albedo should be free of shadows, but not any shadows. Very small scale shadows or micro shadows are something that game engines can’t take care of and these shadows need to be present on the Albedo map. To get a better knowledge of what I mean by micro shadows take a look at the image below.

Such shadows if removed from the Albedo, would not be reconstructed by the render engine no matter if you use a separate AO map or not. AO maps have no effect when the surface is lit and they only work if thesurface is covered in shadows so you really gotta keep those micro shadows in your albedo maps. Some people tend to remove those shadows then use a separate Cavity map and multiply that by Albedo in the material editor, I don’t get the point of removing them and then adding them back with the additional cost of an extra Cavity map.

Now those micro shadows represent cracks or holes on the surface and basically those cracks or holes look dark because there’s not much light being reflected from there to your eyes. But wait a second, having a constant value as specular means the entire surface is reflecting light equally which in case of the example above is incorrect behavior as there’s very little light coming from those cracks and holes to your eyes so the specular value for the cracks and holes should be less than the flat areas.

I don’t go for a separate Specular map though as that’s unnecessary memory cost. But I can easily drive a specular map from the Albedo itself by running it through a clamp node with a min value of 0 and a max value of 0.5. (0.5 is the specular for most non metals). To further introduce some more variation on the produced specular map and make the surface look more interesting we can run it through a Power node to make it more contrasty before running it through the clamp node. This makes the surfaces look more real and even behave more correctly as now the cracks and holes aren’t reflecting light as much as the flat surfaces.

Here are some pictures showing the difference between a vanilla rock material and the material plus the calculations I mentioned above. You see the second picture shows much better surface representation.

1 of 2

And here is a comparison while looking at the Specular buffer.

1 of 2

The guide was originally published on Polycount.

Join discussion

Comments 1

  • guillermo gago

    great! thanks again for a new masterclass!


    guillermo gago

    ·3 years ago·

You might also like

We need your consent

We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more

Alireza Khajehali: The Importance of Baked Shadows and Specular Maps