"Set Visibility" does it help with texture/memory and other optimization?

Hi,

Lets say I have a character BP with 5 objects inside, each of these objects have complex materials with multiple 4K textures applied. At some point in the game I set 4 of them to “Visibility OFF” with the goal of saving performance, I am not destroying the components. Does Unreal still keep all those materials and textures and poly counts of the hidden objects in memory? do they still occupy the same space or does it dump them to make room for new assets in my scene?

Also what is the difference between “Hidden in game” and “Visibility” do they have the same function?

Thanks.

I thought someone would have an easy answer to this simple question :).

Performance and Optimization is as far from simple as you can get.

Generally speaking, if something is not being rendered then you will not pay a cost for it on the gpu.

You can easily google the difference between Visibility and Hidden In Game. e.g.
“Visible” toggles the actor’s visibility regardless of the state (editor or gameplay). “Hidden in game” is used when you want the actor to be visible in the editor but not in the game while you play.

Thanks for replying,

I do understand the differences and what each one does, however I think you misunderstood my question.

I do understand that if you set something visually off the GPU will not “Render it” hence save performance on that render level, but the question is about GPU memory in this case, this is much harder to determine off the bat which is why I asked.

I wanted to know if an object is “set to visibility off” dynamically in a game, Does UE still keep the said object’s textures and material resources in memory or does it flush them out to create room for new resources, since I am not destroying actors as in case of spawns I would like to know if this is the case or not. I have many complex objects in the game that I can’t simply destroy and spawn but rather set visible on and off, and so I would like to know what kind of impact this is having in terms of memory and resources in the game.

(i’m still working on the stat tools meanwhile and log files to determine these myself but i thought if someone has a specific straight answer when it comes to this one thing, it will be helpful and help me save some time).

Regarding Hidden in game and set visibility, I do understand the differences as well when it comes to viewport vs gameplay, but again my question revolves around similar cases, for instance in many cases Sequencer only allows you to set an object hidden in game vs setting visibility. I read there is also a legacy thing going on between these two, In all cases this last bit is not as important to me as finding out more about how resources are treated behind the scene as in my first point above.

Thanks again.

1 Like

So, to save more resources it is better to attach to component or set visibility?

I’m hoping someone still can weigh in here. Hard to find information about it, and it’s very convenient to keep character accessories in BP and levels.

1 Like

I don’t really notice a performance increase when I do toggle visibility, which is VERY odd.

However, when I CULL, I get instant performance.

Unsure of the mechanism.

Bump, hoping someone can give insight.