How to make smooth animation of tiles, while they loading?

So, I have some tails (his position and texture) and I want to make effect like smooth animation of this tiles, so, when I’m zooming I want to new tiles didn’t load with a delay and then abruptly appeared but smoothly, so I think to add them opacity and change it as the tile is loaded, but actually I don’t know how to realise it in code?
Can you suggest something?

I use OpenGL with GLSL.

[QUOTE=Kovaczboi;1293162]So, I have some tails (his position and texture) and I want to make effect like smooth animation of this tiles, so, when I’m zooming I want to new tiles didn’t load with a delay and then abruptly appeared but smoothly, so I think to add them opacity and change it as the tile is loaded, but actually I don’t know how to realise it in code?
[/QUOTE]
There are two fairly straightforward mechanisms you can use. One is to simply make loading faster. Use texture atlases or array textures rather than storing each tile as a separate image file and/or creating a separate texture for it. The other is to use mipmaps. Store all of the mipmap levels in files rather than creating them from the highest-detail level. Prioritise loading the lower-detail (numerically greater) levels, and decrease GL_TEXTURE_BASE_LEVEL as higher-detail levels are loaded.

In some cases, you can reduce the number of different tiles used. E.g. if you have multiple variants of a tile which differ only in orientation or colour palette, you can implement the orientation and/or colourisation in the shaders. Tiles which are made from a background with overlaid detail can be replaced by two separate tiles, reducing the total number of tiles loaded. This may enable further optimisations, e.g. allowing the use of 8-bpp indexed-colour images rather than 24/32-bpp RGB(A) images.

As for increasing loading speed, you need to find out which part of the process is the bottleneck. If it’s the number of glTexImage* calls, atlases will help. If it’s the open/close operations for file access, atlases will help but so will using archives (ZIP or similar) rather than individual files. If it’s disk bandwidth, better compression helps (which also favours atlases; one large file will get better overall compression than many small files or even an archive where each member is compressed separately). If it’s memory bandwidth, eliminating variants and reducing the in-memory size (either by reducing bpp or using compressed formats) helps.

[QUOTE=GClements;1293163]There are two fairly straightforward mechanisms you can use. One is to simply make loading faster. Use texture atlases or array textures rather than storing each tile as a separate image file and/or creating a separate texture for it. The other is to use mipmaps. Store all of the mipmap levels in files rather than creating them from the highest-detail level. Prioritise loading the lower-detail (numerically greater) levels, and decrease GL_TEXTURE_BASE_LEVEL as higher-detail levels are loaded.

In some cases, you can reduce the number of different tiles used. E.g. if you have multiple variants of a tile which differ only in orientation or colour palette, you can implement the orientation and/or colourisation in the shaders. Tiles which are made from a background with overlaid detail can be replaced by two separate tiles, reducing the total number of tiles loaded. This may enable further optimisations, e.g. allowing the use of 8-bpp indexed-colour images rather than 24/32-bpp RGB(A) images.

As for increasing loading speed, you need to find out which part of the process is the bottleneck. If it’s the number of glTexImage* calls, atlases will help. If it’s the open/close operations for file access, atlases will help but so will using archives (ZIP or similar) rather than individual files. If it’s disk bandwidth, better compression helps (which also favours atlases; one large file will get better overall compression than many small files or even an archive where each member is compressed separately). If it’s memory bandwidth, eliminating variants and reducing the in-memory size (either by reducing bpp or using compressed formats) helps.[/QUOTE]

Thx for an answer but actually I can’t change anything that is related to textures, I get them as they are, first I have hi-res tile in pos, for example, (x=0, y=1, z=2) when I’m zooming, I get tile in pos (x=2, y=3, z=3) and his texture in low-res (because zooming), and after delay (while updating), it goes be in hi-res, I want make smooth transition between this states, it’s may looks like animation.