garrysmod-issues
garrysmod-issues copied to clipboard
allow nav_quicksave 1 to prevent nav_analyze
Details
When working with nav meshes, I noticed that in older versions of the engine, like source SDK Base 2007, if I run nav_generate and set nav_quicksave to 1, I never see messages in the console like "Computing Mesh Visibility" and the nav mesh computes a lot faster. I only see those when I set the quicksave value to 0 and let it run its nav_analyze
What makes me think this
I have a map with a small section I want to incrementally add a nav mesh too with nav_generate_incremental. In source SDK base 2007 I was able to generate it in seconds, but in Garrysmod the game hung up for a very long time when trying to generate the exact same section, so long that I just closed it. Unlike the other version of Source, while in Garrysmod I can see "computing mesh visibility" in console, so it's almost like nav_quicksave doesn't do anything, and it runs nav_analyze regardless. This is a problem because not all Nextbot NPCs (at least in my use case) even use the data generated by a nav_analyze, and analyzing a navmesh on a large map can take longer than generating the mesh, which already can take a very long time on its own, and also tends to bloat the file size, I honestly prefer going over the navmesh manually with the navmesh editor and fixing up any generation issues by hand using Easy Navmesh Editor (thank you).
Another thing that leads me to think nav_quicksave is being ignored is that I was able to sneak a "nav_save" command in while gmod was freezing off and on and it actually saved the navmesh which I then loaded and inspected and it worked fully except for a message saying it needed a full analyze (duh)
Honestly, I've been ignoring this issue for years and I've always just generated nav meshes in Source SDK base 2007. Now its 2020 and the recent maps in Gmod have just started crashing source SDK Base 2007, making it impossible to generate navmeshes on it unless I decompile the map, remove the materials, and as many non-essential details until it finally loads in Source SDK base 2007, which I've done more times than I care to admit.
Steps to reproduce
set nav_quicksave to 1 try to generate a navmesh nav_analyze seems to run regardless
Thank you
Because I'm getting really close to publically launching a gamemode I've been working on for over 4 years, I've been putting in a lot of issues lately. I know its probably a little annoying but thank you for being so on top of things @robotboy655
I don't see anything in the code to suggest its meant to work like you want it to.
nav_quicksave only skips 2 things: ComputeSpotEncounters and ComputeSniperSpots nav_analyze just reruns nav_generate by skipping 2 steps: SAMPLE_WALKABLE_SPACE and CREATE_AREAS_FROM_SAMPLES
Comparisons to 2007 codebase aren't exactly fair, the game runs on the 2013 branch.
"Computing mesh visibility" is actually something that, to my knowledge, was first introduced in Left 4 Dead and was added to the 2013 SDK base. So unfortunately some of the newer stuff (which we don't seem to have bindings for, come to think of it) isn't skipped over.
Ideally, we could have a convar to disable those parts of nav mesh generation in gmod. I would much rather use gmod for generating nav meshes directly, but it just takes longer than source SDK base 2007 in pretty much all circumstances because of the extra stuff it computes that we can't even use.
Ideally, we could have a convar to disable those parts of nav mesh generation in gmod. I would much rather use gmod for generating nav meshes directly, but it just takes longer than source SDK base 2007 in pretty much all circumstances because of the extra stuff it computes that we can't even use.
Most definitely that’d be nice. A lot of stuff that was used for CS navmeshes (approach points, etc.) that are very useful in a team-based tactical shooter (they let bots know where areas players can come in to sneak up on/flank them are) got removed and replaced with the new stuff L4D has, which is naturally much more useful for a zombie survival game.
Would like to add that nav_quicksave 1 does not prevent automatic visibility analysis after generating the basic mesh when using nav_generate_incremental on 2023.02.27 gmod dev.
As a workaround, you can set nav_max_view_distance to a low number such as 2
nav_quicksave 2 will skip visibility calculations.