For most games textures are a big part of them and can often make or break it. Whilst that’s not always the case its important to get a basic understanding on what is actually going on and how to properly utilise it!
From what I have observed it seems to be a bit of a dark spot, I haven’t managed to come across any full tutorials or explanations on how to get the most out of textures here yet. So I thought I’d share some of my knowledge I’ve gained over the few years in game development.
This thread is still WIP so some stuff might be missing!
To start things off I thought it would be appropriate to cover off some of the basics of textures and materials and just give a little info on some terminology commonly used.
Textures - At the heart of it, they’re just a big line of numbers which represent values of each ‘pixel’, these long lists are referred to as colour matrices, or a colour matrix. There are typically 3-4 of these matrix tables in an image file and each one represents a colour channel. Images are broken down into these 3-4 channels which are : Red, Green, Blue, Alpha/Transparency or RGBA. When put together they make up all the values needed to produce the desired image!
Materials - Materials are a more broad definition but can be summed up into this; Materials most commonly hold all the information such as the textures that will be used to make up the final result. And often some other values to effect other types of data which will effect the final result such as a ‘Colour’ value to change the colour of the resulting image. They are a combination of textures, values, sometimes even shaders!
- Colour matrix - Refers to the table in which pixel values are stored
- Colour channel - A colour channel is the matrix table assigned to either RGBA (They aren’t actually in colour and are just greyscale images but combined make a full colour image)
- Map - Commonly refers to a type of texture file
So, great we now know a little bit about how each are made-up as well as a few terms which can be handy when talking to others for debugging.
Lets go get our textures!.. but not so fast, what ones do we need? well, luckily for us Roblox has kept it pretty simple at the time of writing this. When it comes to just a decal/texture component in Roblox then only one colour image is needed. This is not the case however for SurfaceAppearance’s, you’ll notice that they want 4 textures. So lets cover off what each of those is whilst also giving a rundown on some other common types found in games.
Colour - This is contains colour data and is probably needed if you want the end product to look good! There are a few variations of this as listed below
- Albedo - Holds base colour info and usually will be solid colours with no diffuse shading added
- Diffuse - Holds the base colour info as well as diffuse lighting added on top, sometimes has AO combined as well
- BaseColor - This one is a bit tricky to explain as it has a lot to do with the workflow used, but just know it exists and if anyone wants to learn more on this map I’ll list a few resources that can explain it
Normal - These are very handy maps and tell light how to interact with a surface making it look 3d, they however do not actually make the object 3d! It is also important to know the types of normals
- NormalGL - This refers to the OpenGL format and can be recognised by where the ‘light’ is coming from. For this format it is Y+(bottom up) and the ‘light’ looks like it is shining from the top right!
- NormalDX - This refers to the DirectX format and can also be recognised by the ‘light’ direction, it is Y-(top down) and the ‘light’ looks like it is shining from the bottom up!
- Metallic - Used by Roblox for its SurfaceAppearance it is a greyscale texture with values usually 0 or 1. It is not ideal to have a value as 0.5 but can be done
- Roughness - Also used by SurfaceAppearance it is a greyscale texture with values anywhere between 0 - 1 and controls how light diffuses over the material (Makes it look smooth or matte)
These 4 are the main ones you need to know about when using SufaceAppearance, and are the only ones thus far that make an appearance in Roblox at this time. If you want to learn about the others such as; Height, Gloss, AO, Mixmaps, Specular, Displacement etc then I would suggest taking a read through Texture Types [Polycount.com] There are seriously loads and some of them are really interesting!
Regarding the Normal map format, while it is not directly required it is good practice to use the correct one with the correct software. Roblox uses OpenGL format so if you do have to decide between the two go for the OpenGL one. If there is only one then just use it unless it looks really wrong, in which case you will need to research how to convert normal maps! If I do come across a converter I shall link it [Here]
Ok, that was a lot to take in I’ll admit, so to summarize all the above;
Textures are made up of 3-4 large tables which tell the renderer what colour is what, on their own each channel is just a greyscale image but when combined make up the full colour image. The channels are RGBA / RGB.
Theres 4 texture maps you need to worry about, Colour, Normal, Metallic, Roughness. If there are 2 normal maps named something like ‘Normal_GL & Normal_DX’, use the Normal_GL one as it is most compatible with Roblox!
In the next part I’ll cover off texture resolution and understanding what size is best fit for your needs!