-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
horrific performance on android (3D) #31601
Comments
First, make sure to switch the project to use the GLES2 renderer (instead of GLES3). It's much more optimized for mobile devices overall. You can do this by changing Rendering > Quality > Driver Name to GLES2 in the Project Settings. Also, note that by default, Godot will render in the device's native resolution. This resolution is very high on recent flagship smartphones; it makes sense to lower it to something more reasonable. To do this, go to the Project Settings and set the window width and height to 1280 and 720 (or 720 and 1280 for a game in portrait mode). Then set the stretch mode to See Multiple resolutions in the documentation for more information. |
@Calinou I tried GLES2, and adjusted the settings that u mentioned, and the fps didnt increase that much.. And i lost depth test on all objects :'D Ill have to stick to desktop version with the game, unfortunately. I dont even know if this should be issued on github or not... |
@grusad Some features like real-time shadows are very demanding on mobile GPUs, so you will likely have to live without them if you're targeting mobile devices (use baked lightmaps and fake shadows using sprites instead). Also, since you're using a Sprite3D in your project, you may want to replace it with a MeshInstance with a QuadMesh attached due to #20855. Reading the issue's description, it seems the performance issue might come from the Sprite3D actually 🙂 |
This might not be a godot issue, just a guess are you new to developing for mobile / non-desktop platforms? Mobile in particular is a lot more limited in terms of horsepower than desktop, particularly with graphics. If you are aiming for mobile release it is a good idea to do performance testing early and throughout development so you can get an idea of what is and isn't feasible. Fill rate in particular is often very low, and mobiles often use tile rendering so the bottlenecks can be different than on desktop. Overdraw, transparency, and things like shadows can kill performance, and simpler shaders are likely to work better. |
@lawnjelly I am pretty novice at mobile dev. The thing is that my scene that i tried to render on my galaxy s10 should not be a problem to run, i cant imagine that anyways. Havnt had the time to try to replace my sprite3D to a quadmesh to see if that fixes the problem yet.. |
Hello grusad i would recommend you to remove the Procedural sky and set it to Clear Color and also adjust the Ambient Light, You will see FPS Shooting up in GLES3 The main Bottleneck here is actually the Sky and its properties like light and shadows, according to my experience with GLES3. I could get 60 fps with 100000+ vertices drawn on Samsung A7 device with GLES3. if you still don't get good FPS then experiment with the shrink option in the Window -> stretch menu you will get good FPS but the Image rendered may be pixelated corresponding to the shrink value set. Hope this helps! |
I think the weakest chain of Godot is 3D assets pipeline not the renderer. I backport godot-sponza(from @Calinou ) to Godot 2.1, fix some core engine bugs including one in material.glsl(Godot 2 BakedLightmap is broken in iOS). and use BakedLightmap I'm able to running this scene in 60 FPS for both vivo z3(Qualcomm Snapdragon 710) and iPhone 6SP(A9) generally In mobile platform you use realtime shadow as less as possible, if you must have shadow you use only one DirectionalLight BTW: I'll stick with Godot 2 until the day it can't be use anymore :-) |
I tried godot-sponza with godot 3.1.1, performance is very poor it's struggling to achieve 6-7 fps for machine with |
@shivmsit this issue is about Android performance, not macOS. Please search for an issue relating to macOS or open a new issue. |
@mahdisml Please don't derail the discussion with off-topic comments. Either way, I'll close this issue as there's nothing actionable we can do about it right now. That said, you should be able to achieve better performance on mobile by designing your game around the limitations of the platform (such as by lowering the target resolution). For more information, look into the new optimization tutorials in the documentation. |
Godot version:
Godot 3.1.1
OS/device including version:
PC: RTX 2080 ti, i7... a monster
Android: Galaxy s10
Issue description:
Well im having a simple 3D scene containing a small gridmap (something like 15x15), a player, 3 mobs running around, and some sprite3D laying around in the gridmap. On my PC a get over 1,5k FPS in fullscreen mode, and on my android phone its unplayable.. maybe around 10fps?
So what is going on here? Should i exclude 3d in android dev using Godot?
The text was updated successfully, but these errors were encountered: