Announcement

Collapse
No announcement yet.

Ray Tracing Overview - Unreal Engine 4.22 Preview

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

    #91
    Originally posted by thejturner View Post

    Are we talking about the same stair-stepping? What I'm seeing is only happening in ray traced reflections themselves (not path tracing). So make a 100% reflective sphere and look at the reflection of the character pawn in the sphere. I also zoom in so the whole reflected sphere fills the FOV. Then it becomes very apparent.

    I just tested 4.22.1 today and I'm seeing the same results unfortunately.
    Ah perhaps not though the arifacts look remarkedly similar.
    Senior Artist @ Cinesite

    Comment


      #92
      Thank you Epic team for the technology implementation and for the document.

      I have created a blueprint to configure all those settings with only a very few clics and within seconds to all lights and post process settings of any whole scene: https://forums.unrealengine.com/comm...fied-blueprint

      In addition I have made a little and simple Ray Tracing benchmark, but very useful, I think. So if you want, you can measure your computer power with it and even share the results with the rest : https://forums.unrealengine.com/comm...testers-wanted

      Best regards!
      Last edited by Miguel1900; 05-02-2019, 07:21 AM.

      Comment


        #93
        Guys, no one else seems to say this so I will-

        How do you use denoiser in Command line?
        It is not referenced how to use Command Line at all in this doc. Just show a screenshot with an example so users can easily access the tool.
        I am dumb and have no idea, but a picture would make it so simple.

        PS - Auto exposure in dark scenes is non-stop when raytracing.
        Min Max have to be adjusted by default, it fights you constantly, again in a dark scene.
        You need to dimly light your scene somewhat off screen in order to deactivate it almost. Why is this necessary to constantly have to battle auto exposure.
        If there is a way to shut it off, show in this document PLEASE, again screen shot, not words. Unreal's words are too slow. A picture is FAST.

        THX!
        Last edited by Daffrendo; 05-14-2019, 03:53 AM.

        Comment


          #94
          Hey Daffrendo,

          I worked on the docs for the Ray Tracing features. The command line info on Denoisers (and even the in-depth look at how Denoisers work) was left off the table for this release simply due to time and that these features are early access, meaning they are not yet complete and will be improved.

          I wrote the documentation with the intent to give enough information for people to work with to understand the gist of what is going on without going too deep on something that isn't finalized yet. 4.23 and 4.24 will continue to show improvements to Ray Tracing features and for some features like GI, new methods are being tried to improve the look, quality, and performance there. For Denoisers, these will still see improvements as well, so again, no reason to do in-depth coverage there if I'll potentially need to rewrite or rework a lot of those pages.

          For Denoisers, for systems and features that are very artist-driven, like Ray Tracing, I tend to not document a lot of command lines that aren't useful for non-programmers. I've found that doing so can often lead to more questions than answers when someone goes down a rabbit hole making adjustments to them. That's not to say that these should never be documented, I just have a particular audience that I'm writing to that this type of information causes more frustration than resolution. Programmers tend to find this information and run with it without simplified explanations and comparison images that lose context without in-depth text.

          If users want to find the Denoiser commands, they can open the console and type in "denoiser". You'll see a list of commands come up that you can adjust.
          Click image for larger version

Name:	denoisercommands.png
Views:	1
Size:	30.7 KB
ID:	1619259

          IMO, pictures aren't always the solution to make something easier to understand either. If I were to show a comparison picture of each of these commands, I don't think would be a good use of time. Artists or designers should probably not be adjusting these setting. This is why we expose a lot artist and designer-friendly commands to the UI. Such as Lights being able to set the number of samples per pixel, or in the Post Process giving you control over Reflections, AO, GI, and Translucency with a number of properties that adjust command line properties.

          For Auto-Exposure, you can disable this in one of two ways:

          1. In the Level Viewport, click Show > Post Process > uncheck the box next to Eye Adaptation (this is Auto-Exposure). This will disable it for the Viewport only. This is an Editor only change so using PiE will not cause auto-exposure to be disabled.

          2. You can set an Exposure Min/Max in your Post Process Volume. The min and Max default to 0.03 and 2 however, if you want consistent exposure, you can just set the Min and Max to 1.0 to not have it changing the exposure levels when you look at dimly lit areas vs brightly lit ones.
          Click image for larger version

