Difference between revisions of "JohnnyEnglish tutorial Working with UE4 Materials"

From Custom Map Makers Wiki
Jump to: navigation, search
(Material Instances)
Line 22: Line 22:
  
 
==Material Instances==
 
==Material Instances==
There are performance considerations for all elements of UE4 mapping, while the engine is very powerful a game with a rich enviroment and many player characters will require be required to draw things, calculate things and deal with network traffic on every tick of the engine and when we can reduce the load on what is required, the game will perform better.
+
There are performance considerations for all elements of UE4 mapping, while the engine is very powerful a game with a rich environment and many player characters will require be required to draw things, calculate things and deal with network traffic on every tick of the engine and when we can reduce the load on what is required, the game will perform better.
 +
 
 +
So we consider performance when we build the mesh by making it as simple as possible. We consider performance when creating collision, smooth simple collision will improve game performance, textures and other assets will also be optimized for performance.
 +
 
 +
So it makes sense to take the same approach to materials.
  
 
Material Instances are more efficient method of creating materials (FIND REASONS)
 
Material Instances are more efficient method of creating materials (FIND REASONS)
 +
 +
==Map Material Master==
 +
 +
For this tutorial we will make four concrete materials using textures.
 +
 +
For each material we'll use 4 textures to represent:
 +
 +
*The materials colour/pattern/albedo
 +
*The roughness or the material
 +
*The metallic (shininess) properties
 +
*A Normal map to represent small height changes on the surface of the material
 +
 +
I've included a set of textures with this tutorial, you can download these DOWNLOADLINKFORTEXTURES, unzip these and import them to the tutorial map '''Textures''' folder.

Revision as of 07:27, 12 August 2021

UE4 includes a very rich material editor, fortunately it's very easy to use and we'll use it now to start making all the materials we're going to need.

For this tutorial I've chosen to use a concrete theme and for the ground, a mix between sand, grass and pavement.

Let's start with a very simple Chrome material.

  • Right click inside the Materials folder, we created this folder earlier in the tutorial but if you missed/skipped that, don't worry simply duplicate this file structure and continue.
  • Create a new Material, name the material M_Chrome, the M_ prefix denotes, in UE4speak, that this object is a material.

Mat01.JPG

  • Double click to open the M_Chrome material to open it, right click in the Material Editor to add a Constant3Vector (Colour)
  • Set the colour to be white using the left side properties.

Mat02.JPG

  • Add a Constant, value of 0 and connect it to the Roughness material pin.
  • Duplicate that constant (Ctrl-W), set it's value to 1 or .8 and connect the pin to the Metallic pin.

Mat03.JPG

Material Instances

There are performance considerations for all elements of UE4 mapping, while the engine is very powerful a game with a rich environment and many player characters will require be required to draw things, calculate things and deal with network traffic on every tick of the engine and when we can reduce the load on what is required, the game will perform better.

So we consider performance when we build the mesh by making it as simple as possible. We consider performance when creating collision, smooth simple collision will improve game performance, textures and other assets will also be optimized for performance.

So it makes sense to take the same approach to materials.

Material Instances are more efficient method of creating materials (FIND REASONS)

Map Material Master

For this tutorial we will make four concrete materials using textures.

For each material we'll use 4 textures to represent:

  • The materials colour/pattern/albedo
  • The roughness or the material
  • The metallic (shininess) properties
  • A Normal map to represent small height changes on the surface of the material

I've included a set of textures with this tutorial, you can download these DOWNLOADLINKFORTEXTURES, unzip these and import them to the tutorial map Textures folder.