Page 1 of 1

issue on showing large image

Posted: Fri Jun 01, 2018 6:19 am
by Alexar
this animation sheet is at size of 969*19680.Love can not show the image correctly as following:
TIM截图20180601141533.png
TIM截图20180601141533.png (5 KiB) Viewed 1692 times
This is an error or it reaches the limit of the system? Any one can help me ? thank you!

Re: issue on showing large image

Posted: Fri Jun 01, 2018 6:30 am
by KayleMaster
That's a lot of whitespace.
Anyways, try making it more like a square page.
Your system may be trying to round it to the nearest page size, which, after 16k x 16k is 32k x 32k and you may not support that.
You can do https://love2d.org/wiki/GraphicsLimit to get the max texture size of your system.

Re: issue on showing large image

Posted: Fri Jun 01, 2018 7:31 am
by zorg
Also, not everyone's graphics cards may even support 16k sizes either; i'd either pack those more smartly, or separate these into multiple atlases. i'd say that a 4096x4096 should be fine.

Re: issue on showing large image

Posted: Fri Jun 01, 2018 8:29 am
by Nelvin
I've fixed the spritesheet for you - 2k x 2k is all you need, separating the shadow form the sprite will probably reduce to about half of that.
sprites_test_00.png
sprites_test_00.png (894.15 KiB) Viewed 1668 times

Re: issue on showing large image

Posted: Fri Jun 01, 2018 9:08 am
by zorg
One more thing; i might be wrong about this, but to my eyes, it looks as if there are quite some duplicate frames in the sheet; usually if you want an animation to take more time than one frame, you just delay moving the "current frame" pointer to the next frame, effectively also storing a delay value with the frame position data. (the gif formats can do this, for example)

Re: issue on showing large image

Posted: Fri Jun 01, 2018 2:08 pm
by randomnovice
Just to say the graphics look great though!
Flicking down the screen was almost like doing one of those old flip books where the pages come to life as you use your thumb :)

Re: issue on showing large image

Posted: Sat Jun 02, 2018 5:21 am
by raidho36
I think your problem is that your GPU doesn't support textures of that size. Try generating texture atlases in runtime using maximum available texture size.