Closed BigHatMarley closed 3 months ago
Thank you for a detailed post! Indeed, zombie LODs would be nice to have for crowded scenes; as for players/items, those are sparse and often get culled from view, so the performance gain might be negligible for them.
Feel free to upload your work in this thread or privately if you prefer.
No problem Felis, I shall be uploading the Zombie LOD files in a zip to this thread, ready for inspection, testing and deployment on your own end.
While players and items may not see as much benefit from LOD, I'll say the files are at least available for if they're ever needed! Zombies are a much bigger priority however, so we'll at least start with them first.
Note : Some of the Zombies already posessed good LOD, and have been left untouched. Only those lacking it, or posessing the code but no suitable models have been modified.
If there's any issues, don't be afraid to get a message out to me. I'll gladly help if possible.
Your changes were committed to the dev build. Once the update ships, how would you like to be credited in the changelog?
(Added in dev-r10051)
Good to hear that the changes are recently committed! Hope it wasn't a pain to do.
You can just credit me with "Big Hat Marley" in the changelog, that'd be perfect.
I'll be more than happy to keep submitting further suggestions and fixes/additions when I can, and see if the team deems it worthy to add/do. I'm passionate about the game, and want it to be the best it can be.
I'll assume that if I have a possible update for any contributions I send in, I just make a new post and point you to it?
Have a good one, Felis and the rest of the NMRIH team.
Hello hello, people of NMRIH. I come to make a humble request. (Also, first time posting in github.)
During my time playing the game over the thousands of hours, and digging through the game files, I realised that Level of Detail is not utilised on common models often, if at all. (Zombies, Players, Weapons etc.)
While this is not a major issue on standard maps included with the game in normal gamemodes, custom gamemodes and maps often increase the raw zombie and item count, and are often not enclosed spaces. This puts a noticeable strain on the rendering performance.
So, I spent the time to quickly create a full array of LOD models for all the zombies, and used internal and external tools to view if there's a performance difference from them simply existing. Even on my Ryzen 5800X3D and RTX 3060, I saw the game increase it's framerate in one of these open maps quite significantly. Usually it'd run easily at 300+ (default frame cap hit) on official maps, but these custom maps could bring it to sub 100fps. This tweak alone brought it above my new cap of 144fps and made it rock solid.
Including at least Base Model + 2 levels of LOD on models also makes the "Model Detail" setting have an actual effect, rather than being mostly placebo for several NMRIH specific assets. The HL2 assets posess LOD, and therefore get model detail adjusted correctly. You can also use the LODs for the Shadow rendering, but I didn't note any major performance boost with it on it's own. Best as a whole package, really.
The technique I employed was a quick and rough one, but it's results are quite reasonable and hard to notice much, if any, fidelity loss ingame with the right LOD values used. An actual modeller/artist could likely do better, but I did what I could with my limited knowledge. (Import model into Blender > Decimate to x% of Triangle Count > Export LODs. I made 6 total LOD, falling by 12.5% per stage for fidelity preservation, finishing at 25% of base count. This could be cut down to a mere 3 at 25%, or whatever balance. 100%, 87.5%, 75%, 62.5%, 50%, 37.5%, 25% ) Simply reference them at different LOD 20/40/70 numbers in the .QC file, and it's done.
Internal profiling and comparison was done with +showbudget (and budget_panel_height 1024 to make it readable!) and watching the bars change based on the visible zombies on screen, toggling the LOD on and off to see the difference. External was RivaTuner to keep a track of FPS. (The real turning point is when over 100 zombies are visible onscreen, which as aforementioned, unlikely in normal gameplay, but custom maps love zombie spam.)
I'd love to share my work and refine it for you just a bit more if it'd get used in the base game. People with much older hardware, more era-accurate for the game's release (2013-ish) have reported back improvements to game performance, even as a mod on the workshop. I've personally been playing with it enabled for over 5 months, and I've felt no issues, just a snappier, faster game. This is all on Windows 10, 1080p, with pretty much every Video setting cranked to maximum. (Except MSAA, which is x2. Any higher is overkill!)
TL;DR : I'll happily send over my current work, and tweak/improve it if needed for inclusion in the game. I understand if this is not desired and goes ignored, but I think it's worth considering. Sorry if this post is a bit rambly, lots of thoughts to get down and information.