Texture to hardware limits

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
green.t
Posts: 3
Joined: Wed Mar 29, 2006 7:58 am
Location: Australia
Contact:

Texture to hardware limits

Post by green.t »

Hello! Simple question :

I understand that I can load a texture from jpeg or bmp format. However, when this graphic is loaded what sort of video memory is this taking up - Is it using the natural file size or is it converted to another format before placed within video ram? Just need to know so I know what sort of limitations I'm up for when creating large worlds, maps, etc.

If my concept of how texturing works is completely wrong, please set me in the right direction. :)

Thank you in advance!
Amt0571
Posts: 128
Joined: Mon Mar 06, 2006 6:29 pm

Post by Amt0571 »

I think that it's not compressed in the memory, so it takes up more memory than if the jpg could be stored right away.
hybrid

Post by hybrid »

Sure, most images are converted to bitmaps, i.e. 2 or 4 byte per pixel. There's a patch available for compressed textures, which could help in these cases.
matgaw
Posts: 45
Joined: Sat Oct 06, 2007 11:33 am

Post by matgaw »

Another question regarding this: are all textures stored in graphics card video RAM, or in computer's main RAM, or in both? It seems that loading textures uses a computer's RAM, but I don't know about video RAM...

For example, if I have about 300 MB of bitmap textures to load, then do I have to have a 512 MB graphic card, or just 512 MB of system RAM is sufficient?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

No, you need that amount of gfx memory (and a lot more due to mipmapping). So with 300MB of textures you might need some texture compression or dynamic memory management.
twilight17
Posts: 362
Joined: Sun Dec 16, 2007 9:25 pm

Post by twilight17 »

Or just disable mipmaps. Also save some memory by NOT using bmp's, they are a really bad format and shouldn't be used at all when making a game.
Post this userbar I made on other websites to show your support for Irrlicht!
Image
http://img147.imageshack.us/img147/1261 ... wernq4.png
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

twilight17 wrote:Also save some memory by NOT using bmp's, they are a really bad format and shouldn't be used at all when making a game.
:roll: Did you spot the part about textures being uncompressed when they're loaded to RAM / VRAM? A bmp, jpg, or png of the same dimensions will all take up exactly the same size once they're loaded.

However, the file format isn't completely irrelevant. BMP source images will take up more room on disk, but they'll be loaded faster than compressed images. So on a typical modern system with big hard drives and impatient users, they're actually a good choice.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Kriolyth
Posts: 26
Joined: Wed Mar 26, 2008 6:59 pm
Location: Moscow, Russia

Post by Kriolyth »

(<name> has joined #directx)
+1 to rogerborg and long live RAID0 :D

Another choice could be DDS textures with DXTn compression (note hybrid saying about patch). These both take less space on disk and in VRAM/RAM, have little impact on performance, but may produce some compression artifacts similar to JPEG and have problems with transparency.

Textures may take up both RAM and VRAM, depending on texture management. However, VRAM is also used for vertex buffers, index buffers, render targets and depth/stencil - and they all take up a bit more than you'd expect them to do. They all may take up RAM as well, but VRAM is more preciousssss these days.

Leaving out VRAM fragmentation nightmares =)
(<name> has left #directx)
The cake is a lie.
Post Reply