PBR - An Introduction / Authoring Guide

This page is all about authoring for PBR. A lot of the reference here is cut and pasted from external sources and put into a single place. See references at the bottom of the page.

This page is generic information and not adapted to the specifics of the rFactor 2 engine.


sRGB v Linear Values

The colour space for albedo maps is set to be in sRGB format. This means that the textures are sampled on a curve to allow more fidelity in the darker range of the texture. It is also important that all non albedo maps use linear values and export settings to ensure the maps are correctly read by the game. We have added extensive documentation through out confluence as to the type of texture different maps should be, and also even started automating the process of DDS file saving so that they are automatically saved in the correct format.

Colour Space Conversions

Should you need them, beneath are functions to convert from Linear RGB (0 - 255) to SRGB (0-255) and vice versa.

sRGB = ((Linear RGB / 255) ^ (1 / 2.2)) * 255
Linear RGB = ((sRGB / 255) ^ 2.2) * 255

Maps

  • Albedo - Base colors with no lighting/shading data. Most albedo values exist within the midtones. (sRGB)
  • Normal - High-res surface detail used for faking the lighting of bumps and dents. (RG)
  • Roughness - Defines reflective surface properties. (Grayscale)
  • Metallic - Determines if a material is a metal or dielectric. (Grayscale)
  • Ambient Occlusion (AO) - used to calculate how exposed each point in a scene is to ambient lighting. (Grayscale)
  • Opacity - Transparency. (Grayscale)

Albedo

Traditionally, artists used to ‘store’ lighting information in diffuse textures like ambient occlusion, shadow and reflection. The lighting is now decoupled and must be removed from the albedo texture. The lighting in the game will all come from the graphics engine. It is not intuitive for an artist to get what should be the albedo of an object. Albedo could be a “texture” (pattern) like wood, leather or a constant. With PBR, albedo is no more a simple color value but has a physical meaning. There are accurate real life values that can be used, and we should try to stick to these.

Calculating Values

It is important to verify that your values are correct. During the export process, albedo maps are saved as sRGB file formats, however the texture is not modified. So the colour values are already in sRGB format.

In Substance Designer, via our own Substance Utility Pack you can add a node named Albedo Median Check, to see the average value of the map.

In Photoshop the Histogram panel already shows the mean value automatically, just make sure you have luminosity selected. The median value is also displayed which can result in a more accurate reflection of the actual value of the material.

Removing the light information from diffuse textures / photographs

If you have sourced images from a site such as Textures.com you will need to remove the light information as we are now generating an Albedo texture rather than Diffuse.

A method to do this in Photoshop is as follows:

  • Duplicate the base layer.
  • Completely desaturate the new layer.
  • Invert it (Ctrl i)
  • Set the blending mode to Multiply.
  • Flatten the image
  • In this example of polished wood this process gives us the following:

The result is clearly much darker so now you must check the correct sRGB albedo value for the relevant material.

  • As detailed above, refer to the Luminosity values in the Histogram and adjust brightness/contrast until you have the correct value.

For polished wood the value is 101 which gives the following result:

Suggested Values

Beneath are various standard albedo values gathered from around the internet. They may not be 100% correct, but should be in the ball park. Remember, your map should have the sRGB value!

Dielectric Values
Ground, Sand, Rock

LinearsRGB
Carbon (Coal, forged iron)0.0459
Black soil, wet0.0880
Black soil, dry0.15107
Bare soil0.17114
Grey soil, wet0.1-0.1289-97
Grey soil, dry0.25-0.3136-147
Dry silt loam soil0.23-0.28130-142
Dry clay soil0.15-0.35107-158
Dry sandy soil0.25-0.45135-177
Dry salt cover0.5186
Wet sand0.23130
Dry sand0.4168
Yellow clay0.16110
Rock0.3-0.4147-168
Vegetation

LinearsRGB
Conifer Forest0.08-0.1280-97
Deciduous Trees0.15-0.18107-116
Tall Wild Grass0.16-0.18110-116
Short Green Grass0.2-0.25122-136
Grain Crops0.1-0.2589-135
Corn Field0.16-0.17110-114
Tea Bushes0.16-0.18110-116
Summer Foliage0.09-0.1285-97
Autumn Foliage0.15-0.3107-147
Tunda0.2122
Snow, Ice, Water

LinearsRGB
Melting Snow (Clean)0.6202
Ice0.5-0.7186-216
Ice, Sea0.3-0.45147-177
Ice, Glacier0.2-0.4123-168
Fresh snow0.7-0.9216-243
Water, sun near zenith0.0565
Water, sun near horizon0.5-0.8186-230
Asphalt

LinearsRGB
New Asphalt0.04-0.0559-65
Aged Asphalt0.1-0.1889-116
Wet Asphalt0.06-0.0870-80
Gravel0.13100
Concrete

LinearsRGB
New Concrete (Traditional)0.4-0.55168-186
Clean Cement0.55186
White Cement0.7-0.8216-230
Polished Concrete0.55194
Aged Concrete0.2-0.3122-147
Roofs

LinearsRGB
Tar & Gravel0.33154
Corrugated Roof0.1 - 0.1589-107
Red / Brown Roof Tiles0.1 - 0.3589-158
White Asphalt Shingle0.2122
Wood

LinearsRGB
Batten (fresh)0.35-0.42158-172
Batten (old)0.12-0.1697-110
Varnished0.13100
Tiles, Bricks, Finishings

