Announcement

Collapse
No announcement yet.

Global Illumination alternatives

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

    Thanks for explanation!
    It's still good to see some progress on this front regardless of how it will work out (:.

    https://forums.unrealengine.com/show...ugin-AHR/page3

    This guy is getting nice results.
    https://github.com/iniside/ActionRPGGame - Action RPG Starter kit. Work in Progress. You can use it in whatever way you wish.

    Comment


      In case you guys want to try out this early version. This is like step 1 out of 10 toward getting it usable, but the scariest part is working (efficient indirect shadowing).

      Change 2390645 by Daniel.Wright@DWRIGHT-Z2430-UE4 on 2014/12/16 19:59:21
      Distance Field Global Illumination first working version
      * Requires a Movable Skylight + 'r.DistanceFieldGI 1' + 'r.GenerateMeshDistanceFields' project setting enabled
      * Provides a single bounce of Diffuse GI with bounce distance limited by OcclusionMaxDistance (default 6m)
      * Virtual Point Lights are placed from the directional light by ray tracing the scene's distance fields, normal comes from SDF gradient
      * Currently only placing 128*128 VPLs up to 40m from camera
      * VPLs light irradiance cache samples using hemispherical disk light model, indirect shadowing is provided by the same cone traces used for Distance Field AO
      * Irradiance is computed only at irradiance cache points (max every 8 pixels) and interpolated to the rest of the pixels
      * Hardcoded half grey material color for now, and poor performance due to brute force VPL lighting

      Click image for larger version

