What is "GetDynamicMeshElements"?

Hey,
I’m currently optimizing one of my projects and stumbled on a process called “GetDynamicMeshElements” in STATGROUP_InitViews. Since it takes up significant rendering time I wondered what it is and how to minimize it, but I couldn’t find much on the internet.

Any Idea?

Thanks in advance!

Greetings @TimPotratz

Take a look at this documentation. It goes into some detail about GetDynamicMeshElements. I hope this helps!

1 Like

This is great, thanks! Though I’m not sure what counts as a ‘primitive dynamic mesh element’? Is it just a static mesh set to movable?

Hello, have you found a solution for this problem ?

Old thread, but I have same issue and a few findings to add. Everything regards UE 5.4.4.

First off, you can disable rendering paths to isolate issues with Showflag.xxxxx 0 It allows you to remove landscapes, nanite meshes, particles etc. WRT the issue, I did this with Insights running, but I found nothing (ironically) despite my own advise.

What did find though was WaterBodyOcean causing regular spikes in the GetDynamicMeshElements. Water just happens to be under a different flag (r.water.enabled 0).

By disabling water, the spikes disappear, but performance degrades overall. You can see the spikes here, and the stark increase in the render thread. Note, I only get these in package builds, making it tedious to find the problem.

The increase (~4ms) after disabling water is made up of “MeshDrawCommandPassSetupTask”. I can’t find any mention of what this process does unfortunately.

The crazy thing here is, if I delete the ocean, the spikes go away but the performance degradation persists(!). Meaning that, I gain like 10fps by having an ocean in my game despite it being occluded by a cave; At the cost of regular performance spikes.

Water plugin is experimental, so I will reserve judgement on this!

P.s. It would make a crucial difference if Epic can provide an extended break-down of GetDynamicMeshElements. I am pretty certain that for many developers there’s a lot more wrong going on in there then “skinned meshes and landscapes”.