Results 1 to 9 of 9

Thread: Andorra 2D latest, Delphi7, resource (ail) file with 4x 2048x2048x16 PNG

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    The fact that your are using png's is not relevant. All color information is decompressed when you load the file. So yes, each image of that size should calculate to 16mb

  2. #2
    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?

  3. #3
    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

  4. #4
    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

  5. #5
    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.

  6. #6
    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

  7. #7
    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •