(Tips/Guide) The most efficient way to store and use completed textures

Post ready.

Good to go!

//
You should probably not store textures this way until you have them done for whatever it is. For example, completed assets for animations, architecture stuff, or games in game engines that can take advantage of this.

What will these technique do? Make it much easier to manage the textures you need, reduce file sizes significantly without compression or more with little compression if you choose, improve performance in games, significantly reduce the number of textures you’ll end up having to deal with, and help in a significant way to avoid the texture limitations of CUDA.
//

/THE FORMATS/
I’m going to show you how you can easily take advantage of what I wrote in the notes above. In a nutshell it boils down to how image formats work and how you can use that information to best pack your textures. Off the bat, you should be using either .TIFF or .DDS as the format, .TGA works too if you are forced to use it for a game engine, but .TIFF has better lossless compression with “ZIP”, more options, and is a little faster.

DDS has lossless options, but the main reason you’d use this one is to compress it with dxt so that the textures stay at a compressed size in VRAM (cycles does not currently support this.) The visual compression seen with DXT5, (the compression format you should use) is pretty good and usually will look a fair bit better than jpeg.

You can not use most other formats as you need extensive control over all color channels and the alpha channel. Also the best possible compression for our needs, lossy or lossless.

/HOW DOES IT WORK?/

First
In the listed image formats you have access to 4 different color channels.
Red
Green
Blue
Alpha (which is actually just greyscale, not always used as RGB values can achieve black through white)

[pro tip]
You can actually have
5 different channels if you uses a colorspace like CMYK+A, but not everything will support that.


Second
A single mesh can have numerous UV maps, UV maps do not need to be packed into a square shape or the entire square. You can duplicate a UV, and squash one to fit on the left side, and the other to fit on the right side. Further you can duplicate it 4 times and put a UV in each corner. Just be sure it is placed properly and does not overlap.


Third
With that information about UVs and color channels in mind you can then actually combine MANY different textures into or two files! Why/how? Well for example, you can make a blank image that is 2048x1024 and paste one 1024x1024 texture on one half and the other on the other half. But what images textures go where in what channels? That depends on the kind of image texture.

-Diffuse map
-Normal map
Bother require RGB channels.

-Bump map
-Deformation map
-Specular map
-Glossiness map
-Roughness map
-Metallic map
-Cutout/Alpha map
-Curvature maps
-Ambient Occlusion map
Are all usually greyscale. BUT they do not need to be… The fact is they are not greyscale, they are uni-channel, meaning they only take one channel as they only need one channel to derive 255 values that are read by whatever program. In layman’s terms, they can actually be stored on ANY SINGLE color channel, not limited to just Alpha as you may have thought. This means that you can store 4-5 of these textures in a single file, and more if you use “double tile textures”.

Fourth
What are double tile textures!?
Well double is misleading, it can be a lot more than that. As I mentioned before with the UVs, you can make a 2048x1024 image and store 2 1024x1024 textures in it. You can increase the resolution in numerous ways to fit more. There is 1 important rule that helps you save space. If it’s an even number of textures use a grid, if it’s odd, use linear stacking. You’ll just need to make more UV maps in different parts of the UV space so that it fits for each tile.

grid, x=texture
x x
x x

x_linear stacking, x=texture
x x x x x

or(less ideal due to monitor aspect ratios)
y_linear stacking, x=texture
x
x
x

This ensures you don’t take up unnecessary space with null zones.

So basically you can store many more color textures in 1, and THEN use the alpha channel for the same number of uni-channel texture maps. This is very convenient as the program and you can refer to 1 texture for several maps. This is also faster for game engines, along with all that other stuff I mentioned at the top.

HOWEVER! Do not store a uni-channel texture over all three RGB channels, that makes it 3 times larger than it needs to be! You could instead store 4 or 5 of those in a second texture over all the channels, or in one of the tile spaces in a “double tile texture” but you want to optimize it so that you have all the channels filled that are possible so that you don’t have null space.


HOPE THIS HELPS!
~John

Moderation: Merged two threads together.

It’s done.
Sorry about the posting trouble. I hit a few keys on accident.