Ok, so I'll arrange my images some other way... I guess I cannot simply escape this by using 8 1024x1024x16 images instead of 4 2048x2048x16 . In both cases I would end up with the same used memory ammount right?
Ok, so I'll arrange my images some other way... I guess I cannot simply escape this by using 8 1024x1024x16 images instead of 4 2048x2048x16 . In both cases I would end up with the same used memory ammount right?
mh maybe i got something wrong but a 2048x2048x16 texture is four times 1024x1024x16, so it mean you can load 8 1024x1024x16 or 2 2048x2048x16 instead :>
thats why i wouldnt go over 1024x1024 unless i really need to
as traveler says the format doesnt matter for memory usage, its only for filesize
Thank you, I just looked up a few older games Aladdin and Lion King for PC... and guess you are right I will probably never need to go over 1024x1024...
The only question i still have is : how do you calculate memory requirement for a 1024x1024 image for example ?
Rob
i do some quick math and i think it should work
this is an example for a 1024x1024x16
1024 x 1024 = 1.048.576 total pixels
1.048.576 x 16 bits in each pixel = 16.777.216 total bits in the image
16.777.216 bits / 8 bits in every byte = 2.097.152 bytes
2.097.152 bytes x 1024 bytes = 2048 kilobytes
2048 kilobytes x 1024 bytes = excactly 2 megabyte
this example only work for uncompressed data
but compressed data solutions like DXT are rarely used in non-comercial engines/frameworks
Last edited by Daikrys; 01-08-2011 at 03:51 PM.
Aladdin and Lion King for PC
This games uses 256color palette. This mean only 1 byte per color instead of 4.
Theory is - when you know everything but nothing works.
Practice is - when all works, but you don't know why.
We combine theory and practice - nothing works and nobody knows why
And their resolution was 320x240 i think.
Usually fullscreen media is built from numerous small images using scaling, rotating, multiplicating, tiling and all kinds of effects. Diablo 2 for example has a ton of very small tiles. One could from first glance think that a big house you see in game is an actual big image, but its not.
The problem in old games was that they use DirectDraw. It not allows to use textures but Surfaces instead. And surface cannot exceed screen resolution. So even if image was big it slices when loading into smaller ones.
Theory is - when you know everything but nothing works.
Practice is - when all works, but you don't know why.
We combine theory and practice - nothing works and nobody knows why
Bookmarks