Announcement

Collapse
No announcement yet.

Very noisy ray tracing example, wrong GPU?

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

    Very noisy ray tracing example, wrong GPU?

    Hi
    I have been trying out raytracing in the example automotive project for a while now, but it seems I only get VERY noisy and basically bad results.
    I am using a Quadro P6000 card, so it's not an RTX card but should support raytracing to a certain degree anyway. Could that have to do with it? If so what settings would I change to get better results anyway? Doesn't have to be a good framerate..

    #2
    Originally posted by Menesis View Post
    Hi
    I have been trying out raytracing in the example automotive project for a while now, but it seems I only get VERY noisy and basically bad results.
    I am using a Quadro P6000 card, so it's not an RTX card but should support raytracing to a certain degree anyway. Could that have to do with it? If so what settings would I change to get better results anyway? Doesn't have to be a good framerate..
    Nope, raytraced reflections are just naturally noisy on ue4. Am on RTX 2060.

    Comment


      #3
      They're simply noisy. I use an RTX 2070 Super. Seen it on 2080 Ti postings too. No one is really sure why it's so bad currently? At least from the forum topics I've read so far, and videos I've watched.

      Comment


        #4
        Hmm but this guy (=official unreal video) is getting awesome results :/
        his number of reflection samples is even set to just 1. I followed his tips, but it didn't help with ANY of the noise. It did create slightly crisper relfections. But my (our?) results are far from what he is showing...
        https://www.youtube.com/watch?v=wv5UeSZST5w

        Comment


          #5
          What's the roughness of the wheel material

          Comment


            #6
            He increased samples to 5 at one point, which at a max roughness of 1 caused a severe drop in FPS and coinciding render time increase. Then he changed max roughness back to 0.6, kept samples at 5, and used the reflection capture fallback cvar to start getting almost the same results. The skylight distance threshold had to be adjusted so the reflection captures would build and get calculated too.

            Yet I understand where you're coming from, I think, with how the quality is low to begin with in ray tracing. And it's especially noticeable in reflections and shadowed areas, though not only. Perhaps it has something to do with the initial resolution and quality of the textures, before getting placed in a UE scene. So, I'm not referring lightmap resolution within UE, or the export resolution scale in a material in UE, but before the mesh and/or material is brought into a scene. It's similar to the HDRI backdrop, which needs particular settings when placing it in the scene. A 4K backdrop image needs to be the same 4K resolution for the Imported setting as the 4K resolution for placed-in-scene setting. Before it's imported to UE, it requires quality and that it's using a particular color space (not sRGB). sRGB is limited in terms of HDR color depth according to technical values set for HDR, and HDR works better at 4K than at 1080p, on average. Thus, ray tracing requires particular quality settings and conditions for content that is placed in UE in order that the engine is capable of outputting a more noiseless result from the start. Therein is why the basic meshes in starter content do not work well with ray tracing since they're not optimized for it.

            There's also a node in the material editor, the RayTracingQualitySwitchReplace node, that intermediately reduces some of the overhead for ray tracing while maintaining quality. I don't know if it would remove the noise in real-time, or in non-real-time type scenes, but it could if it's working with optimized content.
            Last edited by presto423; 10-02-2020, 08:08 AM. Reason: samples were kept at 5, not changed back to 1...thanks to Suthriel for correcting

            Comment


              #7
              Originally posted by presto423 View Post
              He increased samples to 5 at one point, which at a max roughness of 1 caused a severe drop in FPS and coinciding render time increase. Then he changed max roughness back to 0.6, decreased samples per pixel to 1, and used the reflection capture fallback cvar to start getting almost the same results. The skylight distance threshold had to be adjusted so the reflection captures would build and get calculated too.

              There's also a node in the material editor, the RayTracingQualitySwitchReplace node, that intermediately reduces some of the overhead for ray tracing while maintaining quality. I don't know if it would remove the noise in real-time, or in non-real-time type scenes, but it could if it's working with optimized content.
              In the latest part, where he showed the postprocess volume, he used reflection captures, and his reflection samples were still at 5, with 0.6 roughness (at 27:45). And for some reason, even his Editor view is way cleaner than whatever i could ever hope to get in my editor during raytracing :/ especially regarding anti aliasing (i´m using a RTX 2070). Makes you wonder, if some aspects don´t work well with some RTX cards, while they seem to work flawless with something like a 2080 TI.

              Comment


                #8
                Thanks for the correction Suthriel

                There definitely is a potential fault with certain RTX cards, or other cards as well. When I use CryEngine on my new computer (RTX 2070 Super and Ryzen 5 3600, 32 GB RAM) the anti-aliasing works really well, but in UE it's mixed with obvious jagged edges / smooth edges. There seems to be no particular kinds of edges that get aliased, either in UE, as the smooth ones are sometimes the formerly jagged ones at different camera positions and vice versa.

                I still don't know how to use most of the cvars though, so that's next in my testing and attempting to get better quality initial results with or without ray tracing.

                Comment


                  #9
                  Raytracing is noisy, period. This is an inescapable fact of how it works. It has to take many samples for each pixel in order to determine the final output...

                  In realtime rendering the sample budget is typically 1 (one) sample per pixel. You ever tried to do an offline render with a single sample? It's noisy. So the result is typically run through a denoiser, but denoisers are not magical, they can only do so much. There are also many different ways you can denoise to varrying degrees of success. I don't know what denoising method Epic is using, neural network denoisers are popular in offline rendering but afaik are usually too slow for realtime.

                  This is compounded for diffuse reflections, because diffuse reflections require significantly more samples to converge on a noise free result. This is why in that video, he only uses raytraced reflections for the glossiest (least rough) surfaces such as the car body and glass, while the wheels use reflection captures (reflection captures are not raytraced reflections)

                  The original poster has a number of problems:
                  1. The obvious, he's trying to get diffuse reflections out of a single sample
                  2. His geometry is not well suited to realtime rendering, he has extremely tight chamfers which are resulting in a lot of aliasing
                  3. It looks like he's disabled temporal antialiasing which would have smoothed out the result slightly and improved the aliasing
                  4. It appears he is rendering at below 100% screen percentage which is just exagerating the aliasing
                  Because the noise stems from lack of samples, if you don't care about realtime performance then you can easily eliminate them simply by driving the sample count through the roof. Set your reflection samples to 30 and the noise will be much less noticeable. (Note that this will not work for final gather GI because as far as I know, that is locked at 1 sample)

                  If you want to eliminate the noise without raising the sample count then you need to use non-raytraced reflections for diffuse surfaces (such as reflection captures). That's all there is to it. There is no other solution that I am aware of.
                  Last edited by Arkiras; 10-02-2020, 02:18 PM.

                  Comment


                    #10
                    Final Gather looks like it's limited to 1 sample per pixel, but the value of 1 refers to Bounces at which it is locked. Samples has to be a minimum of 16, and is still noisy when increasing to 64. How are ray tracing reflections only, not SSR or captures or planar, doable for part of a scene? What is the settings and checkboxes for disabling all but RT reflections?

                    Comment


                      #11
                      Originally posted by presto423 View Post
                      Final Gather looks like it's limited to 1 sample per pixel, but the value of 1 refers to Bounces at which it is locked. Samples has to be a minimum of 16, and is still noisy when increasing to 64.
                      It is locked at 1 sample per pixel, not bounces. From the documentation:

                      This technique is a two-pass algorithm. The first phase distributes shading points—similarly to the original RTGI method—but at a fixed rate of one sample per-pixel. A history of up to 16 shading point samples are stored in screen space during this phase. During the second phase, the algorithm attempts to reconnect to the shading point history, amortizing the cost of the method.

                      https://docs.unrealengine.com/en-US/...ing/index.html
                      Which (as far as I can understand) means it takes 1 sample per pixel then accumulates them over multiple frames. Adjusting the sample count setting only changes how many samples will be accumulated.

                      Originally posted by presto423 View Post
                      How are ray tracing reflections only, not SSR or captures or planar, doable for part of a scene? What is the settings and checkboxes for disabling all but RT reflections?
                      The max roughness threshhold in the post process controls what will have raytraced reflections, as he explains in that video above. His wheels are using captures because he set the max roughness to 0.6. When he sets the max roughness to 1, everything uses raytraced reflections (and his performance tanks).

                      I don't think you can use screenspace reflections while raytracing but you can control them within each material, the material settings have a screenspace reflections flag, just turn it off and it won't use SSR.

                      If it isn't using RTR or SSR then it will fall back on reflection captures, which is what happens for the wheels in that video.
                      Last edited by Arkiras; 10-02-2020, 05:50 PM.

                      Comment


                        #12
                        Visual Aids:

                        Click image for larger version

