I merged large amounts of indivdual actors together to save drawcalls. I left the original ones in the scene, but set ‘visible’ to false and ‘hidden in game’ to true:
So toggling the ‘Visible’ option and using the eyeball icon in the World Outliner have similar functionality. They both hide the selected actor within the Editor and do not have an effect when playing in Standalone. Essentially they are making the actor invisible, but it does not remove the mesh/asset from the scene; therefore it will still be accounted for when calculating the draw calls. These options are generally used to isolate certain areas of your project which you only wish to see, or if you would like to see how certain meshes shadows affect other object, etc…
The ‘Actor Hidden in Game’ option functions how you would expect by setting the actor hidden while playing in Standalone. It should be noted there will be a difference in your stats when Playing in Editor versus launching in Standalone mode. The question remains however, which I am running tests on currently, is whether or not this option should affect the draw calls anyway. The documentation on this option is a bit limited so I am going to have to find the answer through experimentation. Once I have determine the answer, I will return here with any bit of information I have to update you on the issue.
sorry for the late response (was on vacation). Thanks for investigating this. But to be honest I still don’t get it. Why does a hidden mesh (unchecked ‘visible’ and checked ‘hidden in game’) generate a draw call at the first place?
Shouldn’t this static mesh actor not have the same effect as it wouldn’t exist at all (besides using unnecessary memory)?
I have the same problem. Hiding actors (by both Set Hidden in Game and Set Visibility) does not improve FPS, but destroying the same actors does improve FPS (reducing drawcalls). I just don’t get it. Any clues so far?
I think the problem is that is it still being referenced in memory since it is placed in the level, even though it isn’t being drawn on the screen. Since it technically exists and isn’t being drawn, the memory is still going to be used in case the actors visibility is toggled back on during game.
What version of the engine are you working in so I can run some tests?
Thanks for the answer. I use 4.10.2 and this is easily reproducible: Create a blueprint with a few static mesh components (I’ve also added few skeletal meshes and spline mesh components but I guess that’s optional) and place many of these BPs in scene. In game, hide all of these actors with Set Hidden In Game - FPS will increase, but… Then destroy all of them, and FPS will increase even more.
BTW. (In my project hiding the actors didn’t increase FPS because my meshes are BEHIND my camera - and they still cause FPS loss, even if they’re outside of camera frustum and hidden - only destroying them increase FPS)
So I just ran some tests in a project I have and here are the results. I have provided screenshots for comparison between ‘Visible’ checked and unchecked, and ‘Actor Hidden in Game’ enabled while playing. I am getting the expected results and you can see how the stats (highlighted with orange boxes) change based on the relative settings.
Here we can see that during PIE (play in editor) mode with the ‘Actor Hidden in Game’ option checked, the numbers are drastically reduced and the draw calls are at the expected values. This proves the option is functioning as intended. The stat commands I am using to show these examples are ‘stat rhi’ and ‘stat scenerendering’. Use these to get a similar test set up for your own project. Keep in mind that FPS is not always indicative of your draw calls and using these console commands will give you a more accurate reading on what is actually being rendered on screen.
As a note, I found a bug that was entered that child actors within blueprints used with ‘Actor Hidden in Game’ does not hide correctly, therefore the draw calls will not go down as expected. This has been reported but is not currently being investigated.
This was a hunch and not my answer. If you see my answer below, you will notice how each draw call has an MS associated with it. Depending on how many meshes you are hiding and their individual impact on the scene, will have an impact on your overall Frames Per Second. There is also a difference between Playing, and In Editor.
No problem. I see how this can get a bit confusing, but the important thing to pay attention to are the areas highlighted and how when each setting is changed, the draw calls are reduced as expected.