Channel packing can greatly impact your optimization by reducing the number of sampled textures in your materials/shaders.
The channel packer in Bridge can perform the following tasks:
- Texture masking a.k.a Channel packing (combining and extracting channels)
- Format conversion (PNG, JPG, EXR, TIFF and TGA)
- Resolution conversion: 2K, 4K and 8K (varies depending on your subscription type and downloaded resolution
- Colorspace conversion (Linear and sRGB)
- Channel depth manipulation (8-bit or 16-bit)
- Type conversion (Grayscale, RGB and RGBA)
How to use channel packing?
We have added some default presets even though there is no hard and fast rule to channel packing. You can change those presets any way you like. If you have written your own custom shaders then you can channel pack textures according to how the shader reads them. i.e. Unity’s Standard Shader reads Albedo from RGB channels and reads Transparency/Opacity from Alpha channel.
❗Warning: Avoid using the same image or channels from the same image in different presets since it will produce unexpected results. I.e. “Albedo R” in preset #1 and “Albedo B” in preset #2.
Using Channel Packing Presets
You can specify presets for the channel packer to use at the time of export. These presets are persistent and are applied to all kinds of assets( i.e. 3D, 3D plants, surfaces, atlases, etc) while exporting.
- Go to Export Settings.
- Set the Export Target to Custom Disk Export.
- Go to the Textures tab and click on an asset type to get a list of maps.
- Select a map to define the channel packing settings. This will save your channel packing settings.
- Back on the asset panel, click Export to export your channel packed assets to the location specified for your Custom Disk Export settings.
Using Custom Channel Packing
If you want to customise the channel packing presets to suit your custom shaders
- Follow the same steps as above to go to Export Settings.
- Then proceed to modify the presets according to your requirements.
- Go back to the asset information panel, click Export to export your channel packed assets to the location specified for your Custom Disk Export settings.
Bridge Channel Packing Mechanism
When you customize channel packing, it first extracts our custom Image Processor to your Megascans library on disk (<Library Path>\support\utils).
The Image Processor is a standalone app that Bridge automatically executes to send the relevant data e.g. textures and channel packing presets.
Next, the Image Processor identifies certain properties of a preset and processes each channel one by one. If a map (whose channel(s) is/are used in the presets) is unavailable, the Image Processor will fill it with the default PBR value as per each texture type.
Finally, the Image Processor will write the new image/texture to disk and send a message to Bridge.
The Image Processor is used for the following operations:
- Converting to different image formats.
- Resizing images.
- Channel packing textures.
- Retrieving image data.
The file path(s) of channel packed textures are added to the asset's exported JSON and are available under “packedTextures” just like textures are available under “components” in the asset's exported JSON.
Other Utilities
The other utilities that Channel Packer provides are format and resolution conversion for all textures.
Comments
0 comments
Article is closed for comments.