Announcement

Collapse
No announcement yet.

Set LOD based on distance.

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

    [FEATURE REQUEST] Set LOD based on distance.

    In some situations it's neccesary to set mesh LOD's based on distance rather than screen size. Some of the meshes I'm using for this are much larger than can fit on the screen (weather planes) - and LOD 1 screen size is always clamped to 1.0.

    In my case the screen size is useless anyway because it's completely different in-editor to what it is when deployed to a device or when running standalone. Please bring back support for setting LOD's based on Distance, it's 10x more intuitive and in some cases makes much more sense.
    Last edited by TheJamsh; 07-29-2016, 01:48 PM.

    #2
    I agree. It would be great to have the Option to select between ScreenSize or Distance on each Mesh individual. But if not I also would prefere to having a reliable Distance instead of ScreenSize.

    Comment


      #3
      I have the same problem as TheJamsh in my game. LOD based on distance could be a good option.
      Realtime Database Firebase | Ultimate Mobile Kit Firebase | Extended Facebook | Universal Mobile Ads | Google Analytics

      Comment


        #4
        Another issue caused by the screen-space LODS, is that items are LOD'd based on how much of the screen they take up - so when objects are semi-occluded this also causes problems. In the case of meshes that are supposed to be larger than the screen or are often occluded, this system really doesn't work.

        Bonus points available here for being able to constrain the distance to a plane. E.g. in my case, I only care about the XY-distance, not the Z-distance.

        My only option now is to do a fancy vertex-shader, which collapses the mesh when the camera is a certain distance from it to prevent all the overdraw. This requires extra UV sets and vertex colours (which AFAIK are imcompatible with foliage).

        This has been requested many times on Answerhub...
        https://answers.unrealengine.com/que...+distance.html

        If this is the kind of thing that could be solved with a plugin, some direction on where to look in the engine code first would be great!

        Comment


          #5
          Originally posted by TheJamsh View Post
          In some situations it's neccesary to set mesh LOD's based on distance rather than screen size. Some of the meshes I'm using for this are much larger than can fit on the screen (weather planes) - and LOD 1 screen size is always clamped to 1.0.

          In my case the screen size is useless anyway because it's completely different in-editor to what it is when deployed to a device or when running standalone. Please bring back support for setting LOD's based on Distance, it's 10x more intuitive and in some cases makes much more sense.
          LOD based on distance is in 4.0 to 4.2 probably and then Epic replaced it with Screen size.

          Other thing I need is set the cull distance in the meshes after the lods and there are nothing to do this, just place volumes to cull
          Hevedy - Instance Tools: https://hevedy.itch.io/hevedyinstances
          Hevedy - Image Tools: https://hevedy.itch.io/imagetools

          Comment


            #6
            Just posting to say that we need this too. Having it based on screen space is great but it's not always the best. Being able to choose which one to use would be very useful.

            Comment


              #7
              It's a lot of manual work to set LOD swap distance based on screen space atm. It take a lot of good testing for every mesh. But if it was based on distance from player that'd save a lot of hassle for me personally since I'm dealing with lots of meshes of any size.
              Artstation
              Join the support channel
              Gumroad Store

              Comment


                #8
                In case it helps anybody, I was able to develop a workaround for my use-case - but of course this won't work for everybody.

                My issue was that I have a series of transparent planes used throughout the level, used for rain / snow etc. As the player moves further away, I needed to decrease the density of the planes to prevent 'copious overdraw' and stupid levles of shader complexity. Splitting up the rain mesh and painting different vertex colours of on some of the planes allows me to mask them off based on distance in the shader itself. The following goes inot 'World Position Offset'.

                Click image for larger version

