Mutable and Metahuman - General performances and draw calls

Hi

I’m trying to use Mutable and Metahuman to explore the possibility of customization on multiple characters.

On the performances side, i wanted to see how many characters i can have without having performances issues, and it’s not as good as I would have hoped.

With 64 characters with animations, i run around 20FPS.

I have attached an insights capture, where you can see a lot of time on the tag Head (the main object name on the Customizable Object), on game thread and foreground tasks.

I have read on the documentation here https://github.com/anticto/Mutable\-Documentation/wiki/Resource\-Usage

that we can enable some informations on Insights for Mutable, but no informations about how to do it.

Are theses performances normal ?

On a second hand, Mutable can merge multiple textures if they share the same material, but i haven’t found a way to do it.

https://github.com/anticto/Mutable\-Documentation/wiki/Texture\-Layouts

On my scene i have around 16 draw call for each character (2 for each materials), nothing is merged, but half of the materials have the same base.

On the mutable sample project, the customizable character have around 40 draw call, with a realy similar hierarchie as mine and look to have the same problem.

How to enable the texture merge on a mutable object ?

Hey there,

Apologies for the delay. As we prep for Unreal Fest next week, things are a little slower.

Generally speaking Mutable can help in some areas but there are still general performance concerns that you need to tackle. Taking a look at your trace, there are some concerning things that I’m seeing but to get all of the information we need to run a capture with a couple more options. Specifially with Stat NamedEvents on andStat Mutable also on.

One thing I also notice from your graph is that you’re grabbing lod 0 of the Metahuman mesh to generate the combined mesh from. Typically we don’t recommend using LOD 0 for runtime for Metahuman things. It can be very expensive on its own for lots of reasons. But I can help verify that with a new capture.

Hi

Thanks for your answer.

I have attached a new capture with Stat NamedEvents and Stat Mutable

I have tested to change the customizable to be based on LOD2, and i don’t have any improvements.

The scene still run at 20fps and i see no notable changes on Insight.

This capture is attached too.

(i don’t know why i can’t attach multi files on an answer, everything is on the zip)

I forgot to send the mutable window, but it don’t give many informations.

Streaming Ops only increase each times i start the play mode

Everything else stay at 0.

[Image Removed]

Thanks! Both captures are very helpful and identify areas that you can work on to help with performance. I’ll caveat that even with reducing the LOD in Metahuman, there are some features that are on that can still cause some issues.

To kick this off, there are two parts in the captures that show issues. In the first part of your LOD 0 trace you’ll see spikes (in green). Roughly around the number of metahumans you have. This is the initialization of Mutable and is what I would expect to see. There is a cost to Mutable in terms of spikey performance when building a lot of runtime meshes, but we’re adding streamable meshes in 5.6 to reduce the hitches further. Iny our second capture this is reduced because Mutable is working with less mesh data to combine and then set on the skeletal mesh of your actor. The second part is the static cost ( in red ) of your frame with that many characters.

[Image Removed]

This isn’t actually due to Mutable as it’s done its work by this point. The metahuman setup, specifically the pose driver nodes in the animgraph are causing a lot of time to calculate each frame, and with this many characters it’s blocking the game thread.

[Image Removed]We see this quite often with folks using Metahuman, and there are two things you can follow to help you reduce the characters further for runtime use.

First, we’ve written an animation performance guide that you follow to help you narrow down animation performance issues and how to solve them.

https://dev.epicgames.com/community/learning/knowledge-base/xBZp/unreal-engine-performance-tips-tricks-animation#performancetips&tricks-animation

Second the Metahuman team has put together guide on how to use Optimized Metahumans.

https://dev.epicgames.com/documentation/en-us/metahuman/optimized-metahuman-in-unreal-engine

Unfortunately, this is the nature of Metahuman for runtime use and there is work to be done to have more than a couple of Metahumans on the screen at a time.

Dustin

Thank you for your answer, i will work on that way !

I come back to the second part of the question,

>> On a second hand, Mutable can merge multiple textures if they share the same material, but i haven’t found a way to do it.

https://github.com/anticto/Mutable-Documentation/wiki/Texture-Layouts

On the Customizable object preview, i can see 8 sections corresponding to the 8 initial materials.

With the texture layout, i think some part must be combined on the same section.

Is there an option to enable texture layouts, or something to do on material ? [Image Removed]

Apologies for the delay, was wrapping Unreal Fest. Have you looking into “Extending Mesh Sections”? If those sections use the same material this should reduce the section count. Then you use texture layouts to combine the textures.

https://github.com/anticto/Mutable-Documentation/wiki/Node-Extend-Mesh-Section