UE4 – Bump Map

Software:
Unreal Engine 4.21

To use a ‘Bump Texture’ in UE4, or in more geeky terms, derive Normal data from a supplied height map, use the NormalFromHeightMap Node.

Notes:

  1. The height map textured is supplied via Texture Object node and not Texture Sample, and is connected to the NormalFromHeightMap‘s Height Map input.
  2. A numeric vale is connected to the NormalFromHeightMap‘s Normal Map Intensity input to control the intensity of the resulting Normals/Bump.
  3. UV coordinates for the bump map should be connected to the Coordinates input of the NormalFromHeightMap node.

bump

 

Advertisements

UE4 – Animated texture using a Flip-Book node

Software:
Unreal Engine 4.18

AAA.gif

A ‘Flip Book’ node in UE4 is the way to create an animated texture using a Sprite-Sheet.
Its very simple to use:

  1. Import a Sprite Sheet texture containing the animation frames.
  2. In the UE4 Material, Create a Texture Object node, and set it’s Texture property to be the Sprite Sheet texture you imported.
  3. Create a Flip Book node and connect the Texture Object Node to its  Texture input.
  4. Connect numeric value constants to the Flip Book node’s Number of Rows and Number of Columns inputs to set the layout of the Sprite Sheet.
  5. Connect the outputs of the Flip Book node to the wanted material inputs.

Runner_Atlas

Untitled-1

The following example shows a way to create a custom Flip Book material to animate textures.
Q: Why would you do that???
A:
Well the truth is I created it without knowing there is a built-in option, and found out about the Flip Book node right after I finished my own.. 😀
But it’s also a useful example of locating tile coordinates within a plane..

Untitled-2.jpg

 

 

UE4 – Material Fresnel Node

Software:
Unreal Engine 4.18

The UE4 Fresnel node is actually a “Facing Ratio” node (aka Perpendicular / Parallel) with some extra control.
It basically allows controlling material effects according to the incident angle the surface is viewed at, which is a hugely important feature for designing advanced material effects.

Untitled-3

Exponent:
The steepness of the value / angle curve.

Base Reflect Fraction:
The value at perpendicular angle.

Normal:
An option to connect World Space surface normals input to affect the output of the Fresnel node.
* Tangent Space normals must be converted to World Space by using a Transform Vector node.

Note:
A value of 1.0 for the Exponent parameter, and a value of 0.0 for the Base Reflect Fraction will produce a linear “Facing Ratio” (“Perpendicular / Parallel”) falloff blend.

Examples of different values:
Untitled-3
Untitled-4

More info:
https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/HowTo/Fresnel/

UE4 – Material Transform Vector Node

Software:
Unreal Engine 4.18

The Transform Vector material node transform the supplied vector between different geometrical spaces according to your choice:

Untitled-4

Note:
This is useful in order to convert surface normals from Tangent Space to World Space to connect them as input to a Fresnel Node.