Announcement

Collapse
No announcement yet.

Distance Field Ambient Occlusion (Movable Skylight shadowing)

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

    Distance Field Ambient Occlusion (Movable Skylight shadowing)

    There's a new feature which will be in 4.3 that provides Ambient Occlusion from SkyLights set to have the Movable mobility setting. I've gotten some questions about it so I made this thread. In the future the information will be in the UDN docs, but they have some latency so I'm going to post the information here.

    #2
    Edit: Real doc is now up!
    https://docs.unrealengine.com/latest...ion/index.html

    Let me know if you have any questions or comments
    Attached Files
    Last edited by DanielW; 07-16-2014, 09:52 PM.

    Comment


      #3
      Originally posted by DanielW View Post
      Here are some results in Fortnite levels

      Original
      [ATTACH=CONFIG]6123[/ATTACH]

      With Distance Field AO
      [ATTACH=CONFIG]6124[/ATTACH]
      Well the results look really, really good!

      Great work Daniel!



      Rama
      UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

      ♥ Rama

      Comment


        #4
        I said it before and i'll say it again, this looks awesome! But i'm wondering if skeletal meshes will stand out too much in shadowed areas since this takes only static geometry into account?
        FREE Lightshow
        FREE VR Drum Kit Project

        FREE Color LUT Collection
        FREE Physics Driven Spacecraft Project
        FREE GTA Style Vehicle Interaction
        Dynamic DoF(Depth of Field)
        Camera Crossfade

        Comment


          #5
          Originally posted by Jacky View Post
          I said it before and i'll say it again, this looks awesome! But i'm wondering if skeletal meshes will stand out too much in shadowed areas since this takes only static geometry into account?
          It shadows onto, but not from, dynamic meshes. So anything dynamic will receive shadowing and look fine. Besides, most dynamic meshes tend to be smaller (in many cases) and thus SSAO should be fine for shadowing from them.

          A lot of runtime taken up for a totally nondirectional and low res ambient occlusion solution I must say. But supporting some form of dynamics is still pretty good. Plus its smooth and has no popping sampling issues like probes can get.

          Comment


            #6
            Atm, only objects which have a distance field representation (aka shadow casting static meshes) can receive the Distance Field AO. That's not a limitation of the technique though, just something that hasn't been implemented yet.

            Skeletal meshes *casting* area shadows / AO will have to be handled by a different feature.

            A lot of runtime taken up for a totally nondirectional and low res ambient occlusion solution I must say.
            Yep. That's the price paid by supporting fully dynamic scenes. This is why we try to provide multiple lighting paths in UE4, so games can pick whichever are the best tradeoff for them.

            Most other methods have better runtime cost but very poor quality. Distance Field AO operates on surfaces instead of volumes like LPV (another method to compute sky occlusion) so it can achieve much higher quality, it's not limited to some volume texture resolution.

            Comment


              #7
              Hm. I enabled it in latest preview build, setup sample scene, and I can't see it working. I mean, the scene is flat as usual. For testing I just enabled Skylight, and disabled directional light.

              For reference, I had setup scene similar to the one on screenshot. Just composed from default meshes in architecture folder.

              Screenshot:
              https://dl.dropboxusercontent.com/u/...light-noao.png

              Edit:
              Here the same scene with Skylight + DirectionalLight

              https://dl.dropboxusercontent.com/u/...ional-noao.png
              Last edited by iniside; 07-01-2014, 02:49 AM.
              https://github.com/iniside/ActionRPGGame - Action RPG Starter kit. Work in Progress. You can use it in whatever way you wish.

              Comment


                #8
                Did you follow all the directions above? Specifically "AllowMeshDistanceFieldRepresentations must be enabled for the project"

                Comment


                  #9
                  Originally posted by DanielW View Post
                  Did you follow all the directions above? Specifically "AllowMeshDistanceFieldRepresentations must be enabled for the project"
                  Yes it is enabled:

                  Code:
                  [/Script/Engine.RendererSettings]
                  r.AllowMeshDistanceFieldRepresentations=True
                  In DefaultEngine.ini in my game project folder.
                  https://github.com/iniside/ActionRPGGame - Action RPG Starter kit. Work in Progress. You can use it in whatever way you wish.

                  Comment


                    #10
                    Hmm ok. Some other things to check:
                    * DX11 video card?
                    * Are the meshes mostly closed? For example a box will work, a plane will not.
                    * Meshes have CastShadow enabled?

                    Comment


                      #11
                      After a day of confusion i found out something. In 4.2 when we set Allow Static Lighting to 0 in Project Settings > Rendering it disables Skylight as well. Will this option exclude Skylight in 4.3 since it is also going to be movable?
                      Last edited by Jacky; 07-01-2014, 06:20 PM.
                      FREE Lightshow
                      FREE VR Drum Kit Project

                      FREE Color LUT Collection
                      FREE Physics Driven Spacecraft Project
                      FREE GTA Style Vehicle Interaction
                      Dynamic DoF(Depth of Field)
                      Camera Crossfade

                      Comment


                        #12
                        Will the DFAO have any effect on canceling out reflections on materials? Cause i had an issue in one setup where a room lit only by skylight coming though windows using baked skylight shadows. The wall reflections where only visible in areas that where lit(not in complete shadow).

                        Comment


                          #13
                          Originally posted by DanielW View Post
                          Hmm ok. Some other things to check:
                          * DX11 video card?
                          * Are the meshes mostly closed? For example a box will work, a plane will not.
                          * Meshes have CastShadow enabled?
                          For all three yes.
                          I'm using Wall_400x400 from architecture folder. Default content, to test it. Is it possible that this mesh is not thick enough ?
                          https://github.com/iniside/ActionRPGGame - Action RPG Starter kit. Work in Progress. You can use it in whatever way you wish.

                          Comment


                            #14
                            I hope that this feature will have a toggle to make it static so that you can use it as a fast AO, sort of like how Crytek bake theirs into a volumetric texture surrounding the whole level.

                            Comment


                              #15
                              Originally posted by Legend286 View Post
                              I hope that this feature will have a toggle to make it static so that you can use it as a fast AO, sort of like how Crytek bake theirs into a volumetric texture surrounding the whole level.
                              The skylight will have a toggle so that it can bake in the shadows as it does already. And using a Light Importance Volume adds baked in volumetric lighting samples for the skylight shadow.

                              Comment

                              Working...
                              X