- Home /
Android Graphical problems
I made a nice 2D game and it works very good on both PC and Android. I decided to switch to 3D with the same game, new project ofcourse. Everything works very good on pc, but when i tried to launch my game on android, it was horrible. Overall fps is very low, fps drops, and the graphics them self are very very weird and super low quality.
I started checking my code, removing almost everything in the code to check if it still works horrible, nothing helped.
I decided to make a new project and simply test it out, i made a terrain with texture imported from unity assets, with a cube and simply camera folowing the cube while the cube moves around. The graphics were again weird, it did work a bit better but still not constant 60 fps( it's just a empty terrain with a cube wtf lol) Second time i launched the game, the textures became pink and i understood it's something about the terrain. I made another new project, this time just a terrain, and again pink textures.
I thought it's my phone, which is Galaxy S2, but i tried to run other games like temple run 2 and other games and they seem to work perfectly on 60 fps.
Seems to be something goes wrong when unity compiles the game to android. And seems to be it only happens with 3D projects that contain terrain. On 2D everything works fine.
Anyone faced something similar and maybe has solution?
Thanks.
Edit: I disabled all possible graphics like anti aliasing and set all possible graphics to lowest as possible and replaced textures with 32x32 textures. I tried different emulators and phones. The terrain is still pink.
Edit2: Tried using plane instead of terrain, i don't get pink texture( progression lol) but the fps is still horrible, like 24-40, i tried to use application.settargetframe to 60 but it didn't help. This litle test app has super minimal graphics, it shouldnt run on such fps ;/
I Found the problem, check the answer to this question if you need an answer.
A couple of things. 1) What do you mean by 2D? Are you saying that you switched from 3D mode to 2D mode in the editor, and Android works just fine (with terrain present) in the 2D mode but not the 3D mode? 2) Generally speaking, you can't use the built-in terrain for mobile platforms. It is too expensive. Also, it depends on your terrain settings. You'll get a much different outcome using a 256x256 splat map with a 64x64 vertex count than if you use the default terrain resolutions. $$anonymous$$ost mobile devices just can't handle the terrain. You can get something from the Asset Store like T4$$anonymous$$ (Terrain for $$anonymous$$obile) to have a wider availability on Android devices.
You should check the quality settings of your project. Your import settings (compression for texture...) may also influence the render quality on mobile.
I already used the terrain/ shadows and complexe meshes on mobile without any problems.
superhat, In 2D i was using sprite as background and i used terrain only in 3D, i made terrain very very small size and it still didn't work. If you say terrain is too heavy, maybe i should use plane as map? I need it flat so plan could fit very well. But it's still pretty weird that terrain is so buggy on android.
Nerevar, the quality settings seem to be already super low, the graphics look super low quality on the android and still works horrible ;/
Answer by Mr-Tomato · Apr 09, 2015 at 04:37 AM
I found the problem. The problem was with the shader on the material of my plane/terrain. ( shader is how your device renders the texture ) It was set on Standart which doesn't work properly on Android devices. I changed it to Mobile - Bumped Diffuse. Now the game works on high FPS with no problems (:
yzaroui, go to terrain settings -> pick Custom in $$anonymous$$aterial -> Pick previously added $$anonymous$$obile material how Custom $$anonymous$$aterial.
Your answer
Follow this Question
Related Questions
infinite terrain 3 Answers
Mobile Build and Playmode Terrain Collision Disparity 0 Answers
3D Map Terrain For Mobile 0 Answers
Huge terrain in Unity? 2 Answers
SketchUp Sandbox vs. Unity Terrain 2 Answers