Load many and large textures

I am building a touch application to load about 200 high resolution images (8196px on one of the dimensions). Loading time is very long and the application hangs while loading, I am using dds DXT5 textures.

  • What is the best option in this case in the DDS converter? They are just b/w images no alpha

  • Should mipmaps be enabled during the conversion?


If you want to reduce dds size, use either dxt1/bc1 (1 bit of alpha, so no alspha ;), or dxt5/bc3 for textures with alpha (technically pretty much all textures nowadays benefit from block compression scheme)

from vux

Ok, so DXT1 is the choice and with mipmaps so they don t have to be built at load time.
Enabling the Load In Background option also unlocks the patch, but it still takes ages to load images.
It takes about 20 seconds to load an image so if I want 200 images that makes over one hour to load all of them. Any way this can be improved?
We are also talking about 5Gb of images which won t fit on my video card (from what I understand about video cards, when video memory is not enough it will be loaded on RAM, correct?)
Maybe I should load a set of lower resolution images and use those until all the full images are loaded, swapping them as they are available… any other idea?


20 seconds is super slow to the point I would say something is up. Maybe you have super slow harddisk - SSD will improve load times.

Plenty of 4gb cards around these days for good prices so you might be able to get them all on the card. I suspect you’ll find larger cards too. Pretty sure RAM doesnt start getting used when texture memory full but would be easy to check.

Why do you have to use such high textures? 4096 cuts memory requirements massively.

I ve got an SSD disk, now the pictures load in 5-10 seconds, even faster if I disable mipmaps but I need them.
We d like to be able to zoom into the pictures, that s why we are using such high resolution files.
I am really surprised about the file loading time it goes from SSD to video card memory I d expect it to be superfast, each pictures weights 27Mb.

I think the preparation of mipmaps are bogging down your system (considering the massive size of your images many mipmaps will be made for each). Why do you need these?

Your only goal is to display hi-rez images and zoom in on them. Do you notice any performance improvement when zooming in while mipmaps are enabled?

in their “normal” state, the images are about 512x512px, without mips they don t look right.


Well everything I thought I knew about mipmapss must be very wrong. Are mipmaps not a series of lower resolution images that are rendered from the original high-resolution image?

Yes, that´s why if there are no mipmpas, a very high resolution image scaled down that much will look weird.

I thought that creating mipmaps when changing the format from jpg to dds then the system didn t have to create them at load time, how that goes?


how about intelligent google maps like image loading mechanism? you create a low resolution version for zoomed out and slice up high rresolution version for zoomed in. so texture loading is fasten up also loading in background is fast enough for view ddependent dynamic loading

@io that makes so much sense. Thank you for the explanation.

Microdee, that is what I was thinking but instead of using the “is scaled up” logic to load the high resolution image (what would happen if the high res image is not loaded yet?), I could load at first a serie of low resolution images and then start loading the high resolution ones, then swap them as they load (Is Valid pin).

in google maps’ case if the requested slice of the high res version is not loaded yet then it simply display the lowres version for that moment. also the reason for this sslicing thing is you never need to load the full highres image. imagine if maps would need to load the entire earth ;)

Ok, so, I tried setting the slice(String) before the FileTexture but this creates a " blank moment" while the texture is being swapped. So I tried to load separatly the texture with another FileTexture node but there are not proper nodes to SetSlice for textures arrays…

EDIT: it is possible with the Switch(Node) node, I also had to add a bit of delay before loading the high resolution image to give it time to be fully available ot the gpu.