212 Game Development and Simulation with Unreal Technology
Texture Coordina te: This expressions allows for the manipulation of the UV co-
ordinates of Texture Sample Expressions by outputting a 2-channel vector value.
You can use this expression in conjunction with other Coordinate expressions
such as Panner or Rotator expressions to change the tiling, dynamically mod ify
texture spaces, or operate on the UVs of a mesh.
TABLE 4.30: Texture Coordinate
Properties
Coordinate Index: Specifies the UV Channe l to use .
UTiling: Specifi e s the amo u n t o f tiling in the U d irection.
VTiling: Specifi e s the amo u n t o f tiling in the V direction.
Un Mirror U: If set to T rue, undoes any mirroring in the U direction.
Un Mirror V: If set to True, undoes any mirroring in the V direction.
Example Usa ge 1: To access the second UV ch annel of a mesh, you can cre ate
a Texture Coordinate and set its Coordinate Index to 1 – 0 is th e first
channel, 1 is the second, 2 is the th ird, and so on. Connect the output of the
expression to the UVs input channel of a Texture Sample expr ession.
Example Usa ge 2: You can app ly different values to the UTiling and VTiling
values of this exp ression and c onnect its output to the UVs input channel
of a Texture Sample expression to change the tiling of its texture. Values
grater than 1 will make the texture smaller, while values smaller than 1 will
make the texture expand along the U, V, or both directions.
Vertext Normal WS: This expression outputs the world space vertex normal. It can
only be used in material inputs that are executed in the vertex shader. An example
of such material is one that is using its World Position Offset cha nnel.
Usage: One example fo r this expression usage is to manipulate the size of an
object through the World Position Offset or the World Displacement
channels. This expression supplied the norm al vector of each vertex in the
world space. By multiplying the outpu t of this expression by a value, you
will be able to push or pull the geometry inwards or outwards along its nor-
mal vector at each vertex, thereby changing the geometry from the material.
This overview of the coordinate expressions in Unreal Eng ine 4 should have pre-
sented a convincing case in proving their power and versatility. In the next hands-on
work, Tutorial 4.6, we will learn how to utilize these expressions in creating aston-
ishing effects with no need for affecting th e geometry.