- Home /
Android Performance Issues with Spotlights in 3D Scene
We are developing a game in which a player has to try to avoid light, represented by (moving) surveillance cameras.
See example screenshot right here: We have up to 3 surveillance cameras in a scene and varies other ambient lights. Now in editor mode there are no performance issues whatsoever. When played on Android devices the performance varies drastically between different devices, and drops down to 12 fps in some cases.
Device with good performance, no issues: Pixel 4
Devices with really bad performance: Nexus 5, Moto G5+
Unity 2019.2.13f1
We tried to narrow it down:
(Moto G5+ with free fps counter prefab from asset store)
started with an empty scene, no lights (~46 fps)
added 1 spotlight with a cube that drops shadows (~32 fps)
added another spotlight, that moves, with a cube that drops shadows (~27 fps)
added volumetric light to better visualize the light-ray of the surveillance cameras (~23 fps)
removed light detection script for the player, which works with raycasting in Update() function (~23 fps, no change)
The fps further drops when the scene becomes bigger and more light-sources are added. We had a look at optimized settings für lighting on mobile devices and made some adjustments.
Things we tried:
could not make gpu profiler in unity work with devices (not supported by graphics card driver), cpu says "gfx waitforpresent" as most consuming ressource
baked the lighting
set hard shadows with close fit
turned off vsync (minor fps boost)
limited fps to 30 and now 45
disabled anti aliasing
lowered pixel light count, but cannot go under 5 due to number of light sources in scenes (seemed to boost the fps a little bit)
lightmap encoding set to "low quality"
All these changes still lead to laggy gameplay and controles.
My questions are: Is it possible that the gpu in Nexus 5 and Moto G5+ is just not good enough? Are there any other settings we have to take a look at?
I feel like we are missing some basic settings, cause i refuse to believe a 2017 smartphone cannot handle 3-5 lights in a 3d scene.
Cheers and thank you in advance!
Your answer
Follow this Question
Related Questions
How to fix spotLight problom in android ? 0 Answers
My Draw Calls go from 30 to 125 and I have twice as much tris/verts when I enable a spotlight. Why?? 1 Answer
Performance terrible until enlighten thread is created 0 Answers
On Android. How many lights can you have in a Scene or the total game? 1 Answer