Channel packer
A packed texture stores several grayscale maps in the channels of one texture, for example ambient occlusion in red, roughness in green and metallic in blue (ORM). That saves texture samplers and memory. Material Smith packs channels in two places: while creating material instances, and on the Channel packer page of the panel.
While creating material instances
Section titled “While creating material instances”Turn on Pack channels in the panel’s Options (or the Pack Channels default in Project Settings).
With the Material Smith master
Section titled “With the Material Smith master”A set is packed when it has at least two of the separate maps ambient occlusion, roughness and metallic, or one of them plus a packed texture. Material Smith then:
-
Creates
T_<Set>_ORMin the texture folder of the set: the first Texture Prefix, the set name and the Packed Texture Suffix. For examplebrick_wall_001_rough_2kandbrick_wall_001_ao_2kbecomeT_brick_wall_001_ORM. -
Fills red with ambient occlusion, green with roughness and blue with metallic. Each channel comes from the separate map if the set has one, otherwise from the matching channel of the set’s packed texture. A channel with neither gets a default value:
1for ambient occlusion,0.5for roughness,0for metallic. Glossiness maps are inverted while packing. The alpha channel is not used. -
Assigns the new texture to Packed Map instead of the maps that went into it, and turns on the … From Packed Map switches. Texture overrides of the replaced maps are removed from the instance.
What will happen shows the step in advance, for example brick_wall_001_ao_2k, brick_wall_001_rough_2k will be packed into T_brick_wall_001_ORM (ORM).
The separate textures are not deleted. The next time the folder is loaded, the packed texture joins its set (T_brick_wall_001_ORM belongs to brick_wall_001). If you run Create again with Pack channels on, the packed texture is made again from the separate maps. With Pack channels off, separate maps take priority over the packed texture’s channels.
With a custom master
Section titled “With a custom master”When your master reads one packed texture in a certain channel order, Material Smith packs a texture in that order, for example T_Rock_MRA from T_Rock_ORM. See Pack channels to match the master.
Your imported textures are safe
Section titled “Your imported textures are safe”Material Smith never replaces the pixels of a texture that was imported from a file. If the target name is taken by an imported texture, for example your own T_Rock_ORM, the new texture gets _Packed appended: T_Rock_ORM_Packed. A texture with that name that Material Smith created earlier is updated in place, so assets that reference it keep working.
The Channel packer page
Section titled “The Channel packer page”Open the Channel packer tab under the panel’s summary, or right-click textures in the Content Browser and choose Pack Channels, which opens the page with those textures already filled in.
Fill from selection
Section titled “Fill from selection”Select textures in the Content Browser and click Fill from selection. The channels are filled by the texture names:
| Map in the name | Channel |
|---|---|
| Ambient occlusion | R |
| Roughness (glossiness maps get Invert) | G |
| Metallic | B |
| Height or opacity | A (and Use the alpha channel is turned on) |
Textures that don’t fit one of these channels, or whose channel is already taken, fill the free channels in order R, G, B, A. Fill from selection also sets:
- the empty-channel values to
1for R,0.5for G,0for B and1for A (no occlusion, medium roughness, not metallic); - Folder to the folder of the first selected asset;
- Name to the first Texture Prefix, the set name of the first recognized texture and the Packed Texture Suffix, for example
T_Rock_ORM(T_Packed_ORMif no texture was recognized).
The status line then says Check the channels, then click Pack.
Channels
Section titled “Channels”Each of the four rows (R, G, B, A) has:
| Control | Meaning |
|---|---|
| Texture | The source texture of the channel. Empty: the channel is filled with its value. |
| Source channel | Which channel of the source texture is read: Red, Green, Blue, Alpha or Average (RGB). Available when a texture is picked. |
| Invert | Use 1 − value, for example to turn glossiness into roughness. Also applies to the empty-channel value. |
| Value | The value (0 to 1) of the channel when no texture is picked. |
Use the alpha channel (the texture takes twice the memory) turns the A row on. Without it the alpha channel is ignored and the texture is compressed without alpha.
Output
Section titled “Output”| Field | Meaning |
|---|---|
| Folder | Content folder of the new texture, for example /Game/Props/Rock/Textures. Picking a texture while the field is empty fills in the texture’s folder. |
| Name | Asset name of the new texture, for example T_Rock_ORM. |
| Size | Largest source (default): the largest width and the largest height of the source textures. 512, 1024, 2048 or 4096 scale that size so its longer side has this length. Sources of a different size are resized. |
Click Pack (available once Folder and Name are filled). The texture is created, or updated if Material Smith made it before, and saved right away. The page shows Created T_Rock_ORM with a Show in Content Browser button, and the status line shows its size.
The packed texture
Section titled “The packed texture”- Linear (sRGB off) with Masks compression.
- 8 bits per channel.
- Compressed without alpha unless Use the alpha channel is on.
- Virtual Texture Streaming is on if any source texture streams as a virtual texture.
- Pixels are read from the source data of each texture (the imported image), as plain values: sRGB source textures are not converted.
Other errors you may see: Pick at least one source texture., … has no source data, so its pixels cannot be read. and Could not load ….
From Python
Section titled “From Python”pack_channels(request, save) takes a TAMaterialSmithPackRequest with the same fields as the page. See Python.