When you’re learning 3D and game art there will be a lot of new terms you’ll need to learn. One of those terms is channel packing. In this article I will go over why channel packing is important and I’ll show you how to set it up in Substance Painter so you can export your channel packed textures without a lot of hassle.
What is channel packing?
Channel packing, also revert to as “packed channels” is a way to optimize textures in your game engine. Digital images consist of 3 or 4 channels (depends if you use the alpha channel). These channels are Red Green Blue and Alpha. Or in short: RGBA
Every channel can hold a black and white image and together they form the whole image. In 3D rendering a lot of textures are black and white. Think about the metal, roughness, ambient occlusion and mask textures. These black and white textures can be stored in each of these channels. For instance:
- R = Metal
- G = Roughness
- B = Ambient Occlusion
- A = Mask
This way you now have one texture instead of 4 different textures.
Why channel packing?
Because of how a GPU calculates shaders you can only use a total of 16 textures in one shader. (with some tricks you can use more but that is for another day). Packing textures reduces the amount of textures you have to use so you are able to create more complex shaders.
Many modern games use something that is called “streaming”. Streaming means that textures and models and other data are loaded in and out depending on where the player is in the world. However, there is a limit to how many information can be streamed in. Packing textures reduces the amount of data significantly.
Than there is the workflow consideration. If you only have to manage a handful of textures it will be much nicer to work with.
Things to keep in mind
Make sure that you keep the order of your packed textures consistent throughout your project. If you divert from this it will be a lot of work to update your project to the new order.
When making use of channel packed textures use a lossless format. Examples of lossless formats are: PNG, TARGA and TIFF. These formats have the capability to compress it down to 16 bit. 16 bit refers to the amount of bits per channel. In most cases you will use 3 channels (RGB) and if you do the math this leaves one channel with 1 extra bit. This is the green channel. That is why in most packed textures that contain Metal, Roughness and Ambient Occlusion the green channel contains the roughness texture. The roughness texture usually has the most complex information of the three.
setting up channel packing in Substance painter
Substance Painter already comes with a lot of presets and there you can already see channel packing in action. As you can see in the Unreal Engine 4 (Packed) preset there is already an example of a packed texture with AO, Roughness and Metal.
So far I have only talked about packed textures for materials. But you can also use packed textures for masks when you’re making a more complex shader where you want to blend different tiling textures. Here is an example for such a packed texture. As you can see every channel has a different black and white mask.
To set this up and let Substance Painter export just one texture this is what you need to do:
Navigate to “texture set settings” and create 3 channels. If you’re using the alpha create 4. If you’re using ambient occlusion in one of the channels like I did in this example you still only need to make 3. You can preview user channels in the viewport with the dropdown menu.
Next you need to make a layer or fill layer. I usually go with fill layer and use smart masks to make my actual masks. My fill layer is pure white with a smart mask and below that layer there is a pure black fill layer. Both layers have everything turned off except for their respective user channel. In this case user0:
You need to make these two layers for every channel you have made. Once you did that and you applied your masks and are happy with the result you need to export them.
to export these user channels and let Substance Painter know they need to be packed together you need to make a new export preset.
Navigate to export textures from the file drop down menu.
Navigate to output templates and click the little “+” icon.
You’ll want to click R+G+B+A since we want to assign every channel separately.
Next it is a matter of dragging the correct user channels into the correct RGBA channel. When you drag them into respective channel make sure to click “Gray Channel”.
In my example I had the Ambient Occlusion mask in the blue channel. Ambient occlusion does not require a user channel you can just drag “Mixed AO” from the “Converted Maps” section into the channel you want ambient occlusion in. If you do not assign anything to the alpha channel and you’re not using it in your Substance Painter project it will not be packed so your final texture will only have RGB.
The final result of this packed texture looks like this:
This is what the final result looks like in Unreal Engine:
Conclusion
To know how to channel pack textures and mask is very important as a game artist I hope this article helped you in making your workflow faster and more streamlined. The example that I have used here is available on the Unreal Marketplace.
To reiterate:
- Channel packing is assigning grayscale textures or masks to RGBA channels.
- Channel packing is important for optimization and workflow.
- Use a lossless file format and keep in mind that the green channel contains one extra bit.
- Use user channels in Substance Painter.
- Make a custom export template and let Substance Painter do the work of packing the texture.
Also, I just launched a newsletter. You won’t be hearing from me every week because I just started out but I will promise to send valuable tips and tricks about environment art and 3D.