Difference between revisions of "ChannelPacking"

From polycount
Jump to: navigation, search
(images restored)
(Examples: trim sheet links)
(20 intermediate revisions by 4 users not shown)
Line 1: Line 1:
__NOTOC__
+
Channel packing means using different grayscale images in each of a texture's image channels... Red, Green, Blue, and optionally Alpha.  
<!-- ## page was renamed from Swizzle -->
+
= Channel Packing =
+
Channel packing is a game art term for a bitmap that has different grayscale images in each of its channels... Red, Green, and Blue. Alpha can also be used as a fourth channel. This saves [[Memory]], but increases [[Shaders]] complexity.
+
  
== Compression Artifacts ==
+
These channels are usually used to represent traditional RGB color data, plus Alpha transparency. However each channel is really just a grayscale image, so different types of image data can be stored in them.
If you save a channel-packed texture using DXT compression, it will introduce blocky artifacts to your channels. For details, see [[Normal map#Normal_Map_Compression]].
+
 
 +
Individual channels can be extracted by a [[Shaders|shader]] to use them 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. Each channel can have a totally different layout, and thus use different [[TextureCoordinates|UVs]].
 +
 
 +
Games use this technique to avoid loading separate grayscale images, which saves [[Memory]]. However this does increase shader complexity, which can increase [[GameRenderingTerminology#Draw Call|draw calls]].
 +
 
 +
[[RMA]] is a type of packed map which contains [[Roughness map|Roughness]] + [[Metallic map|Metallic]] + [[Ambient occlusion map|Ambient occlusion]], which are used with [[PBR]] (Physically Based Rendering).
 +
 
 +
== Swizzle ==
 +
Swizzling means to change the order of the color channels in a texture. For example, moving the red channel into the alpha channel, to prepare an image for [[Normal_Map_Compression#DXT5nm_Compression|DXT5nm compression]].
 +
 
 +
Usually swizzling is done to create better results when using image compression, since the green channel sometimes uses more bits. This is because [http://www.physicsclassroom.com/class/light/Lesson-2/Visible-Light-and-the-Eye-s-Response the human visual system is biased] to perceive more values in the green range than in red or blue.
 +
 
 +
See [[Normal Map Compression]].
  
 
== Examples ==
 
== Examples ==
 +
[[image:TM_Mask_Example.jpg|thumb|600px|left|A channel-packed texture using Red, Green, Blue, and Alpha channels to store four texture masks. See [https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/HowTo/Masking/index.html Using Texture Masks] from the [https://docs.unrealengine.com/latest/INT/ Unreal Engine 4 Documentation].]]<br clear="all"/>
  
[[image:SneferTileExplain.jpg|thumb|600px|left|Two channel-packed textures, which store a total of six unique textures, see [http://www.polycount.com/forum/showthread.php?t=89682 An exercise in modular textures - Scifi lab UDK] on the Polycount Forum. Image by [http://www.torfrick.com/ Tor 'Snefer' Frick].]]<br clear="all"/>
+
[[image:StandardShaderSpecularMap1000kgWeight.png|thumb|600px|left|Unity's Standard Material has the option to store Glossiness in the alpha of the Specular (or Metallic) texture, see [https://docs.unity3d.com/Manual/StandardShaderMaterialParameterSmoothness.html Unity - Manual: Smoothness] from the [https://docs.unity3d.com/Manual/index.html Unity User Manual].]]<br clear="all"/>
  
  
[[image:DistingTileExplain.jpg|thumb|400px|left|A channel-packed texture used to texture an entire scene, see [http://www.polycount.com/forum/showthread.php?p=1588220#post1588220 [UDK] Oil Rig Observation Outpost] on the Polycount Forum. Image by [http://artbywiktor.com/ Wiktor 'Disting' Öhman].]]<br clear="all"/>
+
[[image:SneferTileExplain.jpg|thumb|600px|left|Two channel-packed [[MultiTexture#Trim_Sheets|trim sheet]]s, which store a total of six unique textures, see [http://polycount.com/discussion/89682 An exercise in modular textures - Scifi lab UDK] on the Polycount Forum. Image by [http://www.torfrick.com/ Tor 'Snefer' Frick].]]<br clear="all"/>
  
  
[[image:Marcan-MassEffect3-swizzle.jpg|thumb|600px|left|A channel-packed texture used in Mass Effect 3, see [http://www.polycount.com/forum/showthread.php?p=1881634#post1881634 Mass Effect 3 art - Marc-Antoine Hamelin] on the Polycount Forum. Image by [http://www.marc-antoine.ca/ Marc-Antoine 'Marcan' Hamelin].]]<br clear="all"/>
+
[[image:DistingTileExplain.jpg|thumb|400px|left|A channel-packed [[MultiTexture#Trim_Sheets|trim sheet]] used to texture an entire scene, see [http://polycount.com/discussion/comment/1588220/#Comment_1588220 [UDK] Oil Rig Observation Outpost] on the Polycount Forum. Image by [http://artbywiktor.com/ Wiktor 'Disting' Öhman].]]<br clear="all"/>
 +
 
 +
 
 +
[[image:Marcan-MassEffect3-swizzle.jpg|thumb|600px|left|A channel-packed [[MultiTexture#Trim_Sheets|trim sheet]] used in Mass Effect 3, see [http://polycount.com/discussion/comment/1881634/#Comment_1881634 Mass Effect 3 art - Marc-Antoine Hamelin] on the Polycount Forum. Image by [http://www.marc-antoine.ca/ Marc-Antoine 'Marcan' Hamelin].]]<br clear="all"/>
 +
 
 +
== Compression Artifacts ==
 +
If you save a channel-packed texture using [[DXT]] compression, it will probably add blocky artifacts to your maps. To learn how to reduce these errors, see [[Normal Map Compression]]. Also see the [https://docs.unrealengine.com/en-US/Engine/Rendering/Materials/HowTo/Masking/#maskingandchannelartifacts Unreal 4 documentation] for tips about this.
  
 +
== Tools ==
 +
* [http://helpx.adobe.com/photoshop/using/channel-basics.html Photoshop alpha channels]
 +
* [http://docs.gimp.org/en/gimp-channel-dialog.html Gimp alpha channels]
 +
* [http://polycount.com/discussion/148082 Channel Shuffle]
 +
* [https://support.allegorithmic.com/documentation/display/SPDOC/Creating+export+presets Substance Painter export presets]
 +
* [https://support.allegorithmic.com/documentation/display/SDDOC/RGBA+Merge Substance Designer RGBA Merge]
  
* For more examples and tutorials see [[Texture atlas]] and [[Multitexture]].
 
  
 +
== More Information ==
 +
* [[MultiTexture]]
 +
* [[Normal Map Compression]]
 +
* [[Shaders]]
 +
* [[Texture atlas]]
 +
* [[TextureCoordinates]]
 +
 
----
 
----
[[Category:TextureTechnique]] [[Category:Glossary]]
+
[[Category:Texturing]] [[Category:TextureTechnique]] [[Category:Glossary]]

Revision as of 13:41, 23 May 2020

Channel packing means using different grayscale images in each of a texture's image channels... Red, Green, Blue, and optionally Alpha.

These channels are usually used to represent traditional RGB color data, plus Alpha transparency. However each channel is really just a grayscale image, so different types of image data can be stored in them.

Individual channels can be extracted by a shader to use them 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. Each channel can have a totally different layout, and thus use different UVs.

Games use this technique to avoid loading separate grayscale images, which saves Memory. However this does increase shader complexity, which can increase draw calls.

RMA is a type of packed map which contains Roughness + Metallic + Ambient occlusion, which are used with PBR (Physically Based Rendering).

Swizzle

Swizzling means to change the order of the color channels in a texture. For example, moving the red channel into the alpha channel, to prepare an image for DXT5nm compression.

Usually swizzling is done to create better results when using image compression, since the green channel sometimes uses more bits. This is because the human visual system is biased to perceive more values in the green range than in red or blue.

See Normal Map Compression.

Examples

A channel-packed texture using Red, Green, Blue, and Alpha channels to store four texture masks. See Using Texture Masks from the Unreal Engine 4 Documentation.

Unity's Standard Material has the option to store Glossiness in the alpha of the Specular (or Metallic) texture, see Unity - Manual: Smoothness from the Unity User Manual.


Two channel-packed trim sheets, which store a total of six unique textures, see An exercise in modular textures - Scifi lab UDK on the Polycount Forum. Image by Tor 'Snefer' Frick.


A channel-packed trim sheet used to texture an entire scene, see [UDK Oil Rig Observation Outpost] on the Polycount Forum. Image by Wiktor 'Disting' Öhman.


A channel-packed trim sheet used in Mass Effect 3, see Mass Effect 3 art - Marc-Antoine Hamelin on the Polycount Forum. Image by Marc-Antoine 'Marcan' Hamelin.

Compression Artifacts

If you save a channel-packed texture using DXT compression, it will probably add blocky artifacts to your maps. To learn how to reduce these errors, see Normal Map Compression. Also see the Unreal 4 documentation for tips about this.

Tools


More Information


Personal tools
Namespaces

Variants
Actions
Navigation
Tools