PBR - Fast Material Conversions

Some times it is not possible to make a full and proper rebuild of an asset, and we just need a quick and dirty conversion of the textures involved.

This article considers how to convert old materials to PBR materials, at the very basics of what is required.

Material Editor

Using the material editor, you should be able to change the shader and the textures assigned largely hassle free, not requiring a new export of the object. Unless you change your uvw requirements.

Existing Shader

First of all we need to consider the maps that our current shader has. If our shader does not have a specular map, normal map or ao map we can just set static values for these. If they do have these maps we have to ensure they are sensible. 

Additionally we will most likely need to rename textures to match naming conventions to allow our tools to correctly save them. This will also help reduce re-save compression if you decide to revisit the maps.

New Shader

In general you should be able to use IBL Standard on most objects although IBL Standard Blend maybe required in some situations. This guide is primarily aimed at props.

Albedo Maps

Albedo Maps when converting we need to consider our requirements. Old maps were authored to a lighting setup which was not balanced correctly. This meant that maps could not have values higher than 200 or so. They also often have really really dark albedo colours.

For PBR, we want to keep assets ideally in the range of 40 to 235. These are physically correct albedo ranges. However often by just modifying the existing assets we can not achieve this perfectly.

The recommendation for these types of maps is to clamp the inputs and adjust the gamma. And then set outputs of 40 to 235 if you can manage it, if appropriate. You may need to adjust how much clipping you have or not on the input levels.

Finally make sure you name your texture following naming conventions.

Ambient Occlusion Maps

With ambient occlusion maps you need to check that they are genuinely AO maps and not some other shading. If you do not re-calibrate these correctly you will end up with very dark ambient shadows and a not correct scene.

If you suspect you map is not calibrated correctly, as shown beneath, you have a few options.

Firstly you can adjust the levels and the mid gamma point to try to adjust the occlusion masks better.

Secondly it could be worth rendering a UV mask so you can see which parts are actually used and which not, so you can adjust the levels appropriately. Try removing the alpha masked areas and then apply a solidify filter in Photoshop once finished tweaking.

Beneath is a correct map, anything with no occlusion is pure white.

Usually you can use the AO for both the AO and Specular Occlusion. (Spec = Red Channel, AO = Green channel of AOS Map).

If you wish to rebake AO it is possible to do so quite quickly from an fbx file in Substance Designer.

Metallic Roughness Maps

The combination of Roughness and Metallic maps have replaced the specular map and settings of old shaders.

First we need to consider the requirements of the shader we are converting from. If it has any parts that are metallic we need to build a mask for that.

We can usually do that by colour selecting or drawing selections over the albedo map if worst comes to the worst. If we do not have any metallic sections on the material, then we can put the roughness map into the alpha channel of the albedo if there are no roughness requirements.

We can generate a roughness map from the Specular map. But first we should check if the Specular map is actually a Specular map or just a levelled albedo map. There is no point in converting the map beneath to a roughness mask, because the surfaces are all the same and would have the same roughness value.

If we do have a useful specular map, we can invert it, and then clamp the values via levels to the approximate range of roughness we wish to have. For example:

If we do not have a useful map, we can either use a grunge map and uniform mapping of some kind, or just simply disable the map input altogether and set a static roughness value.

Normal Maps

The requirements for normal maps have not changed. You should just be able to reuse your old ones. However if you wish to reconvert besure to rename the texture appropriately.

If the shader has a blank normal map applied, you can just disable the normal map in the Material Editor.