[4.5 Rendering] Terrible performance loss for skeletal mesh actor as compared with 4.4

Dear Friends at Epic,

I just did a whole bunch of performance tests.

In 4.5, skeletal mesh actors with 25+ bones are causing a terrible performance loss, even with shadows turned off.

The skeletal mesh actors are spawned into level to match 100 target points I placed in level.

The skeletal mesh actors have no physics asset, shadows are turned off for every material, and they do not have an animation blueprint.

The light in the level is set to not cast shadows

#As Compared With 4.4

In 4.4 I could get up to about 400 of my playable character units in the game simultaneously, WITH AI being active, and I was still around 60fps

That is completely unattainable now.

Now, with 30 skeletal mesh actors of the same skeletal mesh, that dont have physics or shadows, I am down to 60fps.

I set my frame rate cap to be 90, I am sure it is not my frame rate limit :slight_smile:

#Proportional

This incredible performance hit in 4.5 seems to be proportional tot he number of bones, with skeletal mesh actors with only 9 bones, 100 units of them did not cause any fps drop

With 100 skeletal mesh actors with no shadows and no physics asset, but with 33 bones, the drop was around 60 fps

With 100 skeletal mesh actors with no shadows and no physics, but with 70 bones, fps drops to around 40.

So it seems to be proportional in some way

This also makes making an RTS game in UE4 completely unviable at the moment

Cause I need to get a minimum of 200 units per player in the game, with up to 8 players

Again in 4.4 I got up to 400 units WITH AI and collision as actual characters, and maintained 60 fps

In 4.5 I cant even get 30 skeletal mesh actors with no capsule that dont move and dont have AI and dont have anims to maintain 60fps

#What is Going On Here?

#:heart:

Rama

PS: its perfectly fine for you to tell me that you’ve utterly changed the rendering system in 4.6 so my research and concerns will be irrelevant when 4.6 comes, just please do tell me that or tell what is going on here in 4.5 in relation to rendering of Skeletal Mesh actors (not even talking about characters here:)

Hi Rama,

I’ve tried to recreate your issue in both UE4.4.3 and UE4.5.1 with a basic Behavior Tree level with 100 skeletal meshes with 64 bones each. The 1st picture shows the 4.4.3 version and the 2nd picture shows the 4.5.1 version.
Both frame rates are virtually the same:

There have been no major changes in the way skeletal meshes are rendered that I am aware of in the past three builds. However, if the repro steps I’ve taken do not represent the same issue your describing, please let me know what I can do to better recreate the issue. Also, if you would like a copy of these projects to test on your machine, I’ll be happy to send them to you.

Thanks

I will construct a repro case and let you know what I find along the way!

Nice to hear from you !

Rama

Hi Rama,

Since I have not heard back from you in a few days I am marking this post as “Resolved” for tracking purposes. If you are still experiencing this issue, please respond to this message with additional information and I will offer further assistance.

Thanks

Its’ definitely not resolved, I am going to be composing more tests and will let you know shortly!

Have fun today !

Rama

Hi Rama,

Just checking in. Are you still experiencing performance loss in UE 4.6.1?

Lovely to hear from you !

Nice profile pic!

I will check out this matter soon as I can, I got sidetracked by other priorities

Thanks for thinking of me!

#:heart:

Rama

Could this please be investigated? This problem is still there in 4.6, 4.7 and 4.8!! I don’t need to add anymore than what Rama has already put forward.

Could this please be investigated? This problem is still there in 4.6, 4.7 and 4.8!! I don’t need to add anymore than what Rama has already put forward.

Sorry double post.

Hi paulv2k4,

I ran a test with 100 skeletal meshes in 4.4.3 and 4.5.1 with no fps loss (as shown in the images above.) I was waiting to hear back from Rama to see if he could offer more insight from tests he intended to run.

This is not a commonly reported issue. However, if you can provide more details about your project and how I could accurately test it here, I will look into it further.

Thanks

Hello, I’m having the same “issue”(if it is issue at all). For testing purposes i created new project based on third person template, created a new scene, basic lighting setup, scaled bsp cube as ground plane and third person player character. I also made blueprint, that spawns one of specified things in random point in radius of 3000 from (0,0,0). The list of things i made it spawn:
1,2. Character, made of third person character, possesed by AIController with and without simple Behavior Tree(just looped wandering script)
3,4. Skeletal mesh component for scene, with third person character mesh used. With and without animation.

After each test I restarted level, so nothing leaks. My frames are locked at 120, and PC specs are 4.3GHZ i7 2700k, Gigabyte GTX 780(3gb VRAM), and 16GB RAM. I was using UE4 version 4.7. During all test system usage remained the same for some reason(around 23% CPU, and 60% GPU)

Here are my framerates for 99,198,297,396 and 495 objects spawned.

38154-ue4_framerates.png

I think that huge(120+ to 66) FPS drop caused by 100 NPC even with simple AI(without any lighting and decorations on the scene) , is a big problem, since it makes impossible to create crowds even with 100 units in it

Hi heme3ic,

I have run the same test as before with 100 AI characters following the same BT profile and got the exact frame rate as shown in the above images (approx 57fps.) -So there does not appear to be a drop in frame rates between engine versions.

In regards to optimizing frame rates for crowds, you would not want large amounts of (“smart”) AI bots all firing individual behavior trees which would significantly lower your frame rates. Instead you would want like 20 “smart” AI bots dispersed and multiple “dumb” AI bots drawing their behavior from the smart bots (or other blueprint or programming solution like “enable DetourCrowd”) -as opposed to having each bot making their own individual decisions.

Please try this solution and see if it does not increase your frame rate significantly.

Thanks

Oh, thanks. But whats most resource-consuming in AI? Is it patfinding? Or Behavior Tree itself? Whats the best way to simulate village with ~200 citizens with each person’s individual pathes and “relationship”(basically bunch of float values) with other villagers?

What’s most resource-consuming is what is being calculated every frame which is being set up in your Behavior Tree. For instance, if you followed Ian Shadden’s behavior tree tutorial, his AI character is recalculating where to move, sphere and line tracing at least once every .25 seconds. Multiply that by 200 and you will definitely experience a decrease in fps.

So in your case, most villagers should be simple avatars that take commands from the outside and do very little on their own, following a very basic Behavior Tree. Then dispersed throughout, a few other characters with more complex behavior trees as described in the first paragraph.

Try doing with this with instances of two characters, populating the world with 200 characters at this ratio: 10 simple to 1 complex and see if that does not dramatically increase the frame rate.

oh, thank you, i’ll try this one day