- Home /
The PNG image used as sprite is turning into black on some of the devices like iPad1, iPhone4, Nexus7, Samsung Galaxy Tab2, Galaxy Nexus etc.
Hello All
I am developing a 2D maze Game where I am using a PNG image for the maze. Initially when the game starts the camera focuses on whole image of the maze. After some time the camera focuses on 1/8th part of the whole maze image, means the camera zooms in. This is one of the first steps when the game starts.
The image that I am using is of Dimension - 8000 X 4500 and PPI - 300 Pixels per Inch. When I am placing the image inside the asset folder the image is converted into sprite which is what required. The options in the inspector after selecting the image sprite in the asset folder the default values are as followed.
Texture Type - Sprite, Sprite Mode - Single Pixels to Unit - 100 Pivot - Centre Filter Mode - Bilinear
Override for iPhone/ Android - Max Size - 1024 Format - Compressed
In this case when the camera zooms in at the smaller part of the image, the visible part on the device gets distorted. This happens in all the above mentioned devices.
To improve the quality I modified the Override property of the image in the inspector, where Max Size is changed to 2048 & Format is changed to True Colour. Even after doing this the image is some what distorted but rather improved than the previous one.
But when I modify the Override property of the image sprite in the inspector as Max Size to 4096 & Format to True Colour & build the project in iOS & Android. The image distortion is gone in case of iPhone5, iPad 2, Moto G. But in case of iPad1, iPhone4, Nexus7, Samsung Galaxy Tab2 & Galaxy Nexus the image gets blacked out. The image is not being rendered in these devices.
For clearing it further I have attached two images below which will show the difference. How do I solve this issue. I am in a dire need here. I will be very grateful to any one who helps. Your opinions are gladly accepted.
some mobile device do not support 4k texture. Splitting them in 4 2k textures may do the job for you...
@PouleFrit We are not actually using the images as textures, we are using it as sprites.
@PouleFrit Please explain your comment above a bit more so that we can implement it correctly ...
I meant sprites... Ins$$anonymous$$d of using only one sprite renderer which render your whole sprite/image, use 4 sprite renderer/gameobject which will render the sprite/image cutted in 4 smaller images.
So 4 2k images converted in sprites and then use 4 sprite renderer to display it.
You will have the same quality, but will be compatible with the mobile device that don't support 4k texture
@PouleFrit We have applied your method by splitting the whole image into 8 sections & arranging the images using 8 different game objects to make a whole image. After trying this the blackening of image in the earlier mentioned devices is gone. But I am facing one more problem here that build is not running on iPad1.
Your answer
Follow this Question
Related Questions
2D GAME (non UI object) for every pc resolution 0 Answers
Best practices for large background image on mobile? 0 Answers
Terrain Handling For Performance Improvement in 2D Game 0 Answers
Background Sprite Setting 0 Answers
Sprites are pixelated after resizing 0 Answers