Performance explanation sought-after - Skeletal mesh versus static mesh in AI movement

Dear community,

I was playing around with a simple AI and wanted to know how what performance an AI has on a mobile android game (Current testing device: Nokia 7). [ol]
[li]So I created a map with a simple landscape and a top-down character and it runs fine, no performance hits whatsoever (stable 60fps (Cap))[/li][li]Afterwards I created an AI: Character + Blackboard +etc. with a very simple task: Move to random point in radius: Litteraly: Get AI actor location -> Get randompoint in navigatable radius -> AI move to[/li]

[li]So i started inserting the AI’s into the world, I decided that I wanted to test different options with 200 AI characters which are only choosing a random point in radius and move to it.[LIST=1][/li][li]Character setup: Standard UE4 Mannequin ( with LOD, 2300 vertices)[/li][li]Result: Massive performance hit ~27 FPS[/li][/ol]
[li]So i Thought: Maybe too many bones? So i imported an “fake skeltal mesh”. Just a cube with no bones [ol][/li][li]Performance result: a lot better: 37-38 FPS (Apparently the bone structure (And probably collision structure) of the default mannequin is too much too handle for the phone (Or the animation blueprint, but do not expect any difference). But still, i want a lot more performance than 37 fps with only 200 boneless cubes roaming arround[/li][/ol]
[li]So i lookedat this post (A question of mine years ago). And I saw that I can enable “navmesh walking”, so i did: [ol][/li][li]Performance result: ~ 37-38 FPS. No difference at all[/li][/ol]
[li]I also read about the pawn movement component instead of the character movement component. So I changed the class to default pawn, (Had no skeletal mesh within the default pawn, only the default sphere and I ran the project again[ol][/li][li]Performance result 47-48-49 FPS. Holy moly, what a difference![/li][/ol]
[li]But I thought, I am only able to insert an static mesh, lets set the static mesh to none, and add a boneless skeletal mesh (the cube). I expect to have no difference within the performance, since it is only a boneless cube:[ol][/li][li]Performance result: ~41 fps. Huh? 7 FPS difference for a boneless skeletal mesh instead of a static mesh?[/li][/ol]
[/LIST] So my questions are:

Can anybody explain this behavior to me?
Apparently skeletal meshes (even tough with nearly no information) have a massive performance hit relative to static meshes. Why?!
Enabling Navmesh walking changes nothing in my performance, Why?!
Main goal here is: I want to have maximum performance, preferably with the character movement component (Due to replication). How am I able to achieve this?

The only thing that comes to mind is by default the movement component support replication by default so if you have no need for network features you could try turning it off.

Normally I would suggest running a profile as FPS alone does not say much as to what is actually causing the performance hit. Since I’m not up on what can and can not be done as far as mobile goes I’m not sure of the process you would need to preform. If possible you could do a with and with out profile and see just whats causing the problem.

Hey Frank,

Thank you for replying. I need the network features. I also turned the replication off, no difference whatsoever.

I am also not sure how to profile on mobile (First mobile try-out with performance needs). Also, I am not able to find it on the first look. I will look into that.

However, I am able to run commands so I know that the cause of the fps drop is the movementcomponent. For some reason it is way more expensive (also without replication). I would love to know why.

I also would like to share the following improvement: Apprently “navmesh walking” is not enabled by clicking on the checkbox within the movement component. You should set the movement mode in the AI character via beginplay (Thanks to this post). Is increased my FPS rate to a stable 49 with the boneless cube.

So I changed the skeletal mesh to the the UE4 mannequin. The thing was: It was still running on 49 FPS!. I figured out that that the animations where not enabled and that with the animations enabled it does have a massive performance impact (from 49 to 36 fps). Who figured that?!

So now with navmesh walking enabled (properly) and a complex animated characther (default ue4, way too many bones for mobile) I am able to run a stable 200 AI’s on the navigation mesh with tasks like random point in radius, move to homebase, move to specific actor location in the map (Querried via vector positions diffs relative to AI of all world objects) and have thousands of interactive objects with a stable 30-31 FPS on a mid-range mobile like a Nokia 7.

I am quite happy with that:) If I disable the animations it runs a stable 37-38fps with 10k instanced trees.

If anyone has any improvements or explanations I would love to hear them. Also, If someone knows how I am able to profile properly, please let me and others know.

If I find anything new, I will make sure that I post it here.

Kind regards,