Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualDaaark

Posted 04 October 2012 - 07:26 AM

Size on disk doesn't map out well to size in ram. The images may be compressed, or not in the same color space. Also, if you end up using compression on the images at runtime (like say DXT) they will take up another amount altogether.

Taking compression out of the picture, putting all your PNGs into a bigger one will take about the same amount of memory as having them all separate. This technique is not done to save memory, it's done to save on texture and material changes at runtime.

At 32bpp, every pixel will take up 4 bytes of ram. Doesn't matter how many images they are spread across. 4 32x32 images and 1 64x64 image still equal 4096 pixels and 16384 bytes. You can use runtime texture compression formats to reduce your memory consumption however.

http://en.wikipedia.org/wiki/S3_Texture_Compression

#1Daaark

Posted 04 October 2012 - 07:22 AM

Size on disk doesn't map out well to size in ram. The images may be compressed, or not in the same color space. Also, if you end up using compression on the images at runtime (like say DXT) they will take up another amount altogether.

Taking compression out of the picture, putting all your PNGs into a bigger one will take about the same amount of memory as having them all separate. This technique is not done to save memory, it's done to save on texture and material changes at runtime.

At 32bpp, every pixel will take up 4 bytes of ram. Doesn't matter how many images they are spread across. 4 32x32 images and 1 64x64 image still equal 4096 pixels and 16384 bytes. You can use runtime texture compression formats to reduce your memory consumption however.

PARTNERS