Profiling & Improving Performance
This week’s focus was profiling the game’s performance and optimizing, replacing or disabling systems that have too high of an impact on the framerate. Since I had family visiting and the weather was great I did work significantly less this week. Doing separated testing was a great fit for the limited time I could put into the game. Even though the time invested was a lot less the impact of this week’s work is significant. I’ve discovered several areas/systems in the game that significantly reduce performance with sometimes very small benefits. The biggest one was the volumetric light (sun shafts) taking over 3ms to process. 3ms may not sound like much to some of you but once you know what it means in context it becomes clear how much of an impact this is. If your hardware takes 16.67ms to process a frame you will end up with 60fps. Adding 3ms to it and you end up with only 51fps or on the flip side saving 3ms would mean you get 73fps. The relative framerate gained is dependent on your base framerate. Saving 3ms at 125fps would for example bring it up to 200. You can see how much a 3ms difference in processing has on your framerate, ultimately potentially being the difference between a smooth experience or a rather laggy one. For now I’ve disabled the volumetric lighting since it’s only adding to the visuals when you have objects like trees or other edges resulting in those beautiful sun shafts. I will be going back to the asset and testing if I can get the computation impact lower by reducing a lot of the settings or if that is not possible replacing it with a cheaper alternative. For now I don’t consider this feature essential so I won’t invest the time into it at this point in time. I’ve also tweaked or replaced a few other systems to reduce the processing time on my computer to about 7.5ms from originally about 11.5ms or in other words from about 85fps to around 130fps or shaving off ⅓ of the original time required to compute a frame. I’ll be working on the options menu next week which I originally planned for the next tech demo. I will be providing an art demo before the next tech demo to serve as a benchmark test for the new photorealistic art style change and how the performance with it and the new optimizations will be on a variety of hardware. This art demo will not contain furniture interactions and a few other systems that had been included in previous tech demos as those will be included in the next tech demo instead. Finally I’ve done a little bit of work on further integrating more vegetation into the game. There is now more than just one type of tree, various plants etc which all have support for seasons, snow, wind and more. The diversity and density for the vegetation will be incrementally increased and improved to be able to closely monitor how far I can go while staying within the target performance. I’m targeting the following weekend for the art demo to be available for those interested in testing it. Please get in touch if you would like to participate.
Notable tasks this week:
Further implementation of photorealistic models
Added more photorealistic vegetation and terrain textures
Profiled performance of many systems and replaced or optimized several with high impact on performance
Various small improvements & bug fixes
Wishlist on Steam
Join the Discord
That’s all I got this week. I hope you are all doing well.
Stay safe out there and I’ll see you next week.
0 comments