Currently, to bake shadows and AO, I create a texture of appropriate dimensions in the UV/Image Editor, bake to that and save it. This makes for a whole 3-channel image file, which for a 2048x2048 black-and-white texture even without alpha ends up taking up a whopping 12MB on disk, and is probably a cause for my horrendous load times and frame rates lately.
Since all 3 (or 4) channels’ values are equal in a black-and-white image such as a shadow map, AO map or specular map, we only need to use 1. If your material doesn’t use transparency, it would make sense to save it in the unused alpha channel of your main texture. If it does use transparency, it would still save a lot of space to create a single-channel texture, or create an RGBA texture and have 4 different objects’ materials share the same texture, each using a different R, G, B or A channel.
The shaders of other products such as Unity indeed use the alpha channel of your diffuse texture for, say, a multiply-blended specular map, allowing you to get it all in one texture efficiently. If such products’ users saw us here wasting space with all the channels of a separate texture, they would probably laugh at us.
To avoid being laughed at, how can we:
- Create a single-channel texture, or bake shadow/AO data to only 1 specific channel of a texture?
- Specify only that channel when sampling that image?
When creating an image in the UV/Image Editor window, you can check or uncheck Alpha, but I don’t see an option for black-and-white (ie. “R” channel only).