Stylized Rendering Materials

An overview of the special case Materials used in the Stylized Rendering showcase included with UE4.


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.

Select Skin
언리얼 엔진 문서의 미래를 함께 만들어주세요! 더 나은 서비스를 제공할 수 있도록 문서 사용에 대한 피드백을 주세요.
설문조사에 참여해 주세요

새로운 언리얼 엔진 4 문서 사이트에 오신 것을 환영합니다!

문서 사이트에 대한 의견을 모을 수 있는 피드백 시스템을 포함해서 여러가지 새로운 기능을 준비하고 있습니다. 아래 Documentation Feedback 포럼(영문) 또는 언리얼 엔진 네이버 공식 카페(한글) 중 편하신 곳에 의견이나 문제점을 알려 주세요.

새 시스템이 준비되면 알려 드리겠습니다.

네이버 카페
공식 포럼