Image dimensions limits

Monkey Targets Forums/PSM/Image dimensions limits

Sensei(Posted 2014) [#1]
Took me ages to pintpoint the problem, but I thought I'd let others know as to the issue and hopefully Mark could fix it, if possible?

Basically, I load in images as "sprite sheets" so I do grabimage on the same sheet for various in-game assets.
Usually these images are large, for example 2000px wide and 2000px high.
After much struggle, it seems to me there is a limit of 2000 x 2000px. Anymore and you get file not found/unknown file errors on the Vita and on the Ouya too.
Desktop, HTML and Android don't seem to have these issues.

Anybody else find this issue before?


Raph(Posted 2014) [#2]
2000 or 2048?

You shouldn't be going over that for Android either, probably.


Sensei(Posted 2014) [#3]
Probably 2048. This isn't documented anywhere and it should be. Why the limit anyway? Is it some opengl surface limit?


Raph(Posted 2014) [#4]
It's usually a device-dependent limit on texture memory. This is the first Google result for "max texture size vita":

http://community.eu.playstation.com/t5/Graphics/Maximum-texture-size-supported-across-all-platforms/m-p/18017154#M1202

Says 2048. :)

Different Android devices will have different limits based on their RAM. And even on desktops it's going to vary based on your graphics card. It's not consistent across iOS devices either: http://stackoverflow.com/questions/2505186/what-is-the-maximum-texture-size-available-on-the-ipad


Sensei(Posted 2014) [#5]
Thanks for the information Raph. I really was unaware of these limitations and apologise in advance if I came across ignorant/stupid.
At least using sprite sheets, I don't load in too many image files which seems to be more efficient anyway, so long as I keep to the dimensions limit! :)


Raph(Posted 2014) [#6]
No worries!

You may want to look into one of the various texture packers and associated modules, to maximize the amount you can pack in. I like this one: http://www.monkey-x.com/Community/posts.php?topic=1216


Sensei(Posted 2014) [#7]
Thanks a lot matey. I'll have a look at that soon :)


SLotman(Posted 2014) [#8]
Beware if you're developing for Android 2.x, some devices only support 1024x1024 textures...!