Announcement

Collapse
No announcement yet.

Last of Us style indirect shadows

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

    Last of Us style indirect shadows

    As an experiment I tried to recreate the awesome indirect shadow system of the Last of Us:



    This is based on this talk.

    Still far from a complete implementation, but the basics are there.

    #2
    how diff is this compared to the Ray Traced Distance Field shadows ue4 uses?
    http://www.youtube.com/watch?v=-xai0iBffUc
    Last edited by Bladerskb; 02-15-2015, 02:33 PM.

    Comment


      #3
      Originally posted by Bladerskb View Post
      how diff is this compared to the Ray Traced Distance Field shadows ue4 uses?
      http://www.youtube.com/watch?v=-xai0iBffUc
      Quite different, both technically and in intended use case. Those are great for hard to slightly soft direct shadows, while this technique is best suited for very soft shadows of indirect light. You could even use both of them at the same time, although the great thing about this technique is the way it works with baked lighting. Here's an example of how it looks in the game that might explain it a little better then my simple test scene:

      Attached Files

      Comment


        #4
        This effect is much more comparable to distance field AO. I also believe distance field AO doesn't work in certain situations with skeletal meshes, you could use this technique to fill those gaps.

        Comment


          #5
          Wow this is awesome! Keeping an eye on this one. Thank you Arnage!!

          Comment


            #6
            If you can get it working with animated meshes + good performance I would gladly pay for your solution.

            Comment


              #7
              i want to see more of this in action
              MY YOUTUBE CHANNEL www.youtube.com/user/piroman665
              PORTFOLIO http://piroman665.cgsociety.org/

              Comment


                #8
                This is a side project that I can only work on during my (sadly limited) free time, so don't expect progress to be fast, but your feedback keeps me motivated to continue, so thanks

                The next step is to generalize the system to work with ellipsoids instead of just spheres, which is an important step towards getting it to work with characters.

                Comment


                  #9
                  This looks fantastic! Looking forward to seeing more.

                  Comment


                    #10
                    Cool!!, would you have a side by side comparison of the original + your approach?
                    Game Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-source template)

                    Comment


                      #11
                      Originally posted by Tom Looman View Post
                      Cool!!, would you have a side by side comparison of the original + your approach?
                      Sure, as the spheres are lit indirectly they basically just float without it:

                      Click image for larger version

Name:	Without.jpg
Views:	1
Size:	13.1 KB
ID:	1066643 Click image for larger version

Name:	With.jpg
Views:	1
Size:	12.8 KB
ID:	1066644

                      I did hit quite a roadblock though. I build the initial prototype as a material function that is added to the ambient occlusion input of a material. This works great for a quick test scene with few objects and materials, but it does not scale well at all. Instead I wanted to implement the shadows as deferred decals, but it seems like those not only can't write to the AO buffer but the decal material also can't access all the surface properties I need to calculate the shadows.

                      Another approach that would probably work is to implement the effect in a separate postprocess pass. This also has the performance benefit of being able to render the pass at a lower resolution with upscaling to provide a nice performance/quality trade-off. (Its strength is in the blurry effect anyway, so a significant lower res would probably not be that noticeable) There is just one slight issue with this approach: I haven't really touched the engine's source at all, so it'll probably take quite a while before I understand the rendering pipeline well enough to actually do that...

                      Comment


                        #12
                        It is looking good. Any progress?
                        Assets: Military Ammunition (Released)
                        Plugins: BlueManBPFunctionLibrary C++ plugin (Free), Blue Man Vehicle AI Plugin (Released), Air Resistance C++ Plugin (WIP), Blue Man Vehicle Physics Plugin (Marketplace)
                        Projects: Giants Of Destruction

                        Comment


                          #13
                          Wow this is incredible! Are you planning on releasing it commercially or for free? Either way I would totally dig this

                          Comment


                            #14
                            Great work!!
                            Looks quite nice.

                            Skimmed the paper you posted an I am curious.

                            So the last of us setup said they mapped a bunch of spheres onto the character and used that. I guess that means each screen pixel needs to trace against every sphere for an intersection?

                            *edit* ah it doesnt actually raytrace to hit the spheres but rather knows analytically how much they occlude based on size/distance. that makes sense. very neat trick. And then they eventually skip the analytical step by baking the falloff to a texture. Did you get to the texture baking step yet?
                            Last edited by RyanB; 05-29-2015, 05:03 PM.
                            Ryan Brucks
                            Principal Technical Artist, Epic Games

                            Comment


                              #15
                              I believe The Order used a very similar tech for occlusion and dynamic character reflections for the main character.

                              Comment

                              Working...
                              X