BGMC: Using R,G, and B channels to make smaller textures!

This as my first tutorial, so I’m sorry if its clunky or poorly-written.

This is about keeping your game(s) small, by combining RGB channels from different images. Its primarily written for BGMC (Your game has to be under 12 Megabytes) but others may find it useful for different projects too.

Step 1:
Gather your Images.
I’ll be using my profile pic, and two screenshots, but you can use any images. (Like textures. Keep in mind this works best for textures like rock and grass, where color is more-or-less uniform throughout.)


Step two:
Open GIMP. Put all of your textures in 1 images as layers. The must all be the same size, but you can use GIMP’s scale tool to do that. I’ll be using 512 X 512.

Step three:
Use the “Desaturate tool” on all three images. (Colors -> Desaturate) All of your layes should now be greyscale.

Step four:
Set the opacity slider (on the top of the Layers menu) to 50% for the top layer and second layer. Only the bottom should be fully Opaque.

Attachments




Step five:
Select your bottom layer, go to Colors -> Colorify. Select red. The bottom layer should now have a red tint. Do the same for the next two layers, using blue and Green, respectively. Save your image.


Step six:
Open blender, and create a new material with nodes, shadeless. Open the node editor viewport.

Step seven:
The node setup is simple. Connect the geometry node’s UV output to your image’s vector input. Put your image’s Color output to a separate RGB nodes input. Than put either the R,G, or B node to the material’s color property. The image displayed is based on what color you colorized each layer.


Using this strategy, you can put three somewhat high resolution textures into 1 image file. I’ll post the second part, colorizing the images in Blender, soon. (Its basic, just mixing vertex colors and the image)

Attachments



I used a trick very similar to this for masks on a project I did a few years ago. I was running out of GPU memory and it let me stack 4 channels of masks (RGBA) into an image. Very nice to see it documented and shared with the community!