A look at UE4's approach new shading model and materials workflow
Developers are increasingly gravitating toward physically-based shading for high-end film and game production because it allows them to more easily author beautiful, realistic materials that hold up under all sorts of lighting conditions.
Unreal Engine 4’s new shading model and materials workflow offers developers a welcome reprieve from the tedious, expensive methods of the past.
Epic’s new materials pipeline helps artists leverage the power of physically-based shading in a visually friendly way. Materials are easier to implement than ever before, with support for numerous content creation methods that provide equally stunning results in-engine.
NODE TO JOY
UE4 materials take advantage of node-based visual scripting, and the engine is designed so that desired changes can be propagated throughout the game world in real time.
Whether a surface is constructed with one material or built via the layered method described below, materials in UE4 are kind to game performance, look fantastic, and give artists total control over aesthetics.
Take the UE4 Infiltrator demonstration, for example. The process Epic’s artists used to tailor the protagonist’s look greatly deviates from past techniques, particularly in terms of the character’s shader and textures that define the soldier’s appearance. Instead of using a small number of high-resolution textures for his diffuse, specular, and normal properties, a new layered approach defines the numerous materials that comprise his look.
The Infiltrator character is a blend of many material layers, each defining a generic real-world material type such as fabric, metal, rubber, flesh, and hair. Each layer is built separately and then blended together in the final shader, using texture masks to define which layer is visible on any given portion of his body. Some layers are fairly straightforward, such as the chrome used for items such as buckles, whereas other parts, like his flesh, are much more complex.
Another Infiltrator example is the hover bot vehicle. The base metal is physically defined in one material layer, along with a completely separate paint layer with its own unique physical properties.
In the final shader, the paint is opaquely blended over the metal. This blending is more complex than simply placing one texture on top of another because it also blends material properties such as how metallic, specular, or noisy the layers are. A final decal layer adds touches of detail independent of the other layers, allowing for material changes while preserving the vehicle’s more subtle, finer features.
This evolution in materials is especially significant because layers can now be painted on at the pixel level, as opposed to the traditional method of applying changes to individual polygons. This can save lots of man hours, especially because UE4 assets can be edited, saved, and shared on the fly.
Since materials can now be mapped per-pixel, artists have the ability to change that mapping at runtime. Consider a tree in which one material defines bark and another defines char as the tree burns. An artist can change the mask at any time, and the char can simply appear where it’s needed during gameplay.
BARK UP THE RIGHT TREE
The benefit to this approach is multifold. Since artists can abstract away individual types of materials – for example, tree bark versus wood char – there is no need to overcomplicate a single material network by defining several different types within one material, which is what older methods require. This technique yields materials that are inherently simpler because they can be created faster and are easier to edit down the pipeline, if necessary.
To see examples of the new UE4 materials pipeline, visit epic.gm/ue4mats.