When I upgraded to 4.5 I noticed I was getting a loss of 20 frames per second over how my game played in 4.3
I narrowed it down to Rebuild at Runtime for Navigation Mesh!
In 4.3 my game runs at a solid 90
in 4.5, any time nav mesh rebuilds, my fps varies from 80 down to 70s, or lower if many new actors are spawned frequently
#Rebuild At Runtime is Killing Performance in 4.5
Please address this.
#Clarity
I am indeed stating that just by upgrading from 4.3 to 4.5 I have lost 20fps on average, only because of Rebuild at Runtime feature of Navigation meshes.
This feature worked great in 4.3
Please figure out what changed!
I’ve done what I can by narrowing down loss of fps for you, please take it from here.
#This is going to Hurt Everyone and also Fortnite
Any game that needs to rebuild nav mesh at runtime is going to lose 20 fps or more (in my experience it is way more as more actors are rapidly spawned) !
Reload editor, and make sure the “building navigation” message lasts at least 10 seconds
construct a reasonably complex scene that takes fps below max on your machine
do this in 4.3 and in 4.5
observe difference in FPS while nav mesh is rebuilding itself in 4.3 vs 4.5
create some actors during runtime via key press, in 4.3 and 4.5, that have CanEverAffectNavigation set to true
Result = endless loss of FPS in 4.5 as long as you keep triggering navigation mesh to rebuild
So what this means for me is
#I have to revert to 4.3 until this issue is fixed
I can’t test actual fps drop of other game mechanics until this issue is fixed, and so I must revert to 4.3, because AI is stage of development I am most focused on right now.
#Urgent, I cant Use Future UE4 Versions Till This is Fixed
I had to revert from 4.5 because changes made to nav mesh system cause a 20-40 fps drop when nav mesh is rebuilding at runtime, a loss that does not occur in 4.4 or 4.3
I cannot use 4.6 either until this issue is fully resolved!
Most of projects I am working on require Rebuild At Runtime to be as optimized as it was before 4.5, I cannot admit a drop of 20-40fps due resulting limitations on rest of what I can do while keeping a decent FPS.
All I did was upgrade my project and I am consistently losing 20-40 fps when nav mesh rebuilds that I was never losing in my prior engine version which was 4.3 for project in question. I also tested 4.4 and did not encounter fps drop there either. It was mentioned in release notes that a lot of Fortnite navigation code got added in 4.5, and I can only presume that integration has something do with this sudden problem with Rebuild at Runtime.
I am bereft of all future UE4 updates until this Rebuild at Runtime issue is fixed, I simply cannot deal with resultant performance loss!
#I can absolutely verify that:
it was just upgrading to 4.5 that is causing fps loss,
and that it is indeed Rebuild at Runtime feature of navigation mesh system that is causing fps loss (turning Rebuild At Runtime off makes 4.5 fps loss go away.
even in 4.5, fps loss goes away once runtime rebuild finishes, but my game is constantly triggering rebuilds as new dynamically spawned colliding geometry gets added, and this was never an issue in 4.3-4.4
I can also verify that Rebuild at Runtime does not cause this FPS loss in 4.3 and in 4.4, even while rebuilding itself!
In 4.3/4.4 Rebuild at runtime feature performs perfectly, enabling my AI to navigate dynamically spawned colliding geometry immediately without any noticeable delay.
In 4.5 only, Rebuild at runtime incurs a 20-40 fps loss that it does not incur in 4.3 or 4.4, and without any noticeable or necessary improvement to its functionality as compared with this additional performance cost.
Curious if this is only in editor, or if it is in a cooked build as well. Only other thing I can think to try, is doing an instrumented profile (Visual 's would be sufficient) on both and see where problem may lie.
I was always test game from commandline and issue happens with editor closed, as far as packaging goes that is irrelevant to me because I need same high performance I had in 4.3 and 4.4 so I can test my game’s various features for performance issues while I am developing them
I’ve been having a look into your Navmesh bug and came across something interesting. If you can, please open up a blank level on both 4.3.1 and 4.5 and press “Show FPS”. Are you seeing FPS drop you mentioned there? I believe this may be a general editor drop but if this is not FPS drop you are seeing please let me know so I can continue to try and repro it on my end. Thank you!
I have indeed noticed general editor FPS drop in 4.5, however that is not test I am doing!
I am running my game from commandline, editor is closed!
Everything I have reported to you in this thread is only from perspective of a game run from commandline, and I have additional FPS issues in 4.5 in editor that take my FPS down to 30s in a very simple scene.
But please, let’s focus on Nav Mesh right now.
Please do my repro in a project that you run from commandline.
Here is a sample of the .bat file I use to test my project with editor closed:
I tried as you suggested, however I received a 30 FPS drop (from 90 in editor to 60 through commandline) in every circumstance that I attempted. states I tried were:
With Navmesh (Rebuild at runtime set to true).
With Navmesh (Rebuild at runtime set to false).
Without Navmesh.
There is a discrepency in FPS of about 30 FPS in every situation that does not appear in 4.3. Is this what you are seeing? If not, do you have a stripped down project that I can see error occurring?
You were correct on fps cap. I upped it to a max of 200 and did not experience any FPS drop when running commandline second time! However, I’m still not certain why I am not seeing an FPS drop and you are. How large is level you are working with that is causing error? Are you using bsp, static mesh, landscape (any combination?) that could be assisting in drop?
Anyone else reading this might think “oh but of course large nav meshes take FPS down,”
but my point is that this drop NEVER happened in 4.3 or 4.4, even for large nav meshes! And my AI still performed perfectly while new nav mesh was being generated!
So yes you need a large nav mesh, like 10-15 times size of third person starter level.
As far as scene itself, I just use static mesh actors, no BSP or landscapes
You could construct a reasonably complex scene with this large nav mesh I am describing and see what happens!
As I mentioned in my Repro, it should take your computer at least 10 seconds to rebuild nav mesh when you load editor, you want a nav mesh that causes that long of a rebuild.
Is my repro making more sense now?
Let me know if this helps and let me know what happens once you construct a scene with a nav mesh that takes at least 10 seconds to rebuild itself once you shut down editor and re-open level, with rebuild at runtime active
Thanks!
PS: remember this a serious problem, I reverted to 4.3 from 4.5 because of this issue, please understand I need a real solution for this issue which never happened in 4.3 or 4.4 and it directly affects fortnite and any game that uses rebuild at runtime.
I ended up adding more than 3x4 of floor pieces, and I also have various capsules and pyramid static meshes on each floor piece, ended up with approxmately 30 floor pieces.
Here’s a pic of fps at game start, and then after nav mesh rebuilds