Name:	XYPlummet.JPG
Views:	1
Size:	174.4 KB
ID:	1112840

                Of course this really only works for my use case, but if someone else is doing something similar this might be useful. It doesn't prevent sending the vertices to the GPU of course, so they are still processed - but it does save on pixel shader time. Could probably make this more efficient too.

                Comment


                  #9
                  Thanks for sharing [MENTION=155]TheJamsh[/MENTION]

                  Game Design - Photogrammetry - Programming
                  Tutorials · Twitter · Twitch

                  Comment


                    #10
                    Originally posted by TheJamsh View Post
                    In case it helps anybody, I was able to develop a workaround for my use-case - but of course this won't work for everybody.

                    My issue was that I have a series of transparent planes used throughout the level, used for rain / snow etc. As the player moves further away, I needed to decrease the density of the planes to prevent 'copious overdraw' and stupid levles of shader complexity. Splitting up the rain mesh and painting different vertex colours of on some of the planes allows me to mask them off based on distance in the shader itself. The following goes inot 'World Position Offset'.


                    Of course this really only works for my use case, but if someone else is doing something similar this might be useful. It doesn't prevent sending the vertices to the GPU of course, so they are still processed - but it does save on pixel shader time. Could probably make this more efficient too.
                    You can even cull per triangle with similar method for savings for very large objects. There are hidden trick to cull whole triangle with setting single vertex to NaN. https://twitter.com/nthibieroz/statu...65039085846529

                    Comment


                      #11
                      Hey everyone,

                      I have entered a feature request for the ability to set LOD based on distance. You can track this request here: https://issues.unrealengine.com/issue/UE-34057

                      Have a great day!

                      Comment


                        #12
                        Originally posted by Sean Flint View Post
                        Hey everyone,

                        I have entered a feature request for the ability to set LOD based on distance. You can track this request here: https://issues.unrealengine.com/issue/UE-34057

                        Have a great day!
                        Thanks for helpin' out Sean!

                        Everyone, please vote if you're interested and also please keep the feedback coming!
                        Twitch /unrealalexander| Twitter @UnrealAlexander
                        How to report a bug? | Installation & Setup issues?
                        Call me to a thread by posting this: [MENTION]Alexander Paschall[/MENTION]

                        Comment


                          #13
                          Originally posted by Alexander Paschall View Post
                          Thanks for helpin' out Sean!

                          Everyone, please vote if you're interested and also please keep the feedback coming!
                          While I appreciate that you guys look into the feature request, I think it's a big mistake to make things happening or not happening based on votes. Looking at the number of votes on the UE4 Roadmap it's clear only a fraction of people who need something get to vote for it. For example maybe 20 people vote for TAA improvement if there was a ticket and then it's considered low priority based on the number of votes where the actual audience affected by that are almost "anybody" using UE4 but they never actually look for a place they can vote. I had a petition put up for Real-Time GI and despite the good exposure I gave it on all social medias it received only 41 votes. Votes truly do not determine the community interest.
                          Artstation
                          Join the support channel
                          Gumroad Store

                          Comment


                            #14
                            Originally posted by Maximum-Dev View Post
                            Votes truly do not determine the community interest.
                            If that is the general consensus, then we can look at doing away with voting on things and see about what would be a more accurate way to determine where the community would benefit. I'm always interested in hearing feedback about how we can better focus our efforts.
                            Twitch /unrealalexander| Twitter @UnrealAlexander
                            How to report a bug? | Installation & Setup issues?
                            Call me to a thread by posting this: [MENTION]Alexander Paschall[/MENTION]

                            Comment


                              #15
                              Originally posted by Alexander Paschall View Post
                              If that is the general consensus, then we can look at doing away with voting on things and see about what would be a more accurate way to determine where the community would benefit. I'm always interested in hearing feedback about how we can better focus our efforts.
                              You can see 9 people in this thread but only 4 votes on the ticket. I don't have a quite accurate solution but I think it's better you make a manual judgement according to the number of people, posts and threads involved regarding a common issue and give it an appropriate priority lable instead of putting up a vote system.
                              Artstation
                              Join the support channel
                              Gumroad Store

                              Comment

                              Working...
                              X