Unlike other Thursdays, there's no update today. The reason for this is that we have been migrating the Planet Nomads project to Unity 2017 in the past two weeks. After a couple days of work, we have successfully rewritten the shaders, put various graphic presets in order, reformatted GUI to display correctly, changed a few APIs here and there and got the project running in Unity 2017.1. Only to find out the performance is 10 FPS lower on average.
OK, no need to panic quite yet. With the many custom optimizations and changes in the PN project, there must one feature which was slowing it all down. It was just a matter of putting on the detective hat and digging deep to find it.
The new profiler from Unity 2017 was the main feature why we decided to update. It was supposed to show exactly where performance bottlenecks where, whether it was the physics calculations, database operations, synchronization, voxel calculations, etc. The problem is - the profiler only shows the trouble is in a high CPU load on rendering, with no details given. Rendering is the visual projection of the game on the screen, in other words a very broad term that incorporates... well everything visual.
So we went through trying various rendering APIs DirectX 9, 11 and 12 and Vulkan... to no avail.
We tried different work with the database locking with SQLite, different camera settings, turning full-screen camera effects off one by one, different shaders (minor improvements here), but not what we needed.
Progress was made by switching from Dynamic Batching to Static Batching.
But it didn't help as much on other machines in the office, and was still a downer compared to the original performance.
We continued with GPU instancing, occlusion culling and similar performance helpers (or killers)... we tried different versions of Unity 2017.1, .2 & .3 but it only got worse. The results are a bit better than with 5.5 previously, but still not an improvement over the current version of Unity Planet Nomads uses. This is what we got in the end:
As you can see, the difference is lower FPS rates, and very little to gain from switching to 2017 now. We're staying with 5.4 for now. The good news is the project runs there, so once the performance of the updated Unity improves, we can switch to it.
Rest assured this is not the end of the world. There were two features we were looking forward to with Unity 2017. The first one was the possibility of improving performance due to a more detailed profiler [LINK] and using Vulcan instead of DirectX. The results were the exact opposite so no loss here.
The second feature we were looking forward to was fixing the OBS fullscreen recording, but Escape from Tarkov is also using Unity 5.4 and streamers managed to fix that by running it in admin mode.
Not that big of a deal really, although both our Martins are a bit itchy and mildly irritated by the prospect of spending a few more days to redo the work they had already done. The good news is that the rest of the team is working on the features leading to the November update. So thatnext week, we're going to have buoyancy blocks. For building a base in the middle of the ocean. Or water crossings. Or something else entirely... like a floating hover-powered oil rig. The fix for the hovercrafts falling flat when built on existing structure that you so rigorously reported will be part of that update too.
Thanks for reading, Nomads. Update next Thursday.
Leave a Reply