I’ve worked as an artist on indie games using Unreal Engine 4 for a little while now. It has definitely been a learning curve, but you’re fine once you get the hang of it. Although to save you a few headaches and many more hours, I’ve gathered five technical tips to get you started on the engine:
1. Brush up on your math
You don’t need to be a math genius, but the more you know the more interesting effects you will be able to created. For example a simple pulsing glow can be achieved by multiplying a constant 3 by a sine wave divided by 2 and finally adding 0.5.
To show that I am not a math genius, here is a simplified ‘formula’:
(Constant 3) x (Sinewave x 0.5 + 0.5)
2. Stop looking at your texture files as ‘images’
Realize that your images are basically a giant array for data stored on a 2D grid. Each pixel stores 4 values: your Red, Green, Blue and Alpha channels.
This will help you understand a bit better what a simple multiply or an add node does.
Depending on what you multiply it with the way it multiplies it differs. A ‘constant’ vs another texture will result in a different outcome.
But until you realize that each channel hold different mask, this might not make sense.
Looking at the channels individually they might make a bit more sense.
3. Material instancing:
Reuse code without needing to rebuild everything from scratch. This will require some planning up front. Use texture slots, variables, colours to easily tweak a material instance.
This gets useful if you add things later on as well. For example, if you wanted to add vertex animation to all the creatures that use the same Parent Material, you would only need to modify the Parent Material and it will get applied to all of the instances.
4. Create material functions to reuse pieces of nodes
These are basically ‘mini material instances’.
A material function is basically a way to create your own custom nodes.
For example in the material in ‘Tip 3’, the ‘glow’ node group could have been a material function.
5. General tips
- Use a model to preview the material by clicking on the ‘teapot icon’ in the viewport with an asset selected in the content browser.
- Press ‘F’ to focus on the model. (This works in most viewports, not just the materials window)
- Hold down ‘L’ and click+drag the rotate the light source in the material preview.
My most used hotkeys in the material editor (hold down hotkey and click to place nodes):
A – Add
M – Multiply
L – Lerp (linear interpolate, Blend value 1 with value 2 based on alpha)
O – OneMinus (invert)
E – Power
F – Fresnel
N – Normalize
1 – Constant
2 – Constant 2
3 – Constant 3
4 – Constant 4
T – Texture
U – Texture Coordinates
P – Panner
C – Comment (comment your nodes and/or group them together)