Name:	UE4_RTR_SampleComparison.jpg
Views:	402
Size:	183.3 KB
ID:	1818028
                        Click image for larger version

Name:	UE4_RTR_TAA.jpg
Views:	395
Size:	173.4 KB
ID:	1818029

                        Comment


                          #13
                          Yeah, I was simply referring to the property value in the post process volume. Perhaps that is a cause of the noise in Final Gather, that it's locked to 1 sample per pixel distributed across frames. Perhaps not, though, as I'm not a game engine engineer like Unreal devs would appreciate me being . If the engine isn't made more accessible to users, then it's really not worth trying to argue finer points of the inner workings when I don't really understand them, and the information is largely unsuitable or inaccessible which would help me understand it on a deeper level. Merely pointing out that it's 1 sample distributed across frames in the first pass doesn't help me tweak ray tracing so it works from a base or starting point in a scene. Thus far, I see even experienced and knowledgeable devs facing a serious shortage of guidance and proper instruction of how to get the engine to do real-time and offline-type rendering with ray tracing. In my perspective, that doesn't amount to production ready or easy-to-use as the docs try to get it sounding. Non-RT lighting is difficult enough to get mostly untarnished results. But I guess that's how certain people in the Unreal community prefer it to be for the sake of arguing in favor of it over and over.

                          Comment


                            #14
                            Originally posted by Arkiras View Post
                            It is locked at 1 sample per pixel, not bounces. From the documentation:

                            What this means: It takes 1 sample per pixel then accumulates them over multiple frames. Adjusting the sample count setting only changes how many samples will be accumulated over multiple frames.
                            Are you sure about the bounces? Because it also says this, just a little bit later:

                            The Final Gather method also requires the following settings to be used in the Post Process Volume for it to work effectively:
                            • Max Bounces: 1
                            • Samples Per Pixel: 16

                            Any additional Max Bounces beyond 1 are silently discarded and when adjusting the Samples Per Pixel, it's best to increase it by powers of two (for example, 8, 16, 32, 64).

                            Comment


                              #15
                              Originally posted by Suthriel View Post

                              Are you sure about the bounces? Because it also says this, just a little bit later:
                              It can still be limited to a single bounce and also only sample at a fixed rate.

                              Frankly though I am not a rendering engineer, this is just my interpretation of the documentation.

                              Edit: Nevermind I see what you're saying, I did not mean to imply that it was not locked in bounces, I was replying ot the statement that the fixed rate sampling specifically refers to bounces.
                              Last edited by Arkiras; 10-02-2020, 05:56 PM.

                              Comment

                              Working...
                              X