- Home /
Achieving Good Graphics in Mobile
Hi there! I'm currently trying to implement a 3D checkers game in unity. I'm currently testing it in different devices however I can't achieve good graphics and the performance at the same time (excluding high-end devices). I'm unable to use multiple spot lights with direct light anyways due to reason above. When Baked lights are missing specular effect on the objects and most of the time they look like they are not even there. When real-time they look good but performance drops to 8 FPS or so. Right now Using only real-time direct light seems like the best choice but it's shadows are all spiky and ugly. I used GPU instantiating in the checkers pieces, static and dynamic batching is active as well. For my different themes each scene has different number of vertices. For ex. one has 8k, two of them has 17k and the last one has 75k (I don't expect much from this scene but others should look better). I tried changing quality settings, render paths etc. none of them improve the quality.
Answer by JVene · Sep 05, 2018 at 01:10 PM
Without knowing the details of your scenes, models, materials (and from out here that's impractical), we can only point to general notions. Performance optimization is quite an art/science compromise. Profiling on the device will be useful.
iOS targets are a bit different. The iOS consumer with an old, weak phone is also not likely a customer (most people with an iPhone 4 can't even get most software from iTunes at this point). The means those iOS customers that are active potential customers likely have recent models, all of which have relatively high end performance, especially the GPU (which is your best friend/worst enemy on mobile).
It's Android where it gets complicated. Depending on your game, there are a lot of Android devices handed down to young kids who do end up getting games. Many get phones with deals from their carrier that range from relatively ancient GPU's and limited performance to the high end phones that match the latest iPhones. You mentioned hardware instancing, but even this is only available past OpenGL ES 3, and there are still some 20% of the Android consumer base with Android 2.0 limited devices (which won't support hardware instancing). The range of performance profiles is huge (some are 20x slower than others, maybe more). It creates quite a headache. You'll seriously consider multiple artwork designs, which is basically one game for low end and another for high end (maybe a third for middle). Sometimes there's just no way around it.
You have one consolation. People with weak devices generally know to expect commensurate performance. Use that, and accept it. Check the market profiles at the time of your release, and let go of the low end customers with devices that just can't implement the important aspects of your artwork if you must. Data will show you if that is minor.
For mobile, one might say 20K vertices is ok, but that highly depends on the GPU and the number of objects. It is less the number of vertices and more the number of contiguous facets that matter. Every time the vertex shader must start a new strip is costly.
Lighting is very costly. Shadows are costly, and with the wide range of shadow techniques available you can easily make a choice that's several times more expensive before you realize it. For a long while it was assumed that Mobile could only handle 1 light.
Textures, materials and shaders have a huge impact. Sometimes the visible results are subtle but the computational expense is huge. On PC and console, where the GPU's are powerful, large, complex shaders that do everything are better than switching between many shaders, because those GPU's are so fast running shader code that switching shader programs is a performance loss. On mobile, generally the reverse is true. The GPU's are weak enough that using very small, light, efficient shaders is more important, and the relative delay of switching programs actually produces a net gain. Of course, not switching shaders at all would be best, but that's just not always practical. For mobile, multiple pass materials are just impossible on weak devices. Some higher end devices can rival previous gen consoles, so the range is frustrating.
Post processing is a huge net loss on lower mobile devices. Shadows, many lighting effects and some material effects are implemented with post processing. These can double, triple or worse the frame rate drop.
Although I've touched on checking the market profile of Android users, let me underscore the importance. This is a moving target. Every month the number of older devices falls out of the population, and newer devices come in. At some point it just doesn't make sense to work hard for a new application to attempt to reach that lower market. The older a device is, the less likely the owner is a paying customer. The battery is old and fades fast, so ad monetized applications lose out just on time. On iPhone, there's hardly more than two or three levels, and their highest end is beyond most expectations of mobile game designers, so we can aim for the middle with one application (which then must move upwards over time as they release new models). If an iPhone customer isn't upgrading, they're also not downloading and using software.
Android users, however, are very different. They're not as focused on upgrading to the latest devices (there's a divided population there, some do, many don't), even though they're still software customers. While frustrating, checking the overall population of various device types, and familiarizing yourself with the various GPU models in common use, and their relative power compared to your performance observations and profiling is key.
With all of that said, you really have to seriously consider the artwork relative to value as a product. A magnificent looking graphical appearance is desirable, but if it isn't efficient then it drains the battery. If your application runs ok on a weak device, it is probably efficient relative to battery drain on a better device. If, however, your application is struggling on a low end device, even though it may run well on a better device, it will drain the battery faster. That impacts perception. There is a popular, powerful game engine that can make games for high end (OpenGL 3.1 minimum) Android devices, but they focus so hard on high end graphics that the battery is shot within 10 minutes on a phone. You can only play those (reasonably) on a tablet. My summary point here is that while most new developers focus on frame rates, what really matters to making money is how well and how long the game plays.
In line with that last point is a separate design/art technique just as important, that art of making great looking images without all the special effects, lighting, complex materials and detailed models. This is an artwork specialization. If you can learn how to make the appearance better without spending GPU power (and electrons from the battery), you're much better off, on mobile. There are some ridiculously popular games on both desktop and mobile that have mediocre graphics (compared to what Unity can do), because it is gameplay that matters most. There's a graveyard of flops that had fantastic looking graphics, but terrible gameplay.
Your answer
Follow this Question
Related Questions
Graphics are displaying low quality maps/lighting 0 Answers
Unity 2021.2 Apple Silicon Performance Issues with DynamicGI.UpdateEnvironment() 0 Answers
Disable Post Processing v2 in selected Graphic Qualities. 0 Answers
Unity 5 baked GI weird result 2 Answers
Shadows are choppy on Android, but look fine in Unity Editor on my PC 0 Answers