UE4 Sign Construction Blueprint
When building out a level it is nice to have pre-made and configurable Actor Blueprints that allows the level artist to quickly add an asset or set of assets and just their look and feel to suite their current needs. This speeds the development of complex levels and allows level artists to spend time on more important development issues like game play.
Below is a overview Infographic that shows the complete Construction Blueprint with the supporting materials and textures. More about the double sided material used can be found here on the bottom of the page.
Below is the material and the parameters that have been exposed to the material instance that is used.
You can read more about how the material works here. The more complete material is being used here that has had damage added as well as controls for the metallic and roughness.
The parameters that will be used in the Blueprint must be exposed as a parameter so they have a named property to access in the Blueprint.
In this example the BP does not have control over the multiplier values for the metallic and roughness but could be easily added. It also does not have control over the back texture map but again that you be easy to add just replicating existing node and changing the property names.
First step is to add the static mesh plane that we have imported from your DCC application (Sign_01) that has the UV’s unwrapped 1 to 1, meaning the mesh completely covers the UV space. For the version that I have created it also has six segments across and down so the plane can be deformed to look like it has damage.
The next step can be done as you build the Blueprint and that is creating the variables that will be needed. The Components are listed already and we can press the +Variable button to add more.
Make sure that you set a Variable Name and Type. The type needs to be set to the necessary type that the variable will represent. In the case shown the type is Texture representing a one of the texture maps that can be changed by the level artist if needed. It has been set with a default texture. In this example we have two variable set to Texture, one to Material, three set to Integers, Columns, Rows and Index and for the damage both are set to float values.
You can also set the visibility for each of the variables. All should be set to visible in this case expect for the Material as we don’t want the level artist to be able to change it.
We want the level artist to be able to swap textures for the Base and Normal so if they have another set of signs to decorate the scene with they can. To expose the texture maps we first need to a Create Dynamic Material Instance set to the Material that we need. We then Set the Sign Material variable that was created and then set the material on the Sign_01 plane that was imported. From there we can use Set Texture Parameter Value nodes to set the textures that we will want as defaults.
Set Trim Index group is where the level artist can set the Index of the trim sheet they require.
A value of 0 returns the Stop sign, 1 will return the Yield and a value of 4 will return the XING sign. If the number of rows and columns change it will change the results that Trim Index will return for different texture map configurations.