Store 3 masks in one texture - BGE Tutorial | specular, ao and shadow

Today i will be going over a why to combine specular ao and shadow maps in to one texture for better storage and how to uncombine in real time to get your specular ao and shadow maps back

And I was using GIMP to fight out all of those. And to set alpha chanel I just put in a texture in output’s “alpha” and it will than bake it transparent? If so, than you should store 4 maps in one image;)

Great stuff! However, instead of 3 different textures to combine in 1, you could just combine the 3 into one, and then can split if required. To do that, you bake the resulting output you get!
@ Adrian: AFAIK, you can’t get the Alpha channel from an RGB texture, for that, we needed a split RGBA node! Maybe it can be retrieved directly from the texture node, let me check!
…later…: Nope, no can do!

The texture node has a “value” output - it is the alpha chanel;)

Thanks for the tips and kind words

This method is great! A lot of times you’ve already got AO and shadows baked together in which case this isn’t necessary, but it comes in handy that you could have AO and shadows to three instead on one with two textures less. This is so cleaver.

I may add a question: Does the filesize (also known as the quality in this case) demand more power of BGE? For example a .jpg that’s 30kb compared to one that’s 1mb? In both cases the images are 1024*1024. If so it may be better to save they as greyscaled imaged to save space and calculations.