Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The first thing we have to do is set up Photoshop correctly. When working with Physically Based Shaders you have to be aware that you are working in sRGB color space on your monitor when painting a texturethe default RGB color space is sRGB. In sRGB space, a 50% mid-gray is not 0.5 or 127 but rather 0.5 raised by the inverse of gamma 2.2, which equals 187 in Photoshop. In a nutshell, the reason that sRGB is used is to avoid banding artifacts (and to use a conservative range of values to avoid misrepresentation on the typical non-calibrated monitor). In sRGB space you get more precision for darker colors to which the human eye is more sensitive. Before working on colors, please make sure that your screen is calibrated properly.

To achieve that, we have to go to "Color Settings". To get there we go to "Edit" and then select "Color Settings...". The RGB should be set to sRGB and Gray to Gray Gamma 2.2.

By default, Gray is often usually set to Dot Gain 20% which will result in a color transformation in the alpha channel. A In this case, a value of 127 will come into the engine as 104 in that case , which can cause inconsistencies, so please make sure Gamma 2.2 is used instead.

...

Here are the values for all the materials. To get the values "color" pick the swatches. Please click on the image to download it since it's a the .bmp source file (it is uncompressed and gives you the true values) and DO NOT color pick from the images here in the document since it's a .jpeg, meaning it's compressed and therefore it will give you the wrong values!

...

If you want to understand more about Physically Based Shaders and how they work, please see: Physically Based Shading.

...

The gloss maps have to be treated like a diffuse texture and customized according to it and in some occasions painted like one. If you don't use any metals or your asset has no metal parts, then we don't use a spec map at all.

All the gloss maps go into the Alpha Channel of the Normal Map.

...

In contrast to metal, non-metal has diffuse reflection; however the specular reflection is a lot weaker and less varied than for metal. Specular reflectance for non-metal is monochromatic (no color, just gray). Most non-metals reflect only a small fraction of the light as specular , - for most materials between 2% and 5%.

...

Another big thing to keep in mind is how gloss works and how it should be used.

Gloss defines the roughness of a surface. A low gloss value means that the surface is rough while a high value means the surface is very smooth and shiny. The roughness influences the size and the intensity of specular highlights. The smoother/glossier a surface is, the smaller the specular highlight will be. A more narrow/smaller highlight will at the same time be brighter in order to obey to the rules of energy conservation.

...

The most important maps for Physically based shading , are your gloss and normal maps. You should start texturing with those two maps alone, which will help you to define your surface, and then as a last step add your diffuse map.

...

Expand

As you can see the marble tiled floor is a very smooth surface with a mostly tight spec, a high and sharpened reflectivity. There are some sections which are not reflective, have a wide spec, and are therefore are not as smooth looking.



The big dark grey tile has a very wide spec, is not as smooth and has a very low reflectivity. By the look at the gloss map we can analyze why. As you can see most of the map is very light and bright. Where the tile is located you see that it's dark grey. This is the reason why that part is dull looking compared to rest of the tiles. Please pay also attention on how we're defining the cracks and dirt by adding localized darker areas. We also have a mid level of contrast. All this helps in conjunction with the normal map to define the material and make the surface more interesting, also making it more believable.



To set up our Shader correctly we need to set in the Material editor the Glossiness to 255 otherwise the gloss map will not work.

As for the Specular Color, you have some creative freedom in how high you should set it and what achieves the best look for the asset. The values it should be between 53 and 61 for non metals.

...

Expand

Stone is a very rough surface with a very low reflectivity and a very wide spec.


If we take a look at the gloss map we can see that it's pretty dark and muted. The level of contrast is not very high. All this creates a very low and unsharpened reflectivity, with a wide spec and low highlights. The material appears to have a high roughness.

If you look closely at the gloss map you'll see also that it has unevenness in light and dark areas. This helps to make the surface look interesting as it creates different values as light travels across it, helping in making it look more believable.

To set up our Shader correctly we need to set in the Material editor the Glossiness to 255, otherwise the gloss map will not work.

As for the Specular Color, you have some creative freedom in how high you should set it and what achieves the best look for the asset. The values it should be between 53 and 61 for non metals.

...

Expand

The sandstone brick material is also a rough surface with low reflectivity and a wide spec. It is though not as rough as stone.


Taking a look at the gloss map we see a muted map, with grey's greys in the mid to dark range. It is muted with a not high level of contrast and it represents a low and an unsharpened reflectivity, with a wide spec. But as opposed to stone it's not as dark and muted.

Again you can see how different values of grey help to make the surface look more interesting, as differences in specularity occur when it's hit by the light. This makes our material more believable.


To set up our Shader correctly we need to set in the Material editor the Glossiness to 255 otherwise the gloss map will not work.

As for the Specular Color, you have some creative freedom in how high you should set it and what achieves the best look for the asset. The values it should be between 53 and 61 for non metals.

...

Expand

As you can see the painted marble material is a fairly smooth surface with a tighter spec. You can also see as the parts where the paint has worn off, it's duller with lower and less sharpen reflectivity and wider spec. It also has parts where it has the opposite.

Pay close attention on to how the paint is actual actually visible on the spec (breaking the smoothness) , where the light hits it.


The general set up for this map is light and bright with greys in the mid to high range. We have a mid level of contrast with the . Tthe white speckles will break the roughness of the surface and the cracks, worn . Worn off and chipped parts will be rougher and therefore to be darker. That way we achieve the look and believability we're looking for.


To set up our Shader correctly we need to set in the Material editor the Glossiness to 255 otherwise the gloss map will not work.

As for the Specular Color, you have some creative freedom in how high you should set it and what achieves the best look for the asset. The values it should be between 53 and 61 for non metals.

...

Expand

