Aztez Development Blog
11Feb/102

Conservative Texture File Usage

I though I'd elaborate on a good point that Matthew brought up in the comments section of my "Creating Structures In Aztez" post. When referring to to the way I created one single texture and then used it on many different objects he said:

"It should probably also be noted how fantastic this approach is from a technical standpoint as it cuts the number of textures being used down completely."

This was intentional on my part, and for good reason. Whenever the game engine loads up an environment it has to "dig up" all these different assets out of the games files and then display them: 3d models, materials, textures, animations, etc. The basic idea here is that the less assets there are to dig up the quicker loading is going to be and the smaller your games overall file size will be (in software development, the overall size of a collection of files is sometimes called a "footprint"). Allow me to visually elaborate why this is so efficient in the context of Aztez.

Now before you understand how awesome this is, you must first understand the nature of materials. A material is a set of instructions that are used to tell the game engine how exactly to display that texture in the game once it's on the object. Under the hood they they are really just text; like I said, they're simply a set of instructions. Because of this, they have no substantial footprint as they merely "reference" the texture files they use. This means that you can have 100 different materials all creating completely different visuals with only one texture file. Obviously, they are crucial tools in 3d.

In this case here you can see here that one single material is employing one single texture but it is still being applied to a whole bunch of different objects. There are only three example objects in this image but in reality many more objects use that exact material, and I'm using this very same same technique with other materials across many other different objects. Thus far, we are only using a tiny handful of texture files to create our environments and characters, but even when we are done we will still be using a significantly fewer amount of textures than your average 3d game.