Monday, June 8, 2015

UE4 - Material Blueprints

Materials in Unreal Engine 4 are one of my favourite parts of using this engine. They are incredibly simple to create and apply, using the same Blueprints visual scripting system that's used to code anything in the engine.

I think the best example of this is creating a glass material. In any other engine or modelling program, to create quality transparent and reflective glass could take a lot of messing around and playing with different variables, as well as adjusting the world render settings. However, in UE4 I was able to create this glass material in minutes, on the first attempt, in Blueprints without messing around with any other settings.


As you can see, the glass material is perfectly transparent and even has a nice reflective shadow when applied to this 3DS Max exported asset. There is a bit of a problem along the curve of the glass object at the top of the asset, but this is caused by the geometry from 3DS Max, and is easily fixed.

In Blueprints, the glass looks like this:


We apply a base colour, and change the settings of the material itself from "Opaque" to "Transparent" under the material Blend Mode (makes the material able to be transparent). We also change the Translucency Lighting Mode from "TLM Volume Non Directional" to "TLM Surface" (changing it from lighting being calculated for volume, to calculated for a surface). This is all learnt from the UE4 Document.

Original Settings


Adjusted


I then applied a metallic finish to it to give it the reflectiveness, and set roughness to zero to increase the reflectiveness, and then set Opacity to a value of my choosing, here 0.4. All of these variables are easily adjustable, and when saved, apply automatically to materials already applied in engine.

I also created a variety of other materials using the same approach:


This is the yellow exterior metal used on the cabins. Here I made it shiny by multiplying the Alpha value by 1.3 and applied that as roughness.


A simple material for the excavator chair. Here we took a sample texture and applied roughness. For this we could create a normal map in Photoshop to give it more realistic texture.

The results of these materials can be seen in the photos under "UE4: Danger Zones in Site Model".


0 comments:

Post a Comment