Materials and UVs
This doc goes into more detail on materials for game experiences in engines like Unity.
The previous tutorial looked at creating a 3D Asset in Blender with simple materials. As the number of materials plays a large part in how well the experience runs, especially on Mobile, standalone VR/XR, and WebGL experiences, we need to look at ways to reduce the number of materials (and polygons) as much as possible.
This tutorial goes into Materials and textures in order to use less materials so we can improve the quality, but also reduce the cost to performance.
Materials Overview
The most common approach to materials in game engines today is using Physics Based Rendering, or PBR. This allows you to adjust features like the metallic and roughness values so that you can have different matte, semi polished, polished, and/or metallic finishes, all in the one material using very few textures.
Texturing Overview
Texturing refers to applying an image, Texture, or Map to a 3D asset. Textures can set the different properties of a material such as :
Diffuse / Albedo - This is the color of the material.
Alpha - This is how transparent the material is.
Metallic - This is how metallic the material looks.
Roughness / Smoothness - This is how polished the material looks.
Normal - This is a more advanced version of a bump map, or a map that implies bumpiness to the asset by texture alone.
Emissive - This is how a material can glow.
Metallic and Roughness/Smoothness textures use grayscale to apply the effect. Black counts as 0, white counts as 1. And grey values for everything in between. This allows for very advanced results that can look very realistic.
Game Engine Considerations
Unity uses Smoothness rather than Roughness. This can be made by inverting a roughness texture in photoshop or similar application. Most engines and 3D Creation platforms use Roughness.
Game engines will usually optimise multiple greyscale images into the RGBA channels of a texture to save filesize. It is possible to add a metallic texture into Red, Roughness into Green, Ambient Occlusion into Blue channels for example.
The Standard Material in Unity using the Red Channel for Metallic, and the Alpha Channel for Smoothness.
Unwrapping UVs Overview
As Models are 3D, and Textures are 2D, we need to unwrap the UVs in order to tell the texture where to go on the 3D asset.
3D Assets are 3D with an X, Y, and Z axis. Textures are 2D assets with an X and a Y axis. To reduce confusion, we call the X and Y of the texture space U and V.
There are many different approaches to unwrapping UVs depending on the assets you are trying to create in order to reduce the filesize or drawcalls. Each of these is covered in the following tutorials.
Last updated