As opposed to the unpolished marble, we have a very smooth surface, with a high and much sharpened reflectivity. The spec is very tight with high highlights.


To achieve that the way we need to set up our gloss map is very light and bright with some contrast.

By having through the map different values of lights and darks, we can break the spec, reflectivity and sharpness. This helps to make the surface to look more interesting and believable.


To set up our Shader correctly we need to set in the Material editor the Glossiness to 255, otherwise the gloss map will not work.

As for the Specular Color, you have some creative freedom in how high you should set it and what achieves the best look for the asset. The values it should be between 53 and 61 for non-metals.

Polished white marble bricks material

...

Expand

When a texture contains a part that is metal, we need to add color in the spec map to the metal part of it, since the metal will have a different spec color than the non metal parts. The gloss map in the alpha channel of the normal map, still defines the smoothness, reflectivity and tightness of highlights. But we won't control the spec color in the shader. We have to do it in the texture itself, to do that we have to take the values from the Physically Based Shading chart and add the color into our spec map.

In this case we use a dedicated spec map and our gloss map will still go into the ALPHA CHANNEL of the Normal map!

We have an example of how the texture of the spec map would look. In the color map of the spec we can see the gold parts having a yellow/goldish color. This makes the specular color that gets reflected yellow/goldish, which in this case is gold. As you can see the rest of the map is grey with a value of 55,55 and 55 for the non metal parts.

In the alpha channel of the normal map we still have our gloss map, which will define our reflectivity, smoothness and highlights. Pay close attention on to how white and contrasting the metal parts are.

We want the metal to have a high level of reflectivity, smoothness and tight highlights with some darker parts to break up the spec to and make it more believable and interesting to look at.

Please look also at the rest of the gloss map. We see that the surfaces are being defined by parts. There are parts of the object who which are rough , with low highlights, wide spec and low reflectivity.


Once the asset is in the engine we need to open up the material editor and set the specular value of the material to 255. This has to be done since the color map of the spec map is controlling the specular color and not the shader.

Please don't forget to set the value of the gloss also to 255 so the gloss map in the alpha channel will work.


Finally our asset will look like this in the game.

...

Expand

When a asset consists purely out of metal, we don't need a diffuse texture at all. Metals have no color and are defined by the color of the light they bounce back. Therefore we use our spec range sheet and color sample the metal according to it.

The gloss map in the alpha channel of the normal map, still defines the smoothness, reflectivity and tightness of highlights. But we won't control the spec color in the shader.

We have to do it in the texture itself, to . To do that, we have to take the values from the Physically Based Shading chart and add the color into our spec map.

In this case we use a dedicated spec map and our gloss map will still go into the ALPHA CHANNEL of the Normal map!


In the alpha channel of the normal map we still have our gloss map, which will define our reflectivity, smoothness and highlights.

Pay close attention on to how white and contrasting the metal parts are. There are two examples of the gloss map. We have an unpolished metal, with wider spec and lower reflectivity, and we have the polished metal with a whiter gloss map that gives us a tight spec and high reflectivity.

Once the asset is in the engine, we need to open up the material editor and set the specular value of the material to 255. This has to be done since the color map of the spec map is controlling the specular color and not the shader.

Please don't forget to set the value of the gloss also to 255 so the gloss map in the alpha channel will work.

...

Expand

Most of the metals you will encounter in the real world and in our game will be used, worn and even oxidized. We still don't need a diffuse texture at all. Metals have no color and are defined by the color of the light they bounce back. Therefore we use our spec range sheet and color sample the metal according to it. The gloss map in the alpha channel of the normal map, still defines the smoothness, reflectivity and tightness of highlights. We need to start out with this at first and really paint in the spots where the oxidization would naturally build. Those areas we want to have less gloss and less reflectivity.

As you look at rust in general you can see that there's still some glimmer coming through itself, please it. Please think about that, look at reference, and incorporate that into your gloss map. As mentioned before mentioned , with metals we won't control the spec color in the shader. We have to do it in the texture itself, to . To do that, we have to take the values from the Physically Based Shading chart and add the color into our spec map. What we need to look at is our spec map and texture it accordingly. We start painting with the base color of the metal, taken from the spec ranges sheet, and paint in the color of the rust or oxidization in accordance of our gloss map.

In the alpha channel of the normal map we still have our gloss map, which will define our reflectivity, smoothness and highlights.

After we're done with our gloss map we paint according to our gloss map our spec map, to get different specular color of the oxidization.


Once the asset is in engine we need to open up the material editor and set the specular value of the material to 255. This has to be done since the color map of the spec map is controlling the specular color and not the shader.

Please don't forget to set the value of the gloss also to 255 so the gloss map in the alpha channel will work.

Here's our final asset looks in game with the normal, gloss and spec map working.

...

Expand

One of the biggest things to take our visual quality to truly "next gen" is using subsurface scattering in the environments and the materials for it.

You have materials that have a bigger amount of subsurface scattering like marble and you have some who have less or none. Since the cost of using it is very low we recommend using it frequently. The only time you shouldn't use it is on pure metal surfaces. Sometimes a surface doesn't have a lot of subsurface scattering, but we still recommend using it with a very low value.

There are three colors of subsurface scattering we can use, : red, blue and yellow. The red color of the subsurface scattering should be use more in conjunction with skin on characters. The blue should be use more with ice, but it can also be used with surfaces to give it a colder look. The yellow is the main color it should be used for environments and its surfaces, especially on marble.

To show the difference better here are two screenshots of a marble pillar, the first without subsurface scattering, the second with.


To set the amount of the subsurface scattering you go to the tab and set the value to something it that looks good. Please be careful and don't set it too high since then , as it will look like wax. The recommendation is to go up on values by increments of .05. We have some degree of artistic freedom here.

...