This started happening when I upgraded my project to 4.19.0. It did not happen on 4.18.1, which I upgraded from directly. (I smoke tested before and after the upgrade with no other changes, and this was the only breakage).
Any other information I can happily provide - if there are console commands I can use to debug what the culling system is doing please let me know.
A little more information - I looked around console commands relating to occlusion culling / foliage to try to figure out what exactly is causing this:
foliage.DisableCull 1 - no effect
foliage.Freeze - works as expected, freezes the foliage in whatever culled/unculled state it was when command executed
foliage.ForceLOD 1 - this fixes the bug in one level, but for another level just changes the view angle to trigger the bug.
It feels like the ForceLOD command is providing a bit of a hint into what’s going on - it’s as if the foliage culling system is misinterpreting the bounds of whatever LOD mesh is in use, and causing it to cull even when it’s in the view frustum.
Any other help here is greatly appreciated (console commands, engine code changes to help debug this etc), I’d love to pin this one down.
Another update on this - it is still an issue with 4.19.1. I suspected this could be a forward renderer only issue so I tried re-packaging with the deferred renderer, but it doesn’t change anything, the bug still happens. I also tried disabling the global clip plane to see if it could be affecting this, though as expected that had no effect.
I am going to rebuild the editor on Linux and try to reproduce this in a separate project, though that will take some time (I cross compile my game on Windows for Linux so will have to pull the code and build from scratch on my Linux machine).
As before, if anyone has any idea of methods I can use to debug this, please let me know.
This does not only happen on Linux but also on Windows when rendering with OpenGL instead of Directx. I have submitted a bug report about this: Unreal Engine Issues and Bug Tracker (UE-57652)
Oh cool! Let me know if you find the commit / if it’s in master - I had a quick look but couldn’t see it on GitHub. Regardless of whether this makes the next 4.19 hotfix, I would love to grab the engine @ this commit so I can fix my game.
Did not spot the relevant commit, pulled and built anyway.
Build threw an error building plugins (VARest and BluemanAI) and segfaults on launch - I think I’ll wait until it is officially pushed before I go too far down this rabbit hole
Looks like branches master and promoted contain this commit.
I will see if I can figure out the exact code change, but if it’s in the promoted branch this may mean it might be going into 4.19.3 (not completely sure about that though).
While checking the MacOS and Linux port of my game I realised that I have the same problem and it’s not limited to linux, MacOS also have it. Only windows isn’t affected.
I didn’t tried (yet) on console though…
Thanks, others have reported the same so I tweaked the title to reflect that. Out of interest - isn’t UE4 on MacOS using the Metal renderer, not OpenGL? I thought they were distinctly different and the OpenGL renderer was deprecated on MacOS. Might have completely misunderstood that… or maybe it impacts both!
Again for those following, Unreal Engine 4.20 has been released and contains the fix. For those experiencing this issue, the solution is to upgrade your project.