+1 (614) 348-7474

Copy

Free in USA

info@crocoapps.com

Copy

From 10:00 to 21:00

info@crocoapps.com

Copy

From 10:00 to 21:00

Fill out the brief

Online request

#

Texture optimization methods

Crocoapps editorial

Crocoapps editorial

Reading time: 3 minutes

I already wrote an article on the topic “Code optimization methods…”, and this report will be on the topic of location optimization methods. In fact, this is a very important thing, since not only code calculations load the system, but also drawing the environment is also a very voracious process.

The number of Tris Batches and Rectangles greatly affects the FPS that a video card can produce. I will give an example on a game from the BatMan series, where top-end video cards were required to play graphics.

In the game RiverRaft, locations are built in such a way that the mountains are represented by a flat mesh, but they look very similar to real mountains.

#

Since everything is squeezed out by textures, textures also need to be optimized for the target platform.

I'll give you an example:

# #

The texture is in .tga format, the texture size is large and the file size is also large, the amount and quality of compression is shown in the example on the screenshots. Therefore, you need to compress it without any noticeable loss of quality.

The first step is to select the target platform - Override for Android.

Next, we need to deal with the size of the texture. The file size directly depends on the texture size. For large testurs, you can choose compression up to 1024 , on a mobile device it will be minimally noticeable. Especially if the object is in the background. Next, select the file compression. All available compression options:

#

I very often use the chosen option, 4x4 block - divides the image into small blocks and then combines them. As you can see, there are large block sizes, but the higher the value, the greater the quality loss, but we win in file size and performance. Then there is RGBA and RGB compression with and without alpha channel. Among all these blocks, you need to choose the one that is most suitable for a particular texture. Since some types of compression may not be suitable, the compression algorithm will not work correctly and the file size will only increase, so you need to use another method.

Compressor Quality – affects the quality of the compression.

For different materials, you can set a different wrapmode , if the texture will repeat in a loop, you can set the Repeat attribute. If you are going to make a pixel game, you should change the Filter mode from Bilinear to Point.

The next article will describe how to optimize locations and game zones.

Author

Crocoapps editorial

Crocoapps editorial