The Standard Blend Shader, extends on the Standard Shader and allows the blending between two materials, on Albedo, Metallic, Roughness and Normal inputs on optional blend data. This can be used to set up effects where we wish to take two sets of data to produce output, or just blend two materials together.
You can find the technical reference for this shader here: IBL Standard Blend Shader.
I recommend that you read PBR - Using Standard Shader before proceeding with this article, as I do not cover items again which are covered there.
The main purpose of this shader over Standard shader is Blending! Switching from one input to another, either everywhere or in areas you choose!
Each of Albedo, Metal, Roughness and Normal now has a function option in Shader Configuration. You can use these to configure the behaviour of blending. Note that only Switch and Overlay are available for Normal Maps.
These options can be used for the following reasons:
If you have enabled a function on an input, you can still enable or disable map inputs. When you disable the map input, a "Base Material" Parameter section will appear and allow you to set static values for this input instead. Remember only enabled maps will appear under the texture section.
For the maps you do have enabled you can configure which UV they use on a per map basis, the same as explained previously for the Standard Shader.
By default, the blend options you setup will occur everywhere. But you may not wish for that to happen. You should scroll down to Blend Mask setting in the Shader Configuration and take a moment to look at the options available to you there.
These are self explanatory, there are options to use Vertex Alpha, Vertex Color Red Channel, AlbedoA Alpha Channel, AlbedoB Alpha Channel or a dedicated Blend Map's red channel.
For a practical example of using a blend mask see "Using Standard Blend to Paint Different Parts of an Object" beneath.
Through the use of two sets of UVW and the Standard Blend shader, we can keep a clean decal texture for advertisements that can be used everywhere, and we can either atlas our "profiles" (a set of multiplication, ao, metal rough and normal maps) or have unique materials for each type. The profile will setup the profile of the ad, i.e. canvas or on a sign etc as well as add grunge and dirt to the decal.
In the Shader Configuration,
When looking at the textures used, we have a multiply map which is used to add fine detail to the albedo map. This contains details such as a canvas style pattern and some general noise, ground dirt etc. This should be predominantly pure white, with shading added as appropriate.
The AOS, Normal and Metal Roughness maps are all setup too and use the same UVW as the multiplication map.
We setup the UV B for this section so that the entire object fits vertically. Horizontally, we can scale at a different rate to the base Advertisement Map if that's appropriate. For these panels it isn't, but for creased canvas draped over the Armco it can be, and that'll break up the tiling by being offset at a different rate.
This example does not allow for areas not to use these details. We are applying this whole set of details on every face used. To be selective about where we apply the advertisement decals either:
We can use the Standard Blend shader to allow us to setup multiple variants of the same object with different colours, and if we wish even adjustments to metal / roughness too, all in the same material. This means we can quickly have many different variations of the same prop, which all use the same material, reducing texture overhead, and allowing the merging of objects into groups with out requiring many more draw calls.
The use case for this so far is some generic buildings at Circuit d'Azur and also the Crane which we introduced at Circuit d'Azur.
In order to do this:
Voila we now have different sections of the truck painted in different colours!
You can see the shader configuration beneath.
And here are the assigned maps.
With the alpha masked area in the albedo map, please make sure that it is not too dark. You want this to be setup with unshaded sections completely white, in order to take correctly the colour information.
For bonus points we can also setup modifications to the Metal and/or Roughness maps too. Say we want the red to be more reflective, or we want a metallic effect on one of the colours.
To just modify the roughness:
To modify the metallic and roughness values of the material:
This example shows how we can work in high and low frequency details much better now with the Standard Blend shader. A prime example for this is when setting up gravel traps.
Previously, it was necessary to sacrifice one of the two, but now we can have normal map, roughness details from both high and low frequency working in, so that individual stones have a profile, as well as the raked natural of the gravel showing through too.
The edges are done through a second decal material, giving us these nice patterns.
Here we have authored low frequency maps for the A set of Maps, which use UV A. The first set of maps is setup to have the general profile of the terrain, with Albedo, Metal Rough and Normal maps, these set out the grooved nature of the gravel trap.
Then a second set of generic high frequency detail maps are authored. This has an overlay map with the majority of colour information removed, in the alpha channel is a roughness overlay, and additional Ambient Occlusion, Specular and Normal maps.
Then we hook these all up to overlay functions. We can ignore the metallic function since we have no metal in the object.
We are using WorldPlanar mapping on the detail maps to make sure there are no mapping distortions too.