Download

GPU Stat Profiling - High MS for VisibilityCommands

Hello everyone!
I’m doing some optimization for our game and I noticed when looking at the GPU stats that more than any other stat (over shadowdepths) we have VisibilityCommands. I can’t find too much about this, and when I looked at Unreals recent Inside Unreal episode about **Performance Optimization (Performance Optimization for Environments | Inside Unreal - YouTube) **I diddn’t even see the stat pop up in their GPU stats.

The only thread i can find talking about this say it’s by using world composition, but I tried to look in a test level that dont have it enabled and still a high value of VisibilityCommands.
The most annoying part about this stat is that the game runs pretty stable at 16ms… but only when the camera is still and not too many objects are in view. When the camera moves this stat can jump to using up to 14ms alone. I can’t really figure out what it is that is cuasing this, as it sometimes when staring into a wall with assets behind it it can eat 10-12ms and then when i look at a scene with assets it can jump down to 1-2ms =S.
Like it sounds like Visibillty commands have something to do with culling maybe? but then again why dont things change when i remove assets?

Anyhow… This is strange cry for help xD but I hope somone has an idea as what this could be.
Any pointers or ideas would be helpful =)
P.S Our project runs on engine version 4.24.3

1 Like


Time for this graph again (How Unreal Renders a Frame). VisiblityCommands is a common red herring becaus of how our occlusion wait works. You may want to set t.MaxFPS 10 to limit frame rate which makes the wait go somewhere else and then see if the stats changes drastically.

Wow! =D It’s kinda embarassing to say this but after a new workday has started my performance have gotten better after a computer restart :o so… should have maybe tried that… first…
I should also figure out a way for us to run perforamance test outside off the editor as it adds some extra stuff ontop right? Just needs a way to jump chapters to test points.
But yeah so let me ask you some things if it’s ok? Cuse i really wanna try to undertsand this stuff. What the “matrice”(not sure what to call it) say is that the frame waits for the occlussion to do it’s part? And in worst case sceanrio that can be a “hitch” for up to 4 frames? And thats the spikes I see when I move the camera around?
Also I still wanna try your 10 fps test, cuse might help with identyfying other things that pull down performance as this stat seems to increase when i load in a level containing our “event things”.

Also thank you for takeing your time and answering! =)

I faced the same problem = (did you find a solution?

I’m looking at the same… would be great if someone with more knowledge on this could explain (4.26.2 currently). Restart, amazingly, seems to help also here.

SOLUTION