Announcement

Collapse
No announcement yet.

Working emissive materials in RTGI (with screenshots)

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

    Working emissive materials in RTGI (with screenshots)

    Been playing around with injecting emissive materials into the RT Global Illumination lighting environment. Big drawbacks are:

    - Denoiser is not working with the injected irradiance
    - Environment has to have at least SOME lighting (HDR map, point light etc)
    - Digging more, but man it is glorious.

    Click image for larger version  Name:	Capture.PNG Views:	1 Size:	391.1 KB ID:	1662095

    Tommy.

    #2
    Click image for larger version

Name:	Capture2.PNG
Views:	1
Size:	312.5 KB
ID:	1662101
    And this is it without a the denoiser...

    Tommy.

    Comment


      #3

      Progress! Okay.... looks like I have it correctly sampling the emissive geometry, using a section of the pathtracing logic. Now, you don't need to use any lights in your scene to get emissive GI

      Click image for larger version  Name:	Capture4.PNG Views:	1 Size:	265.0 KB ID:	1662110
      Tommy.
      Last edited by TommyBear; 09-08-2019, 05:52 PM.

      Comment


        #4
        Looks like I have something here (found a good technique in the pathtracing code going to use it)... Cornell box time!! I'm going to do a pull request on this and see what Epic thinks

        Click image for larger version  Name:	Capture5.PNG Views:	1 Size:	253.8 KB ID:	1662115
        Last edited by TommyBear; 09-13-2019, 03:45 AM.

        Comment


          #5
          And finally.... the reflections demo, all lights removed. Leaving only the emissive geometry in the scene (the tube lighting):

          Click image for larger version  Name:	Capture7.JPG Views:	1 Size:	88.9 KB ID:	1662123
          Click image for larger version  Name:	Capture6.JPG Views:	3 Size:	151.3 KB ID:	1662120

          Comment


            #6
            Looks great! Don't know why emissive isn't already in RTGI, seems an obvious first thing to read from.

            Comment


              #7
              Originally posted by Frenetic Pony View Post
              Looks great! Don't know why emissive isn't already in RTGI, seems an obvious first thing to read from.
              Ah thanks Frenetic Pony! Yeah it works quite well. I grabbed a section of the pathtracing code for sample emissive contribution. For dark scenes, you have to boost the Samples per pixel for GI to reduce noise... but it looks fantastic and it is in glorious real-time, so well worth it. If you make the lights flicker, the scene correctly responds

              I'm currently integrating my changes into my local main branch of next UE4. I'll post my pull request to Epic and post it here too for people to experiment with. It'll be enabled and disabled with:

              r.RayTracing.GlobalIllumination.EvaluateEmissiveMaterials (0 for disabled, 1 for enabled)

              then
              r.RayTracing.GlobalIllumination.SamplesPerPixel (for quality)

              Tommy.
              Last edited by TommyBear; 09-13-2019, 03:45 AM.

              Comment


                #8
                Okay it is a pull request for Master now, so 4.24 if Epic like it. If you are interested in integrating it into your own build, you can find the pull request here:
                https://github.com/EpicGames/UnrealEngine/pull/6193

                Good luck!

                Tommy.
                Last edited by TommyBear; 09-08-2019, 11:06 PM.

                Comment


                  #9
                  *SCREECHES LIKE A HARPY*

                  YES YES YES YES YES! A thousand times YES!

                  Comment


                    #10
                    Setting enthusiasm aside, what kind of performance are you getting and on what hardware? I’m having a hell of a time with Unreal Engine getting acceptable performance with RTGI on a 2070 MaxQ.

                    Comment


                      #11
                      Originally posted by Aeries View Post
                      Setting enthusiasm aside, what kind of performance are you getting and on what hardware? I’m having a hell of a time with Unreal Engine getting acceptable performance with RTGI on a 2070 MaxQ.
                      Hey Aeries,

                      It is performant for me on a GeForce RTX 2070 on a ROG laptop (but noisy at default samples per pixel GI). Mileage will vary with scene size/complexity/lighting setup and samples per pixel of your GI. Note that the emissive material light sources are noisy by nature, but with the right denoiser (not included ), I believe, can yield get good results. This scene for example runs 60fps on my GeForce RTX 2070, at 30 samples per pixel GI, but the scene is small.

                      Default Samples (60fps):
                      Click image for larger version  Name:	CaptureTest.JPG Views:	1 Size:	123.7 KB ID:	1662442




                      30 Samples Per Pixel(60fps):
                      Click image for larger version  Name:	CaptureTest2.JPG Views:	1 Size:	86.4 KB ID:	1662443

                      I guess to sum up, I would say that the addition of this won't hit your performance as much as people would expect, but dark scenes will be noisy.

                      Tommy.
                      Last edited by TommyBear; 09-08-2019, 11:25 PM.

                      Comment


                        #12
                        This looks so good! Good job!

                        Comment


                          #13
                          TommyBear I run this year’s MSI GS65 Stealth laptop so this ought to be a neat comparison when I pull the code! Thanks for putting this together! THIS is the dream and imo, one of Raytracing’s truly most powerful features. I’m legit shocked this was omitted from the baseline raytracing features when Epic added it.

                          You rock.

                          Comment


                            #14
                            Very exciting! Would love to see some video examples to get a sense of the noise. Hopefully they will accept the pull request...

                            Comment


                              #15
                              Also just realized that:

                              r.Raytracing.GlobalIllumination.ScreenPercentage defaults to 50 (50% of screen),

                              setting this to 100 also helps with noise, but impacts performance obviously.

                              Comment

                              Working...
                              X