
Texture optimization is key in game development for improving performance.
One of these methods is to pack separate black-and-white textures such as texture masks, roughness, metallic or ambient occlusion maps into the Red, Green and Blue channels of one texture file.
In this post I will show you how to do this using Photoshop.
Start with 3 grayscale textures you want to pack. These could be:
Or any combination, as long as they are black-and-white and intended for linear color space.
Open all three textures in Photoshop to check their dimensions. Go to Image > Image Size for each one. In this example, the textures are 2K (2048 × 2048 pixels).
Here are the 3 texture masks I will be using to pack into a single texture:

Create a new file that matches the dimensions of your source textures:
Click Create.

This new document will become your packed texture.
Switch to the Channels:
The first texture now lives in the Red channel.

Repeat the same steps for two other additional textures for the Green and Blue channels.

To preview the combined result, click the RGB. You'll see a colorful mix, this is normal as each channel holds independent grayscale texture data.



In UE5, I've set up basic blend between 2 textures using a Lerp.
Then brought it the packed mask texture and used a Component Mask (converted to parameter) in order to let me select individual RGB channels through the Material Instance.

Test all the channels of the packed masked texture before using it:

Performance gain: One texture sample instead of three.
Common packing conventions (for ARM textures):
You can add a fourth map to the Alpha channel if needed, but this switches compression to DXT5 (higher memory use).
Master texturing environments and props with Substance 3D Painter in just 6 hours and learn everything you need to know to begin creating and using UE5 standard Material Editor for environments and props.
Home Terms of Use/Trademarks/Disclaimers Privacy Policy Donate About Contact
All content on this website is copyrighted ©2008-2024 World of Level Design LLC. All rights reserved.
Duplication and distribution is illegal and strictly prohibited.
World of Level Design LLC is an independent company. World of Level Design website, its tutorials and products are not endorsed, sponsored or approved by any mentioned companies on this website in any way. All content is based on my own personal experimentation, experience and opinion. World of Level Design™ and 11 Day Level Design™ are trademarks of AlexG.
Template powered by w3.css