LinearsRGB
Terracotta Tile0.28142
Brick0.2-0.4122-168
Sandstone0.18116
Plaster0.4-0.45168-177
Granite Gray0.3-0.4147-168
Magnesium Oxide0.96250
White Gypsum0.85236
Alabaster0.92245
Paint

LinearsRGB
Black Acrylic Paint0.0565
White Acrylic Paint0.8230
Coloured Paint0.15-0.35107-158
Misc

LinearsRGB
Forged Iron0.0459
Natural silk fabric0.35-0.55158-194
White Skin0.25-0.35135-158
African Tanned Skin0.15107
White Paper0.6-0.7

202-216

Rubber0.03153
Metallic Values

Metals have black diffuse albedo value and colored specular albedo. In metalness-roughness workflow, for metals (pixels set to white in the metalness map) the specular color and intensity is taken from the albedo map. Metals albedo values are between 0.5 and 0.98. Lower values are for matte, higher are for polished metal.

sRGB values are for reference and may vary slightly.

  • Iron: 198, 198, 200
  • Brass: 214, 185, 123
  • Copper: 250, 208, 192
  • Gold: 255, 226, 155
  • Aluminum: 245, 246, 246
  • Chrome: 196, 197, 197
  • Silver: 252, 250, 245
  • Cobalt: 211, 210, 207
  • Titanium: 195, 186, 177
  • Platinum: 213, 208, 200
  • Nickel: 211, 203, 190
  • Zinc: 213, 234, 237
  • Mercury: 229, 228, 228
  • Palladium: 222, 217, 211

Common Issues

Here are some common issues that come up when artists are authoring albedo maps:

  • Too much extra information in the map.

  • Maps too Dark

  • Too much contrast

  •  Finally, there can be too much occlusion. Macro occlusion is not going to work, however micro-occlusion which can’t be handled by the engine can be baked. The micro occlusion should not be dark but rather just a tint of the albedo as it is supposed to emulate a bounce of light.

Roughness

Roughness effect on Metallic materials.

Roughness effect on dielectric materials


The distribution of the deviated rays which are important for the reflection can be represented by a cone around the ideal mirror direction. The roughness texture controls the aperture of the cone and thus the blurriness of the reflection. The rougher the surface, the larger the cone. The roughness is the inverse of the glossiness. Sometimes glossiness and roughness are referred to as the microsurface value.

Roughness can be used to add a lot of detail and subtle lighting changes to the object.

Suggested Roughness Values

SurfaceValue (float)Value (integer)
Plaster0.86219
Wood0.68173
Glossy Plastic0.54137.7
Steel0.2564
Mirror0.00

Authoring Roughness Maps

It's important to note that Roughness maps are not the same as traditional specular maps at all, they change the type of reflection rather than the strength. That said, coming from a specular map, a brighter value makes a surface more reflective, the inverse happens with a roughness map.

It is strongly recommended that roughness maps are authored independently of albedo maps, in order to add subtlety and variation to the lighting of the object. 

Beneath are some albedo v roughness examples.

Tiles

Brick

Galvanised Steel

Tyre Stacks


Metallic

Dielectrics have a 0 metallness value and do not require a metallic map. If they are part of an asset that needs one, the non-metal portions should be black. Metallic map properties should represent the top layer of the material, like painted metal, which would not be metallic in this case. Most metals have a value of 1, and the metallic map is multiplied against the base color texture. See the Albedo section for recommend metallic albedo colours.

Ambient Occlusion

It is important that the ambient occlusion map is calibrated so that your levels are correct. You need to make sure that the coverage is accurate, and that fully lit areas have an AO of 1.0.

Failure to do this will result in Ambient Probes generating darker than they should.

Normal Maps

The Normal is the same as with traditional lighting model, as such extra guidelines should not be required.

That said it should be noted that normal maps should be generated from a height map in order to maintain the legality of the normal map. Manual editing is strongly discouraged. In a normal map, the RGB colors represent a “3 dimensional vector” – that is, a direction that light bounces off a surface. The vector must be of length 1. In practical terms, this means that the colors must balance in a certain ratio. If the colors in the RGB channel do not balance to create a “normalized” vector, the lighting will not function correctly. Therefore it is important that you not modify the RGB channel with a paint program; instead use a program designed to create normal maps.

The two components of a normal map squared and then added must be 1.0 or less. This means that a normal map that has a point with red = 204 and green = 204 is not valid, because when in a float 0.8^2 + 0.8^2 = 1.28, and is not a valid value for the lighting calculations. When manually editing maps, it is possible to cause these issues. They must be 1.0 or less, because the third component of the normalised vector is calculated by the remaining difference to 1.0.

The roughness texture is related to the normal texture in many ways. Both represent geometric features of a surface but at different scale. The normal variance of the normal map will have an influence on the roughness texture (a bumpy surface represented by perturbed normal should be rough for example). Additional surface imperfections like scratches, speckles, pores etc are added in the roughness texture.

Normal Map generation in Photoshop

It is possible to generate normal maps in Photoshop.  Bear in mind that the values of the grey scale version of the image are what drives the values of the normal map.  For this reason it is important to review these values first.

The process is destructive so first save your image as texturename_Nm.tga

Filter > 3D > Generate Normal Map...

The interface will then appear.  Use the Blur and Detail Scale sliders to get the result you want.  Moving the sliders updates the view on both the 3D object in the viewer and the original texture.  There is sometimes some lag in the update so tweak rather than furiously scrubbing the values (wink)

References