🎯 Mask Map HDRP Lit - Unity Shader Texture Packer
Welcome to Mask Map HDRP Lit - Unity Shader Texture Packer! 🎨🚀
This tool allows you to create a Mask Map and a Detail Map compatible with Unity’s High Definition Render Pipeline (HDRP) by combining different textures into a single RGBA image. Now with a modern, intuitive UI and advanced new features!

| Detail Map |
Unpack |
 |
 |
🖥️ Unity Workflow

From Unity’s documentation: Mask Map and Detail Map
✨ Features & Updates
- ✅ Three tabs: Mask Map, Detail Map and Unpack. Everything fits on one screen 🗂️
- ✅ Drag & Drop or click a preview / Browse… to load textures 🎯
- ✅ Invert channels with a single click (e.g. Roughness → Smoothness) ⚡
- ✅ Tooltips on every control explain what each channel does in HDRP 💬
- ✅ “If empty” value per channel: no need to create a black texture for non-metals 🎚️
- ✅ Real-time previews, with RGB and Alpha shown separately 👀
- ✅ Keeps the source resolution by default, or pick 256 – 8192. Non-square textures keep their aspect ratio 📏
- ✅ Export to PNG, TGA or TIFF 💾
- ✅ 16-bit textures (e.g. from Substance or Blender) are converted correctly
- ✅ Normal Map support: automatically extracts X (A) and Y (G) for the Detail Map
- ✅ Unpack any RGBA texture into its four channels, one by one or all at once
- ✅ Fully compatible with Unity HDRP for advanced PBR rendering 🎮
🎨 Mask Map Channels
| Channel |
Content |
If empty (default) |
| R (Red) |
Metallic ⚙️ |
0 (non-metal) |
| G (Green) |
Ambient Occlusion 🌿 |
1 (no occlusion) |
| B (Blue) |
Detail Mask 🔍 (where the Detail Map is applied) |
1 (everywhere) |
| A (Alpha) |
Smoothness ✨ (invert a Roughness map) |
0.5 |
💡 The B channel is the Detail Mask, not the Detail Map itself. The Detail Map is a separate texture that goes into the material’s Detail Map slot.
🧩 Detail Map Channels
| Channel |
Content |
If empty (default) |
| R (Red) |
Albedo (desaturated automatically) |
0.5 (neutral) |
| G (Green) |
Normal Y |
0.5 (flat) |
| B (Blue) |
Smoothness |
0.5 (neutral) |
| A (Alpha) |
Normal X |
0.5 (flat) |
💡 Every “If empty” value can be changed in the app (0 – 1).
📥 Download (No Python Required)
Download the standalone executable for your platform:
💡 Just download and run - no installation required!
🍎 macOS first launch: the app is not signed, so macOS may block it. Right-click the app → Open. If macOS says the app is damaged, run xattr -cr MaskMapGenerator.app in Terminal and open it again.
🔔 Updates
No fork or git needed. At startup the app asks GitHub for the latest release (it only reads the public release info). When a newer version exists, an Update available button appears at the top right: click it to open the download page, then replace the old file with the new one. Offline, the check is skipped silently. Your version is shown at the bottom right.
ℹ️ Versions up to v1.1.0 don’t have this check: download the latest release once by hand. To get an email for every release, click Watch → Custom → Releases on this repository.
🏰 Installation & Setup (From Source)
If you prefer to run from source code:
- Ensure you have Python 3.x installed 🐍
- Install the required packages:
pip install -r requirements.txt
- Run the application:
python MaskMapHDRP.py
🔨 Building Executables
To build standalone executables yourself:
- Install PyInstaller:
pip install pyinstaller
- Run the build script:
python build.py
- Find your executable in the
dist/ folder
🤖 Releases are built automatically: pushing a v* tag runs the GitHub Actions workflow in .github/workflows/release.yml, which builds the Windows and macOS apps and publishes a GitHub Release with the notes from CHANGELOG.md. Before tagging, set __version__ in MaskMapHDRP.py to the same version (e.g. 1.2.0 for v1.2.0): the workflow stops if they differ.
🎮 How to Use
- Open the Mask Map tab.
- Drag and drop a texture onto a channel preview, or click the preview / Browse… to select it.
- (Optional) Tick Invert where needed. For example, a Roughness map must be inverted to become Smoothness.
- (Optional) For channels without a texture, set the If empty value (e.g. Metallic = 0 for non-metallic materials).
- Pick the Resolution. Source keeps the size of your textures.
- Click Generate Mask Map, check the RGB and Alpha previews, then click Save… (PNG, TGA or TIFF).
- (Optional) In the Detail Map tab, use Load Normal Map… to fill Normal X and Normal Y automatically. For a DirectX normal map, tick Invert on Normal Y.
- (Optional) Use the Unpack tab to split an existing RGBA texture back into its channels.
- Import the textures into Unity (see below) and use them in your HDRP Lit material! 🏆

🧰 Importing in Unity
For both the Mask Map and the Detail Map, in the texture Import Settings:
- sRGB (Color Texture): OFF. These are data textures, not colors. With sRGB on, AO, metallic and smoothness come out wrong.
- Alpha Is Transparency: OFF. Smoothness/Normal X live in the alpha channel and must not be treated as transparency.
- Compression: High Quality (BC7) is recommended to keep the alpha channel clean.
📌 Notes
- Supported input formats: .png, .jpg, .jpeg, .tga, .tif, .tiff, .bmp (8-bit and 16-bit).
- Output formats: .png, .tga, .tif.
- Textures of different sizes are resized to the output resolution. If their aspect ratios differ, the app warns you that they were stretched.
- Changing any input after generating disables Save… until you generate again, so you never export an outdated map.
- If drag & drop is not available on your system, clicking the previews always works.
🚀 Contributions & Support
Found a bug? Have a feature suggestion? Open an Issue or a Pull Request on GitHub! 🎉
💬 For any questions or support, feel free to reach out! 😊
Need help or want to learn more about game development and 3D modeling?
Join our Discord community for support, discussions, and exclusive tutorials! 🎮🔥

🛠️ Created with ❤️ by San Liuk
🚨 For important stuff, contact me at: [email protected] ✉️
评论