BTEC Games Design - Level 3
Creating a material in Unreal
By Dave Johnson
A material is basically a coloured paint that you can apply to an object in Unreal. You will need to tackle Blueprint material editors, which can at first seem confusing. However, understanding what each value means makes life simpler from the outset. So, here is what each refers to in the editor node:- Base Colour - Your colour, chosen from a colour picker. RGB value.
- Metallic - (Set to 0 or 1) - 0 is metallic, 1 is non metallic.
- Specular - How shiny a surface is - THIS WILL ONLY WORK ON NON METALLIC SURFACES
- Roughness - (Set to 0.1 to 0.9) - How much the light is bounced around from a surface and how cleanly - e.g, imagine how shiny a ball of glass is compared to a ball of chalk)
- Emissive - How much the material glows
- Normals - Lumps and bumps, identified by a separate bump map texture.
Colours are termed as floating point colours. To simplify this imagine a pixel. A pixel is made up of:
- R
- G
- B
- A (Alpha) - transparency 0 (0 = 0% transparent) - 1 (1.0 = 100% fully opaque)
Some other terms I refer to:
- Constant - Hold 1 and LMB
- Constant 3 Vector (Simple RGB Colour) - Hold 3 and LMB
With an understanding of these terms, we can go about making a material colour that we can apply to an object:
In the Content Browser, create a new folder called 'Materials'
In the materials folder, right click in the Content Browser. Choose 'New Material'. Name it appropriately. Double click the material to open it in the Blueprint editor.
Here's that editor node! All the terms are above in this post, so consult those if you're not sure. For a simple material, we'll only need to use a few of them.
Hold 3 and left click in a space. The Constant 3 Vector field should appear.
Double click it and choose a colour. Drag a connecting wire from the white pin to the Base Colour pin.
Next, metallic setting. Hold 1 and left click in a space. The constants field should appear.
Set it to 0 or 1 in the value filed under Material Expression Constant on the left. Drag off the white pin and connect it to the Metallic pin.
Next roughness. Hold 1 and left click in a space. The constants field should appear.
Set it to 0.1 or 0.9 in the value filed under Material Expression Constant on the left. Drag off the white pin and connect it to the Roughness pin.
Next Specular. Hold 1 and left click in a space. The constants field should appear.
Set it to 0 or 1 in the value filed under Material Expression Constant on the left. Drag off the white pin and connect it to the Specular pin.
Click save and then click go back to the Unreal editor viewport. Choose your object then just drag your newly created colour onto it to change it's colour.
Next post, how to change your colour to a texture.
No comments:
Post a Comment