Announcement

Collapse
No announcement yet.

NVIDIA GameWorks Integration

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

    Originally posted by KlausT View Post
    Is this on your ToDo list? May I ask when the 4.7 integration might be completed? I really enjoy using the 4.7 branch and don't want to go back.
    4.7 + VXGI (+ FleX) = Win
    Yes, it's on my to-do list, but I don't think I'll get to it until 4.7 is fully released.

    --Mike

    Comment


      Originally posted by melak47 View Post
      The first option sounds expensive, duplicating a lot of cone tracing that was already done for the diffuse shading for the reflections.
      As for the second option, separating diffuse and specular shading into different passes is probably going to be expensive as well...

      Well, I hope you guys can come up with something
      Yes, I agree that cone tracing is the most expensive part of vxgi (in fact, voxelization has miniscule cost compared to this). But for additional bounces, you can use less cones because the details are less noticeable:

      For diffuse, 5 cones (1 normal, plus 4 in each tangent direction to a surface) would be sufficient and you only need a single cone trace for specular. In fact, for the first bounce, I'm pretty sure they only use a single specular cone which is treated as a ray in the direction of the reflection vector.

      I have done this in practice in my own experimental engine and it only at most doubles the cost of the cone tracing - this was able to give me unlimited bounces. In fact, you can test the cost of these additional cones by adjusting the number of cones in the vxgi diffuse parameters.

      I would be able to do this in vxgi to demonstrate, but they need to provide some instruction that allows data to be read from the 3D texture, something like VXGI::LoadVoxelizationData (which currently doesn't exist).
      Last edited by gboxentertainment; 02-22-2015, 12:42 AM.

      Comment


        Originally posted by Mike.Skolones View Post
        Is the point light movable?
        Yes, the point light is movable. I figured out the bug. Its because point light shadows are dealt with separately - they all fall under the OnePassPointLightShadowProjection functions.
        I tried to direct the pointlight shadow cubemap into the voxelization shader, but can't seem to get any results from the cubemap.

        Comment


          I downloaded and compiled with no error. Only one warnings which is rename something like that. But when i try to start it says "initializing..." then my computer slows down and freezes. I waited like 1 hours and nothing happens... Any ideas? I have i7 - 4770, 16gb of ram, nvidia GTX 780.
          Last edited by Gandosh; 02-22-2015, 01:33 AM.
          Pursuit of Realistic Cinematic scene.

          Comment


            Originally posted by Gandosh View Post
            I downloaded and compiled with no error. Only one warnings which is rename something like that. But when i try to start it says "initializing..." then my computer slows down and freezes. I waited like 1 hours and nothing happens... Any ideas? I have i7 - 4770, 16gb of ram, nvidia GTX 780.
            Yes, this is the same problem mentioned above, you have to rebuild the ShaderCompileWorker. There's a bug in the UE4 solution, there should be a dependency that forces a recompile.

            Click image for larger version

Name:	shadercompilerworker.JPG
Views:	2
Size:	440.1 KB
ID:	1066908

            Comment


              Originally posted by Mike.Skolones View Post
              Yes, this is the same problem mentioned above, you have to rebuild the ShaderCompileWorker. There's a bug in the UE4 solution, there should be a dependency that forces a recompile.
              Oh thank you very much.
              Pursuit of Realistic Cinematic scene.

              Comment


                Maybe the points about ShaderCompileWorker and nvapi should be in the README, at the moment it just seems to be generic boilerplate.

                Comment


                  By the way. I can use this commercially right?
                  Pursuit of Realistic Cinematic scene.

                  Comment


                    Here are some results from testing emissive lighting:

                    Click image for larger version

Name:	vxgi-em1.jpg
Views:	1
Size:	336.9 KB
ID:	1066913

                    I have noticed that if the emissive part of a texture is too small, its color will not be included in the voxelization:

                    Click image for larger version

Name:	vxgi-em1-2.jpg
Views:	1
Size:	336.3 KB
ID:	1066914

                    Also with emissive textures like the one I used, there isn't a smooth transition when you move further away from the object due to this.

                    I understand that there must be a threshold where the emissive part of a texture will not be included in the voxelization if it is too small - for optimization purposes. Is this the vxgi voxelization thickness parameter? Doesn't seem to do anything when I adjust it.

                    I found a workaround for this: I used my own texture, which is less clean than the one found in the starter content. i.e. since there is more "color" in it (even something that is close to black but not zero), it gets included in the voxelization.

                    Click image for larger version

Name:	vxgi-em1-3.jpg
Views:	2
Size:	337.7 KB
ID:	1066917

                    Btw, how is filtering of the voxels done? Is it completely handled by the hardware mip map interpolation or is additional blurring done using a compute shader?
                    Last edited by gboxentertainment; 02-22-2015, 04:55 AM.

                    Comment


                      Originally posted by Mike.Skolones View Post
                      That's quite strange. When I looked into this I easily increased the particle count to over 50,000 using a 680. I'll have another look when I get a chance.
                      Just noticed something, it is 16300 per emmiter, so I'm pretty sure it has to do with some config variables of memory per emmiter.

                      EDIT: With multiple emmiters I can get as many fluid particles as I set in the container.
                      Last edited by Cube2222; 02-22-2015, 06:16 AM.

                      Comment


                        Particles aren't captured in the voxel structure thus do not contribute to the emissive vxgi. I guess their materials must be dealt with differently in the code.

                        Comment


                          Originally posted by Mike.Skolones View Post
                          I don't think there's a console command, but I believe the initialization is lurking somewhere. I'll look into it.
                          I found vxgimapsize = 128 in BaseEngine.ini

                          I can half this to 64 to get significantly better performance (saves 7ms on my gtx780), but if I want to lower any more than that it crashes with this error:

                          For selected VoxelizationParameters.mapSize (32), mipLevels (5) must be within range [0, 4]

                          Where do I adjust the mipLevels? I tried to adjust vxgistacklevel but still get the same error.

                          I reckon even vxgimapsize = 16 would provide decent enough quality for diffuse. With specular, there should be the option of turning on SSR at the same time as vxgi specular because they both can contribute to the scene (i.e. SSRs for contact reflections and VXGI specular for the hidden information) or have a choice between the two per material.
                          Last edited by gboxentertainment; 02-22-2015, 09:08 AM.

                          Comment


                            I figured out how to turn on SSRs with vxgi specular. In ReflectionEnvironmentShaders.usf:
                            Code:
                            #if APPLY_VXGI
                            		SpecularLighting.rgb += ScreenSpaceData.VxgiSpecular.rgb;
                            #endif
                            All I had to do was add the plus sign.

                            Click image for larger version

Name:	vxgi-refl1.jpg
Views:	1
Size:	352.4 KB
ID:	1066926

                            Now the next thing to do is to figure out how to get point light shadows and particles voxelized. Hopefully gameworks can incorporate unlimited bounces or at least provide some way of reading the voxel textures.
                            Last edited by gboxentertainment; 02-22-2015, 10:20 AM.

                            Comment


                              Originally posted by melak47 View Post
                              Well I think the reason is that this is what I would call a "0+1 bounce" approach:
                              The voxel data structure that holds the lighting information contains only samples from directly lit or emissive surfaces (0 bounces),
                              and the 1 bounce is achieved by the cone tracing into the voxel structure when shading surfaces - which gives us one very nice diffuse bounce.

                              But for reflections, this means that reflective surfaces are only able to reflect that 0-bounce lighting stored in the voxel structure.

                              For reflections to be able to reflect the 1 diffuse bounce, reflective surfaces would either need to perform 2 bounces themselves
                              (first, trace a number of cones to surfaces that this surface "sees",
                              then trace from those surfaces into the scene to determine their illumination so we can reflect them),
                              or like someone else said, the 1 bounce diffuse illumination calculated for the scene would have to be added to the voxel structure after diffuse shading, and the specular shading performed afterwards - that way it could "see" and reflect diffuse bounce.

                              The first option sounds expensive, duplicating a lot of cone tracing that was already done for the diffuse shading for the reflections.
                              As for the second option, separating diffuse and specular shading into different passes is probably going to be expensive as well...

                              Well, I hope you guys can come up with something
                              In the museum demo here: https://developer.nvidia.com/gi-works indirect specular works fine.

                              Originally posted by gboxentertainment View Post
                              I figured out how to turn on SSRs with vxgi specular. In ReflectionEnvironmentShaders.usf:
                              Code:
                              #if APPLY_VXGI
                              		SpecularLighting.rgb += ScreenSpaceData.VxgiSpecular.rgb;
                              #endif
                              All I had to do was add the plus sign.

                              [ATTACH=CONFIG]26591[/ATTACH]

                              Now the next thing to do is to figure out how to get point light shadows and particles voxelized. Hopefully gameworks can incorporate unlimited bounces or at least provide some way of reading the voxel textures.
                              What is the use of VXGI if you need to enable SSR? I thought VXGI could do indirect specular by its own.
                              Last edited by Nudlegaru; 02-22-2015, 11:10 AM.

                              Comment


                                Originally posted by Gandosh View Post
                                By the way. I can use this commercially right?
                                Yes, of course! Please do!

                                The UE4 EULA specifies that anything we share here can be used by any UE4 licensee.

                                Thanks,
                                Mike

                                Comment

                                Working...
                                X