Announcement

Collapse
No announcement yet.

[FIXED in 4.20] Foliage Culling Bug with OpenGL on 4.19.x (UE-57652, UE-58198)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [FIXED in 4.20] Foliage Culling Bug with OpenGL on 4.19.x (UE-57652, UE-58198)

    Hi,

    I am seeing a bug with the recent 4.19.0 release on my project with Linux related to incorrect foliage culling. Here are two videos demonstrating it:

    Foliage Culling Bug - Ubuntu 16.04 LTS / UE4.19.0:

    Foliage Culling Working - Windows 10 x64 1709 / UE4.19.0:

    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.

    Thanks,

    Alan

    #2
    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.

    Cheers

    Comment


      #3
      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.

      Alan

      Comment


        #4
        I rebuilt Unreal Engine 4.19.1 from source on my Linux machine, created a new project and reproduced this issue very easily:
        * Bug on Linux: https://www.youtube.com/watch?v=KV4-JuW6Ln8
        * Same project on Windows: https://www.youtube.com/watch?v=8w2t-P37_8o

        I have submitted a bug report with this example project for Epic staff to review. It looks like a major regression from 4.18.x, but only on Linux.

        Will update the thread with the Jira issue if it is confirmed + raised.

        Comment


          #5
          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: https://issues.unrealengine.com/issue/UE-57652
          Working at the University of Groningen
          UE4 on a huge display
          UE4 VRPN plugin

          Comment


            #6
            Sweet! I feel stupid for doing the work to rebuild the engine on Linux, but very happy to know I'm not going insane

            I have voted on the issue.

            Cheers

            Comment


              #7
              I am also hitting this bug, reported and just got a confirmation: https://issues.unrealengine.com/issue/UE-58198 (which links to this thread! )

              I wonder if this affects everyone with openGL, or some limited subset?

              For me, it happens on my geforce 970m and 1080ti
              See my PortalsBP on the marketplace
              Currently working on Wheelz2 and Zario

              Comment


                #8
                It also happens to me on 4.19.1 on machines with Nvidia 970 and amd rx 470gpus, only on OpenGL, Deepin Linux 15.5.

                Comment


                  #9
                  Just pulled/built 4.19.2 and packaged my project, looks like this is still an issue.

                  It wasn’t called out in the release notes but wanted to make sure it wasn’t inadvertently fixed by the other changes.

                  Comment


                    #10
                    Just spotted: https://issues.unrealengine.com/issue/UE-57652 mentions it is fixed (targeted for 4.20)

                    I strongly suspect it is the same bug as https://issues.unrealengine.com/issue/UE-58198

                    Hope we see a fix for it in 4.19, perhaps I'll try out master on linux and see if the bug is still there...
                    See my PortalsBP on the marketplace
                    Currently working on Wheelz2 and Zario

                    Comment


                      #11
                      Originally posted by Alex Petherick-Brian View Post
                      Just spotted: https://issues.unrealengine.com/issue/UE-57652 mentions it is fixed (targeted for 4.20)

                      I strongly suspect it is the same bug as https://issues.unrealengine.com/issue/UE-58198

                      Hope we see a fix for it in 4.19, perhaps I'll try out master on linux and see if the bug is still there...
                      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.

                      Comment


                        #12
                        At this
                        Originally posted by AlanEdwardes View Post

                        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
                        See my PortalsBP on the marketplace
                        Currently working on Wheelz2 and Zario

                        Comment


                          #13
                          For UE-57652, the fix is in GitHub commit 25eed01c1338adc6f1c3341bd2b7be34d116202e with the following comment:

                          Change 4038514 by Arne.Schober

                          DR - Fix case with MVF where instance offset is not supported by the API (in this case only foliage OpenGL and TvOS), usually the buffers are offsetted instead but with MVF we do not use offsetted buffers, therfore the offset needs to be passed into the shader although we are drawing with offset of 0.

                          #jira UE-57652
                          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).

                          Comment


                            #14
                            Oh thank goodness this is being talked about this has been going on for a while and a fix would be good.

                            Also grass foliage does not appear on my end and i cant draw more grass with the foliage tool.
                            Last edited by ErnestoEASD; 05-07-2018, 09:56 PM.

                            Comment


                              #15
                              For those following this, the fix for UE-57652 has now been merged into the 4.20 branch: https://issues.unrealengine.com/issue/UE-57652

                              A bit of other discussion about the two bugs logged against the two issues (I linked them here):
                              * https://answers.unrealengine.com/que...-same-bug.html
                              * https://www.reddit.com/r/unrealengin...age_draw_bugs/

                              Comment

                              Working...
                              X