Sprites in Unity


Unity has some methods for compressing textures. Sprites are being textures with some additional functionality. Then, they share the same compression methods.

Here are the options that lets us access the editor. In the bottom of the Inspector window’ll see some tabs with icons for various platforms it supports Unity. Select Smart TV. Now, you probably percataste from a drop-down menu with three options: Compressed, 16 bits, and Truecolor.



Let’s focus first Truecolor. This is a 32-bit format with alpha. This means that each color channel (Red, Green, Blue and Alpha) receive 8 bits of information. Truecolor is an excellent format to save textures which do not want to lose information (quality). There are many situations where this concern is valid, however, increased memory usage caused by this format can cause performance problems if used rampantly.

So, that leaves us with the remaining two formats to reduce memory consumption in our game.

16-bit is the most direct formatting to reduce memory usage. This mode reduces each color channel to 4 bits. This bit reduction causes the color spectrum decreases deployed. This may cause discontinuity in color gradients. This can be solved using a screening (dithering), which causes the gradient look more fluid.

Here is an exaggerated example of the degeneration of colors and dithering correction:



Este formato de 16 bits es adecuado para muchos casos, pero si queremos ahorrar aún más memoria tendremos que escoger la categoría de Compressed. El término Compressed (Comprimido) es un poco ambiguo en este caso… ¿Cómo es que esta textura será comprimida? Resulta que para Smart TV el algoritmo de compresión se llama Ericsson Texture Compression (ETC). Este formato es algo espectacular, porque reduce el consumo de memoria a 4 bits por pixel.

This 16-bit format is suitable for many cases, but if we want to save even more memory we have to choose the category of Compressed. The term Compressed is somewhat ambiguous in this case … How is this texture will be compressed? For the Smart TV the compression algorithm is called Ericsson Texture Compression (ETC). This format is something spectacular, because it reduces memory consumption to 4 bits per pixel.

How you can achieve a compression level so significant? Well, first texture is divided into blocks of 4 × 4 pixels. From that, these blocks are divided into two sub-blocks. Each sub-block contains 4 bits of color information and each pixel within this sub-block contains 3 bits of information about the color difference to its container. As you may have guessed listening to this explanation, you lose some quality when this compression is chosen. Another consideration is that the alpha channel is lost with this format.





one × two =