Name:	0Fortnite.jpg
Views:	1
Size:	946.0 KB
ID:	1062222

      Comment


        Thanks for the update Daniel! I'm not sure how crude the VPL approximation is and how it would look at a distance where none are placed, but the picture looks good and it's an interesting feature.
        [PLUGIN] Google TextToSpeech (WaveNet) Integration

        Comment


          That actually looks pretty nice I think

          Comment


            Originally posted by DanielW View Post
            In case you guys want to try out this early version. This is like step 1 out of 10 toward getting it usable, but the scariest part is working (efficient indirect shadowing).

            Change 2390645 by Daniel.Wright@DWRIGHT-Z2430-UE4 on 2014/12/16 19:59:21
            Distance Field Global Illumination first working version
            * Requires a Movable Skylight + 'r.DistanceFieldGI 1' + 'r.GenerateMeshDistanceFields' project setting enabled
            * Provides a single bounce of Diffuse GI with bounce distance limited by OcclusionMaxDistance (default 6m)
            * Virtual Point Lights are placed from the directional light by ray tracing the scene's distance fields, normal comes from SDF gradient
            * Currently only placing 128*128 VPLs up to 40m from camera
            * VPLs light irradiance cache samples using hemispherical disk light model, indirect shadowing is provided by the same cone traces used for Distance Field AO
            * Irradiance is computed only at irradiance cache points (max every 8 pixels) and interpolated to the rest of the pixels
            * Hardcoded half grey material color for now, and poor performance due to brute force VPL lighting

            [ATTACH=CONFIG]19951[/ATTACH]
            Looks nice but, gag! That's why voxel accelerated cone tracing is such a nice idea. You've already got your acceleration structure good to go, along with material information and etc. Yay no VPL stuff to deal with!

            What's the performance on this anyway? I don't have time to update and etc. quite yet with Holiday stuff to do. Can anyone tell me?

            Comment


              Originally posted by Frenetic Pony View Post
              Looks nice but, gag! That's why voxel accelerated cone tracing is such a nice idea. You've already got your acceleration structure good to go, along with material information and etc. Yay no VPL stuff to deal with!

              What's the performance on this anyway? I don't have time to update and etc. quite yet with Holiday stuff to do. Can anyone tell me?
              Prolly lower, to what is expected, due to VPL injection (;

              Never the less it's still awesome.

              But that makes me wonder, if that is really will be much better than voxels ? Yes, yes SVOGI, was slow, but since then, we have come long way (well it's still not super fast, but it's within usable range)..

              The only advantages it seems that DF technique will have is no leaking trough thin walls. And some data is precomputed, which makes it a bit cheaper. But other than that it seems to operate on similar principles, just against different data structure which is precomputed.


              I will definitely check it out, once it is in promoted branch. Not going to compile master or backport those changes. That's way to much.

              But since, I couldn't make something like that in milion years, I'm waiting eagerly for it .
              Last edited by iniside; 12-17-2014, 03:12 AM.
              https://github.com/iniside/ActionRPGGame - Action RPG Starter kit. Work in Progress. You can use it in whatever way you wish.

              Comment


                I think you guys are making assumptions on things you do not understand. It's like you heard about VPLs in a different context and now they are automatically bad. Virtual point lights are simply freely placed point representations of bounced lighting. Freely placed bounce light representations can be better than ones with quantized positions (voxels) because you can be smarter about where and how you place them.

                VPLs with Distance Field GI are placed by tracing rays from the light through the distance field respresentation of the scene. It takes ~.5ms in a full Fortnite level, without even culling the objects being ray traced against (unoptimized). Triangle count does not affect it. Contrast this with Reflective Shadowmaps used by Light Propagation Volumes to inject VPLs, which would be about 6ms in this scene (from experience).

                Voxel based methods are only good if you can afford enough resolution to keep the voxels small, say 10cm. That's not possible on anything but the $600 GPU's. Even there, the massive GPU time is not well spent. The reason is that voxels are a terrible representation for any diagonal geometry, or thin walls. The result is leaking everywhere and self-occlusion artifacts, or if you allocate all your resolution up close, then you have a poor view range. Voxel methods require huge costs to handle dynamic scene updates, because revoxelizing requires multiple rasterization of the mesh's triangles.

                Distance field GI gets around these problems by 1) storing geometry representations in distance fields which reconstruct diagonal or thin surfaces accurately after interpolation 2) Not requiring any operations on the triangles of the mesh at all. Dynamic scene updates are just replace this matrix on the GPU, no revoxelization.

                Anyway I probably won't post any more early results here. Not sure what I expected.

                Comment


                  Originally posted by DanielW View Post
                  I think you guys are making assumptions on things you do not understand. It's like you heard about VPLs in a different context and now they are automatically bad. Virtual point lights are simply freely placed point representations of bounced lighting. Freely placed bounce light representations can be better than ones with quantized positions (voxels) because you can be smarter about where and how you place them.

                  VPLs with Distance Field GI are placed by tracing rays from the light through the distance field respresentation of the scene. It takes ~.5ms in a full Fortnite level, without even culling the objects being ray traced against (unoptimized). Triangle count does not affect it. Contrast this with Reflective Shadowmaps used by Light Propagation Volumes to inject VPLs, which would be about 6ms in this scene (from experience).

                  Voxel based methods are only good if you can afford enough resolution to keep the voxels small, say 10cm. That's not possible on anything but the $600 GPU's. Even there, the massive GPU time is not well spent. The reason is that voxels are a terrible representation for any diagonal geometry, or thin walls. The result is leaking everywhere and self-occlusion artifacts, or if you allocate all your resolution up close, then you have a poor view range. Voxel methods require huge costs to handle dynamic scene updates, because revoxelizing requires multiple rasterization of the mesh's triangles.

                  Distance field GI gets around these problems by 1) storing geometry representations in distance fields which reconstruct diagonal or thin surfaces accurately after interpolation 2) Not requiring any operations on the triangles of the mesh at all. Dynamic scene updates are just replace this matrix on the GPU, no revoxelization.

                  Anyway I probably won't post any more early results here. Not sure what I expected.
                  Oh no need to feel offended. Sorry if that is how you did understand it! (;. It was by no means intention, and I understand how much effort is needed to even get something like this to work. So very much appreciated!.

                  It awesome you explained it, and now it is much more clear what is it doing! Thanks you very much for it!

                  VPLs with Distance Field GI are placed by tracing rays from the light through the distance field respresentation of the scene. It takes ~.5ms in a full Fortnite level, without even culling the objects being ray traced against (unoptimized). Triangle count does not affect it. Contrast this with Reflective Shadowmaps used by Light Propagation Volumes to inject VPLs, which would be about 6ms in this scene (from experience).
                  That is especially awesome. Because I also encountered this issue, on a level, which was probabaly 4x times smaller than the one from Fortnite.
                  https://github.com/iniside/ActionRPGGame - Action RPG Starter kit. Work in Progress. You can use it in whatever way you wish.

                  Comment


                    Nah, please dont stop sharing your progress Daniel!

                    I think everybody is just super excited about anything that provides dynamic gi, and since there are so many approaches (and also approaches that use techniques that are, as described by you, from another approach, but there it did not work well, like your old voxel cone tracing compared to newer techniques like from tomorrow children, you can not genreally say this or that is bad) people just go nuts over it (myself included as you know^^)

                    It is super interesting to read your stuff! Please continue and dont feel offended by us questioning every thing you do Its not that we dont believe....we just want to know and understand. And of course there is also a lot of confusion because everbody (this is at least a bit the impression I have) is hoping for some holy grail in the end^^ So basically a solution that works with everything and scales independently. Sounds like a dream^^ But who knows...maybe we can achieve something close to it this generation. But the next one for sure (although I have a slight feeling that the next gen will bring realtime path tracing )

                    Cheers!
                    Check out UNREAL 4 Lighting Academy
                    https://forums.unrealengine.com/show...ng-like-that-)

                    Comment


                      Hey Daniel! Please don't let some of the posts here discourage you from showing your developments! Your distance field work already looks awesome and I can only imagine what else you got cooking up with them.

                      You know better than anyone that people will never give up on SVOGI and it'll continue to live on as some false holy grail for GI; and Tomorrows Children using it only added fuel to that fire (as awesome as that game looks you can see its art style is what allows that to even be possible). I don't think anyone will be completely satisfied unless they see it running at 15fps on their own pc or with ridiculous light leaking, but what can you do?

                      Quick question regarding distance fields - I was wondering if it would ever be possible to mix together both baked occlusion as well as the distance field occlusion? I was thinking it would be nice to bake the sky occlusion for static objects that you know will never move or distort, but then allow moveable objects to cast and gather the AO and soft shadowing from the sky / environment.

                      Comment


                        It`s amazing to see you`re working on a so requested feature from the community.

                        I'm here for a few months already and only yesterday bought a computer that was enough to run it - I stayed all this time waiting to run Unreal instead other engines mainly because this contact we can have with developers, this is really awesome!!!

                        Please keep sharing the progress and explanations, I remember when was said that the Distance Fields could be used by GI but had no idea of how this could be implemented or if it would be able to run on production, after your explanation and screenshots I'm much more confident about it

                        Thank you for the hard work!

                        Kind Regards.

                        Comment


                          Originally posted by DanielW View Post
                          I think you guys are making assumptions on things you do not understand. It's like you heard about VPLs in a different context and now they are automatically bad. Virtual point lights are simply freely placed point representations of bounced lighting. Freely placed bounce light representations can be better than ones with quantized positions (voxels) because you can be smarter about where and how you place them.

                          VPLs with Distance Field GI are placed by tracing rays from the light through the distance field respresentation of the scene. It takes ~.5ms in a full Fortnite level, without even culling the objects being ray traced against (unoptimized). Triangle count does not affect it. Contrast this with Reflective Shadowmaps used by Light Propagation Volumes to inject VPLs, which would be about 6ms in this scene (from experience).

                          Voxel based methods are only good if you can afford enough resolution to keep the voxels small, say 10cm. That's not possible on anything but the $600 GPU's. Even there, the massive GPU time is not well spent. The reason is that voxels are a terrible representation for any diagonal geometry, or thin walls. The result is leaking everywhere and self-occlusion artifacts, or if you allocate all your resolution up close, then you have a poor view range. Voxel methods require huge costs to handle dynamic scene updates, because revoxelizing requires multiple rasterization of the mesh's triangles.

                          Distance field GI gets around these problems by 1) storing geometry representations in distance fields which reconstruct diagonal or thin surfaces accurately after interpolation 2) Not requiring any operations on the triangles of the mesh at all. Dynamic scene updates are just replace this matrix on the GPU, no revoxelization.

                          Anyway I probably won't post any more early results here. Not sure what I expected.
                          Daniel, please keep us posted on Distance Field GI progress! I'm kind of blown away by how awesome it looks(even though its still WIP).
                          TOUR of DUTY

                          Comment


                            Originally posted by DanielW View Post
                            I think you guys are making assumptions on things you do not understand. It's like you heard about VPLs in a different context and now they are automatically bad. Virtual point lights are simply freely placed point representations of bounced lighting. Freely placed bounce light representations can be better than ones with quantized positions (voxels) because you can be smarter about where and how you place them.

                            VPLs with Distance Field GI are placed by tracing rays from the light through the distance field respresentation of the scene. It takes ~.5ms in a full Fortnite level, without even culling the objects being ray traced against (unoptimized). Triangle count does not affect it. Contrast this with Reflective Shadowmaps used by Light Propagation Volumes to inject VPLs, which would be about 6ms in this scene (from experience).

                            Voxel based methods are only good if you can afford enough resolution to keep the voxels small, say 10cm. That's not possible on anything but the $600 GPU's. Even there, the massive GPU time is not well spent. The reason is that voxels are a terrible representation for any diagonal geometry, or thin walls. The result is leaking everywhere and self-occlusion artifacts, or if you allocate all your resolution up close, then you have a poor view range. Voxel methods require huge costs to handle dynamic scene updates, because revoxelizing requires multiple rasterization of the mesh's triangles.

                            Distance field GI gets around these problems by 1) storing geometry representations in distance fields which reconstruct diagonal or thin surfaces accurately after interpolation 2) Not requiring any operations on the triangles of the mesh at all. Dynamic scene updates are just replace this matrix on the GPU, no revoxelization.

                            Anyway I probably won't post any more early results here. Not sure what I expected.
                            Oh I'm certainly not saying VPLs are terrible, just another thing to consider and they don't work well with glossy reflections, though I do recall Squeenix work on spherical guassian representations of VPLs for improved VPL reflection behavior.

                            No my point was in terms of data structures the two aren't that different, except voxels have very nice filtering aspects automatically from hardware supported mipmapping. Sparse resources and cascading LOD can get 10cm resolution and smaller into a very compact memory presence as well, since you only end up storing null pointers for all the empty space.

                            I don't mean to sound like I'm insulting the distance field stuff, it's just that in my experience I like voxel representations better. With 3d textures instead of sparse voxel octrees I've found you can get much, much better performance as well, since you're not bouncing around in memory everywhere and have a predictable and coherent structure to trace through.
                            Last edited by Frenetic Pony; 12-19-2014, 01:53 AM.

                            Comment


                              I'm having trouble getting this to work.
                              Got r.DistanceFieldGI=1 and r.GenerateMeshDistanceFields=1 in ConsoleVariables.ini
                              Attached a movable skylight to the scene.
                              Even when I turn on Visualize -> Distance Field Global Illumination it shows complete blackness.

                              Comment


                                You have to enable "Generate Mesh Distance Fields" in the project settings under "rendering" in the editor.
                                ArtStation

                                Comment

                                Working...
                                X