Stylized Rendering Materials

There are some special techniques which have been applied to Materials in the scene to help give the impression that this is a painted work of art come to life. Two key examples are the "floating brush stroke" effect that can be seen around the treetops, and another is the 2D-style foliage that always orients toward the player.

Most of the Materials created for this scene are actually applied via a Material Instance Constant . This allows for rapid property adjustments and tweaks without having to wait for the Material to recompile.

Floating Brush Stroke Leaves


To see this Material network, please locate and open (double-click) the M_Tree_Leaf_Base_Solid Material in the Content Browser.

Around the tops of the trees in the scene are what appear to be floating paint strokes which give the impression of leaves. These are made possible by way of a Masked Material combined with Temporal Anti-Aliasing.

The critical part of the network is the DitherTemporalAA Material Function. This function creates a dot (stipple) pattern that moves over time. When used as a part of an opacity mask on a Masked Material, they can keep the mask from appearing too harsh, allowing for masks that seem much softer.

Here is the tree with and without the use of the DitherTemporalAA node:

With DitherTemporalAA

Without DitherTemporalAA

However, it should be noted that this technique requires the use of TemporalAA, which is an engine feature that is active by default. It can be overridden within a Post Process Volume via the AA Method property, which is found under the Misc category.


Foliage Material


To see this Material network, please locate and open (double-click) the M_Grass_Masked Material in the Content Browser.

Scattered across the terrain is a series of foliage that, although flat, always faces the player. This behavior is defined in the Material by way of the World Position Offset Material input. This input allows for the vertices of a mesh to be edited through vector operations within the Material. Objects can be reshaped, resized, or in this case, can have their geometry rotated to face the camera.

The expression to handle this is found within the Face camera on 1 axis comment block.

Click for full size

Of particular importance in this network is the Custom expression node, which allows for HLSL code to be written for its input. Currently, it is performing the following math expression:

float2 output; 
float2 Input1; 
output = atan2 (In.y,In.x); 
return (output);

This is useful, but must be used with caution. The Custom node prevents the Material network from being collapsed, which is an internal optimization process. In effect, it makes this Material a bit less performant.