Materials in Unreal Engine 225
To achieve more depth, we also adjusted the normal map a little. If you re-
member from o ur d iscussion of normal maps from a previous tutorial, e ach pixel
in the normal map repr esents a three-dimensional vector, perpendicular to the
surface at the location of the pixel. The R, G, and B, values of the normal map
pixels represent the X, Y, and Z values o f the normal vector.
The Z-value represents the len gth of the vector perpendicular to the surface,
if the surface were a flat plane. The larger the Z-value is in comparison to the
X and Y values, the mor e flat the surface will look like. In or der to m agnify the
3D look of our material we can multiply each channel of the norm al map with a
value. If the Red and Green channels o f normal map are multiplied w ith values
larger than the value multiplied b y the Blue c hannel, the resulting vector will
emphasize the 3D-ness of the surface. To ach ieve this, we mu ltiplied the (R,G,B)
channels of the normal map by (2,2,1). Since norma l vectors must have a length
of 1, we normalized th e result.
CREATE THE DYNAMIC MATERIAL
With our static steel panel mate rial created , we can now focus on making the
material dynamic. Unreal Engine ’s Coordinate material expressions are those
with the ability to interact with the c oordin ates of a mater ia l’s texture or geometry.
We can make our material dynamic in two different mann ers, either by changing
its geometr y or b y manipulating the way in which its texture is applied to its
geometry.
In this tutorial we opted to work with the texture to achieve the dynamic look.
We modified the texture tiling of our material by panning it across the surface on
which it will be applied. A Pan ner expre ssion is the perfect tool for this purp ose.
The Panner expression takes in as input a SpeedX and a SpeedY value. The
SpeedX specified the speed of pannin g the U-c hannel of the texture coordinate,
while the SpeedY controls the panning speed of the V-channel.
We used SpeedX=0.1 and SpeedY =0 to pan our texture on the surface of
the object along its U-channel. Co nnecting the output of the Panner coordinate
expression to the UVs channels of all of our texture sample expr essions will make
the material move across the object’s surface. Since our object is a round object
(we used the preview mesh of th e UE4’s star te r c ontent), the end result loo ks like
the object is rota ting along its major axes.
CREATE PULSATION IN THE MATERIAL
To make our m aterial look a b it more interesting, we made the grout between
tiles pulsate b etween a fire and an ice color/texture. The idea was pretty straight-
forward, much like the pulsation in Tu torial 4.5.
The pulsation network will be connected to the Emissi ve Color channel of
our material, and its textur e comes from the T_Flame_Tile_D texture. We used
the original texture as the fire and sub tracted it from 1 (1− the o riginal textur e)
for the ice. To confine the pu lsatio n to just the grout, we multiply the ice a nd
fire textures with the green ch annel of our T_Tech_Hex_Tile_M mask texture.