Name:	autoexposure.png
Views:	1
Size:	24.2 KB
ID:	1619260


          I hope this helps to some degree. Feel free to tag me here or shoot me a message here on the forums and I'll respond when I can.

          Tim

          Tim Hobson | Learning Resources | Epic Games
          UE4 Documentation

          Comment


            #95
            tim - thank you for taking the time to explain.


            (10 With the Denoiser, I will say that what you actually wrote as a response would be extremely valuable if it was in the document, as follows....I also added a disclaimer in parenthesis:

            "
            If users want to find the Denoiser commands, they can open the console and type in "denoiser". You'll see a list of commands come up that you can adjust.
            (*Note - settings and operation are under development and subject to later change, modification of these settings is not otherwise recommended.)

            --Your Denoiser Commands image you posted above--
            "

            PS - I now read on how to use the CMD after seeing your response, newer users may not know how to do that, so a screenshot showing the command and then the number being entered would be helpful.

            Also, the reason I asked even in the first place is is that Denoiser is in fact mentioned in the document, but then operation not described. So you are left wondering what you need to do.
            Plus, in the forums it is widely discussed as being used, but as guide does not make reference to operation, users like myself are left trying to figure out how to use.
            For example, I read in forum that the max setting is 4, while 0 is off. I have no idea if this is correct, so it is trial and error. But at least I can access the commands.

            It is strange, I was expecting there would be just one overall 'Denoiser', but I see that there 18+? Meaning you have to turn on and off each one?
            If so, quite a rabbit hole indeed. But this is a good thing, because it is under development and users can provide ideas upon trialing.
            For example, if it is an individual on/off numeric value for each one, I have an thought that there could be a 'master on/off' cmd that turns on/off all, to make it simple for users.


            (2) With the Auto Exposure, you gave a perfect explanation. But I will tell you why it wasn't working. I wasn't viewing the scene from inside the Post Processing 'box'. In other words, whenever I crossed into and out of the Post Processing box, the 1 to 1 setting was activated, or was disabled. Thus now knowing this, really what I should have done was make the Post Processing Box giant to geographically cover my viewport camera location as well as main scene contents. Then me turning off Auto Exposure would have been applicable no matter how I viewed my scene.

            But see I thought this was some weirdness with the Raytracer, but it's not, it is my own user-error in not gauging the size of the post processing box properly.


            But thank you so much, very valuable info you gave...Much appreciated!!!!
            Last edited by Daffrendo; 05-14-2019, 02:50 PM.

            Comment


              #96
              Originally posted by Daffrendo View Post
              It is strange, I was expecting there would be just one overall 'Denoiser', but I see that there 18+? Meaning you have to turn on and off each one?
              I'm assuming you're referring to the above screenshot of the denoiser commands. That's just 18 available controls, not separate denoisers. Most implementations will likely have individual denoisers for each raytraced element(reflections, shadows, GI, etc) as they all focus on different aspects, and as pictured you get even more fine-grained control over their appearance and performance if necessary. Denoising isn't something the average artist should have to worry about though, as well as the other non-denoising controls like material sorting, russian roulette, etc. as they are much more technical and deal more with the performance and not visuals.
              Lighting Artist II @ Crystal Dynamics
              ArtStation
              Twitter

              Comment


                #97
                I plan to revisit the docs for Ray Tracing over time and expand upon it. With the state that the features are currently Early Access, we don't always "fully" document as much as we would for a Production-Ready feature that is finished.

                I'll consider adding command list information, but no promises at this time. Again, denoisers shouldn't really be tweaked by designers or artists just making adjustments to the scene.

                So some additional info about denoisers (and as a side note, I'll consider adding this type of description in the near-term future over command lists that users don't really need to adjust):
                • Each feature ray tracing feature has a denoiser available.
                  • All this denoiser does is take the low sample count (a single sample per pixel) which looks like a lot of dotted points in the case of shadows, GI, and so on. The denoiser takes that low sample count and does some magic to soften, smooth out the result, and make it possible to use during real-time. While there is some minor quality loss because of using a single sample vs many hundreds or thousands per pixel (like offline renderers), however, the results are still fairly accurate to that of an offline render except in real-time.
                  • Because each RT feature is different and self-contained, a denoiser for ambient occlusion or GI isn't going to work the same as one for shadows. So they have their own for each feature. Then for each Denoiser, the additional commands you see are used by programmers to write their denoising algorithms.
                • Denoisers support up to 4 samples per pixel.
                  • This simply means that on a light casting a shadow, I can increase the SPP between 1 and 4 and the denoiser will smooth and soften the results as needed to match an offline render. When you use something outside of this range, it should fall back to just using however many samples per pixel you punch in without the denoiser (so you see a bunch of dancing points on screen for that ray traced feature.)
                  • Using a value of 0 doesn't disable the Denoiser, it just says no samples for that feature. In the case of a light's shadow, if you punch in 0, there are no samples being used so everything is dark because the light isn't being ray traced.
                • As for all the commands, I'm still on the side of the fence that we've exposed the important ones to the lights and post process volumes that matter for artists and designers to make adjustments. Beyond that, I wouldn't touch them at all.

                Auto-Exposure

                There's an Option in the Post Process Volume details panel to set it to Infinite Extent (Unbound). This will do the same as scaling the PPV infinitely large without having to do that. You can just keep it the small box and tuck it away somewhere.

                Feel free to shoot me a message or tag me. I'll offer some suggestions and help when and where I can.

                Tim


                Tim Hobson | Learning Resources | Epic Games
                UE4 Documentation

                Comment


                  #98
                  Okay, this is a pretty hard question...

                  I'm trying to figure out how to intercept a ray trace in the rendering pipeline to redirect the ray to a different direction. I've looked through the engine source code for a few hours and found the section where rays are generated, but it looks like they're doing through a shader? I looked at this tutorial on NVidia's site and I can see some parts of the high level architecture in UE4's RTX rendering pipeline, but there are quite a few differences as well to suss out. Where exactly does UE4 generate the list of rays with their starting position and end position? I'm thinking the near plane would be the film and the far plane would be the backing, with rays casted out proportionately to the FOV ratio, but I'm not seeing anything like that in the RHI code.

                  Generally speaking, I'm trying to simulate lens distortion based off of a physical lens model and it must be hyper realistic. I can't do this as a post processing effect because the density of sampled pixels varies by lens shape and you get lower resolution lens distortions in regions with high magnification (this is a side effect of post processing rather than lens distortion).

                  Comment


                    #99
                    Originally posted by George Allan CS View Post
                    I've had another look and it seems that the stair-stepping issue is related to how far objects are from the world origin (and therefore an accuracy problem). To test:

                    1. Create a cube
                    2. Enable the Path Tracer
                    3. Move the cube 100,000 units in X (or Y/Z)
                    4. Problem is clearly visible (wobbly / stairstepping edges)
                    I know exactly what this is. You're running into floating point precision problems. The farther a float moves from 0, the less precise it gets because you need to use more bits to represent the exponent and you are limited to 32 bits with a float.
                    https://en.wikipedia.org/wiki/Single...g-point_format

                    If you were writing the ray tracer code and wanted to "fix" this, one thing you could do is change all your floats to doubles, but that only kicks the problem further down the road. Another thing you could do is perform a behind the scenes origin shift on all objects in your world when the player reaches some threshold value on their X, Y or Z axis.

                    Comment


                      Originally posted by Tim Hobson View Post
                      I plan to revisit the docs for Ray Tracing over time and expand upon it. With the state that the features are currently Early Access, we don't always "fully" document as much as we would for a Production-Ready feature that is finished.

                      I'll consider adding command list information, but no promises at this time. Again, denoisers shouldn't really be tweaked by designers or artists just making adjustments to the scene.

                      So some additional info about denoisers (and as a side note, I'll consider adding this type of description in the near-term future over command lists that users don't really need to adjust):
                      • Each feature ray tracing feature has a denoiser available.
                        • All this denoiser does is take the low sample count (a single sample per pixel) which looks like a lot of dotted points in the case of shadows, GI, and so on. The denoiser takes that low sample count and does some magic to soften, smooth out the result, and make it possible to use during real-time. While there is some minor quality loss because of using a single sample vs many hundreds or thousands per pixel (like offline renderers), however, the results are still fairly accurate to that of an offline render except in real-time.
                        • Because each RT feature is different and self-contained, a denoiser for ambient occlusion or GI isn't going to work the same as one for shadows. So they have their own for each feature. Then for each Denoiser, the additional commands you see are used by programmers to write their denoising algorithms.
                      • Denoisers support up to 4 samples per pixel.
                        • This simply means that on a light casting a shadow, I can increase the SPP between 1 and 4 and the denoiser will smooth and soften the results as needed to match an offline render. When you use something outside of this range, it should fall back to just using however many samples per pixel you punch in without the denoiser (so you see a bunch of dancing points on screen for that ray traced feature.)
                        • Using a value of 0 doesn't disable the Denoiser, it just says no samples for that feature. In the case of a light's shadow, if you punch in 0, there are no samples being used so everything is dark because the light isn't being ray traced.
                      • As for all the commands, I'm still on the side of the fence that we've exposed the important ones to the lights and post process volumes that matter for artists and designers to make adjustments. Beyond that, I wouldn't touch them at all.

                      Auto-Exposure

                      There's an Option in the Post Process Volume details panel to set it to Infinite Extent (Unbound). This will do the same as scaling the PPV infinitely large without having to do that. You can just keep it the small box and tuck it away somewhere.

                      Feel free to shoot me a message or tag me. I'll offer some suggestions and help when and where I can.

                      Tim

                      Hi,TIM, I have a problem outside the scope of RT, AnselRT; I see that AnselRT support has been updated in version 4.22.1, but now Ansel is not available.

                      Now when we want to use Ansel, pressing the shortcut key will prompt "unsupported games". No operation can solve this problem, and AnselRT can not work properly.

                      The only way to use Ansel is to uninstall the Geforce of NVIDIA so that the old version of Ansel can be exhaled and used. But once Geforce is installed, Ansel, including the latest AnselRT support, cannot be used in the Unreal engine.

                      I don't know if this is a NVIDIA support problem or an internal engine support problem, but this problem seems awkward. There is support for AnselRT updates in the engine, but Ansel can no longer be used.

                      Comment


                        Originally posted by Slayemin View Post

                        I know exactly what this is. You're running into floating point precision problems. The farther a float moves from 0, the less precise it gets because you need to use more bits to represent the exponent and you are limited to 32 bits with a float.
                        https://en.wikipedia.org/wiki/Single...g-point_format

                        If you were writing the ray tracer code and wanted to "fix" this, one thing you could do is change all your floats to doubles, but that only kicks the problem further down the road. Another thing you could do is perform a behind the scenes origin shift on all objects in your world when the player reaches some threshold value on their X, Y or Z axis.
                        Thanks, yeah that was our hunch as well. I'm going to be rendering to 32bit EXR for world position pass AOVs so will also check that path tracer issue. Unfortunately the PT has other issues (at least in our custom build) where certain lights turn off when enabling it and strangely, the lights flip on/off states on each re-toggling. I've tried moving the lights to new sub-levels but have yet to pin down the issue.

                        The hybrid renderer doesn't have this issue but it doesn't seem possible to match the unbiased renderer at this point (even when realtime isn't a goal).
                        Senior Artist @ Cinesite

                        Comment


                          Originally posted by Leo Rakes View Post

                          Hi,TIM, I have a problem outside the scope of RT, AnselRT; I see that AnselRT support has been updated in version 4.22.1, but now Ansel is not available.
                          TBH, I had to look up what AnselRT was. Didn't even know about it or if it's even supposed to be supported with UE4. I don't think this is something that is on us though. I remember trying the NVIDIA Ansel plugin out ages ago when it was first introduced, but I think we just provide access to plug-in and nothing else.

                          If it's part of NVIDIA's UE4 GitHub branch, you'd probably want to take it up with them for support. Beyond that, I'm just not familiar. sorry.
                          Tim Hobson | Learning Resources | Epic Games
                          UE4 Documentation

                          Comment


                            Originally posted by Tim Hobson View Post

                            TBH, I had to look up what AnselRT was. Didn't even know about it or if it's even supposed to be supported with UE4. I don't think this is something that is on us though. I remember trying the NVIDIA Ansel plugin out ages ago when it was first introduced, but I think we just provide access to plug-in and nothing else.

                            If it's part of NVIDIA's UE4 GitHub branch, you'd probably want to take it up with them for support. Beyond that, I'm just not familiar. sorry.
                            The plugin is published by Epic, documentation: https://docs.unrealengine.com/en-US/...Ansel/Overview
                            Nilson Lima
                            Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                            Join us at Discord: https://discord.gg/uFFSEXY

                            UE4 Marketplace: Cloudscape Seasons
                            supporting: Community FREE Ocean plugin

                            Comment


                              Originally posted by NilsonLima View Post

                              The plugin is published by Epic, documentation: https://docs.unrealengine.com/en-US/...Ansel/Overview
                              I should have clarified more so that I tried out the Ansel plugin when it was introduced to UE4 specifically.

                              Also, as I mentioned, I've not used the Ansel Plugin since around the time it was added, so I'm not sure of its current state. Those docs are pretty old so they should probably be vetted again. I'll make a note to do so. Looking at the Ansel SDK on GitHub, it doesn't look like it's been updated in 6 months or more and I'm not sure how often, or when the last time was that that was updated. It's not a tool I've had any reason to use. :/

                              Tim Hobson | Learning Resources | Epic Games
                              UE4 Documentation

                              Comment


                                Originally posted by Tim Hobson View Post

                                I should have clarified more so that I tried out the Ansel plugin when it was introduced to UE4 specifically.

                                Also, as I mentioned, I've not used the Ansel Plugin since around the time it was added, so I'm not sure of its current state. Those docs are pretty old so they should probably be vetted again. I'll make a note to do so. Looking at the Ansel SDK on GitHub, it doesn't look like it's been updated in 6 months or more and I'm not sure how often, or when the last time was that that was updated. It's not a tool I've had any reason to use. :/
                                Because 4.22 updates DXR and 4.22.1 updates have AnselRT support, it is not clear whether the problem that Ansel cannot use is due to engine problems or NVIDIA problems.

                                AnselRT should be great. It should be the best tool for getting high resolution and panoramic images in the Unreal engine, and the RT version also adds special DXR quality improvement support. I see Ansel's RT version is also supported in the 4.22.1 update. He mentioned "Increasing support for AnselRT" in Epic's 4.22.1 Githib and EPIC's official update log.

                                Unfortunately, Ansel can't start properly at present. If you install the Geforce of NVIDIA, starting Ansel in the engine will prompt "unsupported games". AnselRT and NVIDIA Geforce now think that the engine is "unsupported games", so it can't start. (I used AnselRT successfully in the preview version of 4.22 in early March, but there was no support for Ansel RT functionality in the engine at that time.)

                                Unfortunately, this is not available for the time being. I just want to ask if this is the reason for the internal support of the engine, but at present, it seems more likely that Geforce of NVIDIA has made a mistake.
                                Last edited by Leo Rakes; 05-15-2019, 09:26 PM.

                                Comment

                                Working...
                                X