Materials in Unreal Engine 181
Outputs: These are links that p rovide the output values of the materia l expre ssion’s
calculations to other expressions or to the input cha nnels of a material node.
Preview: A small window th at shows how the value of the expression looks. It basi-
cally is a 2D bitmap of the values of the expression. If the expression is a constant,
the preview will show black or white, or a shade of grey depending the value. If
the expression is a vector, then this preview will be a color associated to the RGB
values of the expression . You may expand or collapse the exp ression by clicking
on th e Triangle icon on the Tool Bar of the Material Expression. This window
updates if the real-time update is enabled, or can be updated manually by pressing
space-bar on the keyboard.
TABLE 4.8
Frequently Used Categories of Material Expressions
Most Commonly Use d Material Expressions
TextureSample2D Scalar Param eter
VectorParameter VertexColor
LinearInterpolat e Fres nel
Mathematical Material Expressions
Abs Floor
Add Frac
Ceil Multiply
Cosine OneMinus
CrossProduct Power
Divide Sine
DotProduct Subtract
Texture Coordinate Material Expressions
TextureCoordinat e Panner
Rotator Time
4.6.1 PARAMETER VS. NON-PARAMETER EXPRESSIONS
Certain material expressions are parameters while other are not. A parameter makes
the value of the expression exposed to the run-time compon ent of the engine to allow
for it to be modified. On e of the most basic ways of using material parameters is to
create a Material Instance from the base material. The para meters in the material
instance will be available at level-design in the editor or at run-time to modify and
dynamic ally change.
To change the values of a parameter in a material expression, you must use its
Parameter Name. The p arameter nam e will be available to the run-time engine
to programma tically alter its valu e as well. For this reason it is important to set a
meaning ful Parameter Name for each Paramete r Expression in a mater ia l. If there
are mu ltiple material parameters with the same Parameter N ame, the engine will
assume them to be the same parameter. Changin g the value of one of these duplicate