Channel packing means using different grayscale images in each channel of a texture: Red, Green, Blue, and optionally Alpha. These channels are usually used to represent traditional RGB color data, plus Alpha transparency. However, each channel is just a grayscale image, so different types of image data can be stored in them.
Individual channels can be then extracted by a shader to be used for particular effects, for example the red channel for glow, green channel for specular, blue channel for sound types, alpha channel for physics info, etc.
Channel Packer is a tool that allows to do this (and more) inside the Unity Editor. It is fast and can process single images or a bunch of selected images.
With Channel Packer you can:
Select the desired Packing Mode from a library of pre-made models, including:
You can choose between the ‘Single’ mode to process one texture, or the ‘Batch’ mode to process multiple ones sequentially.
Using ‘Single’ mode you will also have the following options for each input texture:
Invert Texture: to invert the image during the packing process.
Is a Normal Map: to use images already marked as ‘Normal Map’
Select the channel to use: to reuse textures previously packed.
Choose to use a solid color instead of an image.
Using ‘Batch’ mode you can select images from your project to create a working list. Once the list will be done, you will have to specify how to get the needed input channel by using filename fragments. For example: *_norm to select normal maps, *_diff for albedo and so on. All the options available in single mode are available when in batch mode too.
The output textures, generated by packing operation, will be saved in the desired project folder as the portable network graphic (.PNG) or Truevision Targa (.TGA) format.
The tool will be enhanced with a visual editor that will allows you to prepare your own packing models, adding them to the standard model library to customize the tool as you prefer.
Update: Batch mode will be completed in a couple of days, I’m preparing the website and other stuff required to be accepted and published on the that Asset store.
I’m working hard to finish as soon as possible. Is my first submission on the asset store so I don’t know exactly how to estimate timing. I Apologize for this.
Looks good. They are clear and understandable. Tested all packing for megasplat compatibility? Also what are requirements for input textures? PNG, jpeg, etc., and do they all need to be the same resolution?
The tool was developed thinking to Megasplat, so all should be compatible. There are no special requirements for input textures, I’ve tested tga, png and jpg, they don’t need to have the same resolution because the tool do the scaling to the output resolution you select.
PNG has issues with alpha channels as Jason has explained in his video blogs… PNG apparently doesn’t retain them. I had issues even in Photoshop trying to merge the textures -it has issues.
Anyway I made the submission to the asset store, was a long journey and I’m still preparing the website and all other things they need to start this thing.
Meanwhile I’m working on the first update to remove the need to have a ‘read/write enabled’ flag on every input map as jbooth suggested. This will make an easier workflow and a faster process.
It’s also a Unity issue. If you have a pure white alpha channel in a png file, Unity will compress the texture as RGB24 format (or DXT1, etc). This makes sense if you think about it, because 1 is the default alpha value, so not storing alpha saves some space and lets you use a better compression format! Awesome!
But the problem comes when you try to put that texture into a texture array, which requires that all textures be the same format, suddenly you have 30 textures as RGB32/DXT5/Etc, and one which is RGB24/DXT1/Etc because it’s alpha channel is white.
The photoshop issue comes because PNG’s prefer premultiplied alpha channels. So unless you install an alternate png loader, it will often load your alpha channel as transparency in the layer rather than it being an actual alpha channel.
Basically, all image formats suck for one reason or another, which is why we keep having new ones…
Greetings @StevenP94 - We picked up this asset last night and ran into an issue with the standard Single packer. Every time I pack an Albedo and Height map together, the new saved Albedo is much darker. I’ve tried this on a few maps now. I drop the appropriate maps in the 2 slots, leave default settings and hit save and the new map is darker than the original. I’m on Unity Pro 5.5.1 and Windows and project is in Linear color space.
I also want to add a vote for saving in the TGA format. I bought this to save time when packing maps for MegaSplat and RTP, both of which benefit from having TGA input maps(didn’t realize initially that the asset only saved in PNG’s until reading through the manual). Thanks!