This is the 24th day of my participation in the August More Text Challenge

attribute

  • Properties pane

  • Unity supports reading the following file formats

BMP, EXR, GIF, HDR, IFF, JPG, PICT, PNG, PSD, TGA, TIFF Unity can import multi-layer PSD files, automatically flatten when importing, but the layers are maintained in the resource itself.

  • Texture size

Ideally, the texture size should be an integer power of 2 on each side (e.g., 2, 4, 8, 16 pixels (px), etc.).

Unity allows texture sizes using NOPT (non-power of 2); However, NPOT texture sizes typically require a little more memory, and the SAMPLING speed of the GPU can be slower. Therefore, we try to use a power of 2 in our art diagrams to improve performance and save memory.

If the platform or GPU does not support an NPOT texture strip, Unity will scale and fill the texture up to the next power of 2.

After importing the texture, you can set the Advanced option to Not Power of 2 and enlarge the NPOT texture resource during importing


Texture types

  • Default Default: Is the most common setting for all textures. This option can be used to access the properties of most imported textures.
  • Normal Map Normal Map: converts color channels to a format suitable for real-time Normal mapping.
  • Editor GUI and Legacy: Select this when we want to use textures on the HUD or GUI control.
  • Sprite (2D and UI): Select this to use as a Sprite when we want to use it in A 2D game or as a UI.
  • Cursor: Is a format for using textures as custom cursors.
  • Cookie: Select this option when we need a silhouette of the scene light source.
  • Lightmap: Lightmap is the format to use a texture as a Lightmap.
  • Single Channel: Select this when we need to texture a Single Channel.

All supported texture compression formats

The following table shows the texture compression format options available on each platform as well as the generated compression file size (based on a 256 pixel square image). Choosing a texture compression format requires a balance between file size and quality; The higher the quality, the larger the file. In the description below, assume that the final file size of the game texture is 256 x 256 pixels.

Texture compression format describe Size (256×256 pixel texture)
RGB Compressed DXT1 Compressed unsigned normalized integer RGB textures. 32KB (4 bits/pixel)
RGB Crunched DXT1 Similar to RGB Compressed DXT1, but using Crunch compression for compression. For more information on Crunch compression, see the notes above. Variable, depending on the complexity of the content in the texture.
RGBA Compressed DXT5 Compressed unsigned normalized integer RGBA textures. 8 bits per pixel. 64KB (8 bits/pixel)
RGBA Crunched DXT5 Similar to RGBA Compressed DXT5, but using Crunch compression. For more information on Crunch compression, see the notes above. Variable, depending on the complexity of the content in the texture.
RGB Compressed BC6H Compressed unsigned floating point/high dynamic range (HDR) RGB textures. 64KB (8 bits/pixel)
RGB(A) Compressed BC7 High quality compressed unsigned normalized integer RGB or RGBA textures. 64KB (8 bits/pixel)
RGB Compressed PVRTC 2 bits High compression RGB texture. The quality is lower, but smaller, thus improving performance. 16KB (2 bits/pixel)
RGBA Compressed PVRTC 2 bits High compression RGBA texture. The quality is lower, but smaller, thus improving performance. 16KB (2 bits/pixel)
RGB Compressed PVRTC 4 bits Compress RGB textures. High quality textures, especially color data, but can take a long time to compress. 32KB (4 bits/pixel)
RGBA Compressed PVRTC 4 bits Compress RGB textures. High quality textures, especially color data, but can take a long time to compress. 32KB (4 bits/pixel)
RGB 16 65,000 colors, no Alpha. Uses more memory than compressed formats, but may be better for UI without gradients or clear textures. 128KB (16 bits/pixel)
24 bit RGB True colors, but no Alpha. 192KB (24 bits/pixel)
RGBA 16 Low quality true color. This is the default compression format for textures with Alpha channels. 128KB (16 bits/pixel)
RGBA 32-bit True colors and Alpha. This is the highest quality compression format for textures with Alpha channels. 256KB (32 bits/pixel)