Game Development Community

Image Memory (POT)

by Aditya Kulkarni · in Torque Game Builder · 06/11/2010 (11:39 pm) · 3 replies

I know this has been discussed time and again, just want to clarify the power of 2 concept.

Suppose I have an image of size 1152X1109, so I should scale it down to 1024X1024.

As it's a png (lossless compression), can I scale it down to 512X512 or better still 128X128 so it would hog less memory?

#1
06/12/2010 (12:30 am)
Sure, but scaling down also loses something. Better to render it to the desired resolution in whatever program you used, or slice the sprites up and split across several sprite sheets.
#2
06/12/2010 (6:26 am)
Wokey...
#3
06/12/2010 (9:35 am)
Quote:
Quote:I do not understand this. It (guide) says I all images should use POT in formatting, however it goes onto mention textures. Am I to believe if I have a sprite that I want to be 20x20 pixels on the iDevice that I should first import it in iTGB at 200x2000?! Please explain if you can.

Your image, which is the original PNG or JPG file, will load faster and take up less memory if it is a power of 2:

2, 4, 6, 8, 16, 32, 64, 128, 256, 512, and 1024.

Going one step further, if your image is square it will gain additional optimizations:

32x32, 64x64, 128x128, etc.

This is not a requirement, but a best practice to follow. If your sprite is exactly 20x20, then that will work. If you want it to be optimized, increase the source texture to 16x16 or 32x32.


This is Michael Perry's reply to my inquiry of POT yesterday.