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
- 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)
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.
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:
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!
Ground, Sand, Rock
|Carbon (Coal, forged iron)||0.04||59|
|Black soil, wet||0.08||80|
|Black soil, dry||0.15||107|
|Grey soil, wet||0.1-0.12||89-97|
|Grey soil, dry||0.25-0.3||136-147|
|Dry silt loam soil||0.23-0.28||130-142|
|Dry clay soil||0.15-0.35||107-158|
|Dry sandy soil||0.25-0.45||135-177|
|Dry salt cover||0.5||186|
|Tall Wild Grass||0.16-0.18||110-116|
|Short Green Grass||0.2-0.25||122-136|
Snow, Ice, Water
|Melting Snow (Clean)||0.6||202|
|Water, sun near zenith||0.05||65|
|Water, sun near horizon||0.5-0.8||186-230|
|New Concrete (Traditional)||0.4-0.55||168-186|
|Tar & Gravel||0.33||154|
|Corrugated Roof||0.1 - 0.15||89-107|
|Red / Brown Roof Tiles||0.1 - 0.35||89-158|
|White Asphalt Shingle||0.2||122|
Tiles, Bricks, Finishings
|Black Acrylic Paint||0.05||65|
|White Acrylic Paint||0.8||230|
|Natural silk fabric||0.35-0.55||158-194|
|African Tanned Skin||0.15||107|
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
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 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
|Surface||Value (float)||Value (integer)|
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.
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.
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.
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