PDA

View Full Version : Loading image sequences in real time



saam_b
05-24-2012, 02:57 AM
Hi!

I'm trying to load a series of image sequences in my openGL program to do further calculations on them in my shader. these image sequences will produce an animation. My question is if it is even possible to load these images in real time or should I pre-load them and then render them?

and how can I load these amount of images on my texture memory? If someone can give me an example It will be great!

Thanks in advance.

menzel
05-24-2012, 09:49 AM
That depends(TM).

How large are the images and are they compressed? Maybe your HDD is too slow to begin with. Do they have to be uncompressed and maybe recompressed (JPEG -> RAW -> DXT)? Then the CPU could be the limiting factor. Or the CPU-GPU bandwidth if the images are too large uncompressed...
In principal it is possible, but you should calculate your bandwidth requirements first and see what your minimal target machine is capable of. (If you want to pre load, check that the GPU has enough RAM).

V-man
05-25-2012, 07:58 AM
Hi!

I'm trying to load a series of image sequences in my openGL program to do further calculations on them in my shader. these image sequences will produce an animation. My question is if it is even possible to load these images in real time or should I pre-load them and then render them?

and how can I load these amount of images on my texture memory? If someone can give me an example It will be great!

Thanks in advance.

Just like menzel said, it depends if your image file is compressed or not, it depends on HDD and CPU performance.
If you can preload them, sure go ahead.

As for performance tips, here you go
http://www.opengl.org/wiki/Common_Mistakes#Unsupported_formats_.233

so try to use

glTexImage2D (http://www.opengl.org/wiki/GLAPI/glTexImage2D)​(GL_TEXTURE_2D​, 0, GL_RGBA8​, width, height, 0, GL_BGRA, GL_UNSIGNED_BYTE​, pixels);

saam_b
05-28-2012, 02:58 AM
Thanks for your replies!

Actually my image sequences are in EXR format and they're quite large without compression and I'm now looking for the best way to resize and filter it on GPU. So I have to both load these images and resize them in order to make them usable in my program.