When importing big sprites - usually made up of tiles for maps or characters with animations - then they can turn out to be blue. When turning on Mipmaps the blue goes away. This seems to affect most platforms, even the editor itself and it happens alot on UWP when I test it on my Lumia 735 phone.
Does anyone perhaps have a solution to this - other then turning on Mipmaps.?
Your Lumia 735 uses an Adreno 305 GPU, which is limited to a 4096x4096 max texture size. The vast majority of mobile GPUs cannot do 8192x8192 textures, which is why enabling mip maps makes it work (since it’ll automatically use the 4k texture mip instead).
Also note a lot of older (and newer!) mobile hardware can’t do non-power of 2 texture dimensions, so even if the Adreno supported 8192x8192 it likely would not support an 8000x8000 texture and Unity will be automatically scaling it up to 8192x8192 for you.
As I mentioned, my sprites are made up of multiple sprites. I use the cutter on the sprite editor to cut the sheet. I can easily put the tiles/characters in directories containing the tiles as is, instead of making a grid out of them.
This should be easily setup on my project. I wrote my own sprite combiner which i’m just then not going to use.I create my sprites in 3 qualities.
I load the textures (Resources.LoadAll()) based upon the screen height. The only differences are the unit settings. Newer (android) phones easily render the 200ppu while older phones, haveing lower resolutions and weaker hardware get less pixels to render. This to me seems like a good idea. But this is my first Unity Project, so by all means if this is bad practice please say so. (please keep in mind that i’m making a 2D game).
On 200ppu my tilesize is 730px: 8192 / 730 = 11,22. So I can have a grid of 11x11 max on 8192. 121 max tiles or else be scaled. This already is a problem for my project. So putting the sprite sheets in 1 file per frame will solve this problem as well.
I’m most definitely going to try that and will follow up on that (likely later this day).
Quote: “Unity will be automatically scaling it up to 8192x8192 for you.”
Does unity always scale everything the the “Max Size” setting? Or does it honor the setting in “Advanced / Non Power of 2”?? (that defaults to none).
Well, if I instead of putting all images of my character in a squared grid and slice’em, put the frames in separate files and load the directory with Resources.LoadAll(). Then my Lumia 735 phone goes out of memory. The Vs log states:
Could not allocate memory: System out of memory!
Trying to allocate: 134217728B with 16 alignment. MemoryLabel: GfxDevice
Allocation happend at: Line:62 in C:\buildslave\unity\build\Runtime/Containers/WrappingRingbuffer.h
Memory overview
134217728B / 1024 / 1024 = 128m. Does not seem like that mush.
The game run just fine on an Android Samsung Galaxy SII. These 2 devices don’t differ that much. But one is OpenGL and the other DirectX. Perhaps the problem lays there :S.
Anyways. I’m probably just gonna drop Windows Phones. Saves me alot of trouble and the end-user as well.
Still if anyone wish to comment on this or has any good/great ideas. Them please let me know.