The Unity Support Docs do a great job of breaking everything down, but I’ll cover the how-to end of things for ease of understanding. One addition I will make that doesn’t seem to be said is this: Test your game, early and often, on your chosen platform. If you are aiming for multiple platforms, test your game on the one with the weakest hardware if you can’t constantly test all of them. Yes, building and switching platforms can take some time, but in the long run, you will save yourself hours from having to recover from unpleasant surprises.
Regardless of platform, the less things you have going on (scripts, polygons to render, physics, particles, etc.) the better your framerate will be. This is the root of the issue, and the struggle to maintain a balance. While you may envision a potted garden for your game with hundreds of rounded pots that can be affected by physics and perhaps smashed or otherwise changed, this might not be possible for a mobile or web-based game although you have the ability to build/publish it. The picture on the right shows one of my models for such a thing, and while it looks good, it has far too many drawbacks for a less powerful hardware set.
When we use Unity to take a look at the wireframe version of the pot, we can immediately see some of the issues. The crumpled dirt on top which looks lifelike, consists of a great many triangles that need to be rendered every frame.
With only this pot in the scene, the statistics window shows a count of 5,900 triangles to be exact. This simply will not do on something like a mobile platform. In order to optimize it, it will need to be less rounded and more simplified. We can keep the textures more complex to maintain a sense of realism, but our focus should be to eliminate as many of those extra triangles as we can to make things easier for the graphics processor.
In addition, this model is made of 2 separate meshes – one for the pot and one for the dirt itself. When we optimize it, we should also combine those meshes into a single mesh and eliminate complications.
While your own 3d model program may vary (blender, Maya, 3ds Max, etc.), I will be using Cheetah3d (which I used to design the model in the first place) to make my edits.
For the first step, I have eliminated the dirt mesh completely so we can focus on the pot itself. We’re going to eliminate some of the roundness in the process, but in doing we will also be cutting the triangle count of the pot mesh in half. Originally the pot consisted of 210 polygons, but after some editing the count is down to 105.
Next, we’re going to simply raise the interior base of the pot and texturize it as the dirt itself. In doing, we will accomplish 2 things: create the dirt we want while also eliminating more polygons that would have gone unseen anyway. If we put our effort into the realism texture instead of the realism of the model, our video card will love us.
Once re-textured, we’ll bring the model into Unity.
As you can see, we’ve seriously uncomplicated the model and made it much easier for hardware to handle.
According to the statistics window, we’re now down to only 366 triangles, which is only 6% of the original model. Further focus into the bump maps / normal maps of the model can make it look better, but this model is now readied for a more universal range of platforms.
That said, if you have no intent on publishing your work onto a “weaker” platform, you can utilize more complicated and realistic models. Again, be sure to read into the Unity official optimization documents and judge for yourself.
As an added bonus to this article, I will set up the two versions of this pot for immediate download into your own projects if you like. Just download via the links below, and import the package into your own game to use however you like :)