Procedural Surface Toolkit - Static Geometry Primer

Each parameter group is organised around a specific surface layer, or blending weight method, with the exception of the Core group, which controls global settings. Please note: when you can, boolean options should be set to the disabled setting as this can save a ton of instructions, greatly improving performance.


'Enable Tertiary Material'. When enabled, this setting will allow use of a third surface layer. This is significantly costly, but when used well can provide another level of detail. The Tertiary layer differs in one key regard from the other two, as it can be locked to the upvector, meaning the layer will cluster around surfaces facing the sky. Useful for snow or water, and takes into account the normals of the previous two layers to take into account extruded features such as brick walls or jagged rock.

'Final Desaturation' and 'Final Diffuse Scale' simply control the final base color saturation and brightness respectively.

'Use Specular', when enabled allows each layer to have its own separate specular term. This is quite expensive when used with Deferred Lighting as the shader needs to be rerun in full for each value. When off, this setting defaults to a neutral 0.5 rather than 0.0, as this is more physically correct. 'Use Metallic' is similar, disable when no layers need be metallic.


These settings control the 'Context' in which the surface layers will be blended, such as contribution of Ambient Occlusion and Edge Wear. '[Layer] Occlusion Degree' controls how much this layer will be affected by the occlusion environment, and '[Layer] Occlusion Power' controls the curve of the occlusion contribution, lowering this will increase the overall surface area affected and vice-versa. '[Layer] Edge Context Degree' determines how UV edges will affect the context, if this setting has been enabled in Core. Note: all degrees can be set to negative values to invert contribution. However, you can also just invert the particular context channel in Core.


This section covers each of the three layers, Primary, Secondary and Tertiary as the settings are all identical (unless specifically stated otherwise). Note: layers are not calculated in parallel, they each act as a physical surface layered above eachother. Feel free to create layers that are specifically designed to take advantage of this, for example a water Tertiary layer that emulates opacity by having a low final blending alpha.

'[Layer] Diffuse Base' is the first value at which the base color channel is calculated. Usually this is set to 0.0, but you can dampen the contribution of your inputted texture by having this set to higher values. '[Layer] Diffuse Intensity' is how much your diffuse texture will contribute to the base color. If your surface layer does not require a textured base color, you can disable these settings with '[Layer] Use Uniform Diffuse' which will then allow you to specify a uniform color to be applied. '[Layer] Map Tiling' controls the tiling of the calculated UVs used to sample this layers' texture maps.

You can define layer normal intensity with '[Layer] Normal Flatness'. A value of 0.0 will use the normal map unmodified, a value of 1.0 will completely flatten the normal and a value of 2.0 will invert the normal contribution. '[Layer] Roughness Base/Intensity' etc work in the same way as the 'Diffuse Base' value, only sampling the diffuse map's R channel as an emulated roughness value.

'[Layer] Use Height from Diffuse Alpha' allows you to save memory and performance if you take the time to package your height value as the Diffuse Map alpha channel. '[Layer] Use UVs' will use your model's own UVs to sample these textures, rather than calculating them on the fly.

These following two sections controls how this layer is blended with the layer below, and thus do not apply to the Primary layer. 

[Layer] Scratch and Grime

Scratch and Grime are two separately sampled values stored in each channel of a 'variationscratchgrime' mask, with the former occupying the Green channel and the latter the Blue. Two sets of UVs will be calculated for both Scratch and Grime separately in order to provide maximum chaos, so be sure to take advantage of this by setting both 'Tiling' values to very different scales. 4x works well, for example if you have a 'Scratch Tiling' value circa ~125 then a 'Grime Tiling' value of about ~500 will work well. How the two intensities play off each other is not an exact science, so be sure to play with these until you find something that works well for your surface.

[Layer] Alpha

These are the values that control the final blending for this layer. '[Layer] Alpha Power' controls the transition between layers, a value higher than 1.0 will be more immediate while a lower one will be smoother. '[Layer] Height Dependency' sets how dependent this layer is on the Height value of the layers below. This can be effective in creating materials that cluster or avoid the cracks and crevices of the layers below. And the final setting, '[Layer] Final Scale' defines the exact scaling of the final alpha value used to blend this layer with the previous ones and should usually be set to 1.0 as lower values will prevent the layer from fully expressing itself.