Announcement

Collapse
No announcement yet.

RTX backface issue

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

    RTX backface issue

    Hello all,
    I experienced and strange behavior with backface on a simple plane : shadow is not casted in the right direction.
    Just add a directionnal that cast ray traced shadows and add a plane.

    Is there a settings somewhere in the engine to fix this issue?

    Click image for larger version

Name:	RTX_Backface.jpg
Views:	1
Size:	153.4 KB
ID:	1603644 ​​​​​​​


    #2
    This is a known current issue. We currently trace rays from the surface towards the light source, which is opposite to what happens for shadow map rendering.
    Workaround is to set r.RayTracing.Shadows.EnableTwoSidedGeometry 1. This disabled back face culling for shadows. Results will still not always match shadow maps, but will be closer to them when scene contains non-watertight geometry.

    Comment


      #3
      Yes, I noticed using this cvar indeed fix the issue.
      Thanks for your quickly response!

      Comment


        #4
        YuriyODonnell Heavily impacts foliage/trees as well. It looks cool with the above cvar but it does wreck the subsurface effect. Docs says the foliage lighting model should be fully supported but I'm just guessing it's still a WiP? (hope so )
        https://www.artstation.com/chesire

        Comment


          #5
          Chesire We are considering making r.RayTracing.Shadows.EnableTwoSidedGeometry 1 default. What kind of issues do you see with subsurface effect?

          Comment


            #6
            YuriyODonnell First of all my apologies for the late reply. Normally I get notifications but in this case I did not. About the issue with subsurface when having EnabledTwoSidedGeometry cvar set to 1, I guess it works but it does look different in the foliage lighting model. Where without raytracing it's very easy to achieve this almost translucent look on leaves due to SSS, with raytracing this is harder because -and please correct me if I'm totally off here, it seems the shader calculates the areas that can now receive 'proper SSS' (meaning not boosting it manually with multiplies or normal trickey) is smaller. Almost like the 2-sided shadowing cuts into parts that should actually be able to receive SSS. Best way to see this is by using just about any tree, put a directional light behind it so it gets this nice SSS corona and only then move that scene to -dx12 RT ON. Tbh raytraced foliage and trees look absolutely stunning but the SSS part I believe is currently not correct.
            https://www.artstation.com/chesire

            Comment


              #7
              Originally posted by YuriyODonnell View Post
              Chesire We are considering making r.RayTracing.Shadows.EnableTwoSidedGeometry 1 default. What kind of issues do you see with subsurface effect?
              Here is a comparison between raytraced directional light and CSM :

              CSM :
              Click image for larger version

Name:	CSM_Sun.jpg
Views:	1
Size:	347.8 KB
ID:	1610653
              Raytraced :

              Click image for larger version

Name:	Raytraced_Sun.jpg
Views:	1
Size:	330.3 KB
ID:	1610654
              https://www.artstation.com/klass

              Comment


                #8
                Should we log this as a bug YuriyODonnell ? Just rly hoping it's not 'working as intended' cause hopefully you'll agree from Klass ' shots that the SS effect with CSM looks far superior to the one with raytracing enabled.
                https://www.artstation.com/chesire

                Comment


                  #9
                  Originally posted by Chesire View Post
                  Should we log this as a bug YuriyODonnell ? Just rly hoping it's not 'working as intended' cause hopefully you'll agree from Klass ' shots that the SS effect with CSM looks far superior to the one with raytracing enabled.
                  Clearly superior!
                  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


                    #10
                    Originally posted by Chesire View Post
                    Should we log this as a bug YuriyODonnell ? Just rly hoping it's not 'working as intended' cause hopefully you'll agree from Klass ' shots that the SS effect with CSM looks far superior to the one with raytracing enabled.
                    Yes, please file a bug. If you are able to provide example project that demonstrates the issue and a few screenshots of desired vs current look, it would be super helpful.

                    In general, there are some limits to how ray tracing works with subsurface scattering. Shadow maps are currently required for certain effects (such as transmission) to work correctly. This is because ray traced shadows work by starting a ray at the receiving surface and tracing it toward the light. Shadow maps do the opposite: start from light and "trace" towards scene. Shadow maps therefore allow us to approximate object thickness.

                    My gut feeling is that a shadow map will be required to achieve the subsurface look you are after (i.e. shadow maps would still need to be rendered even when RT shadows are on, but only used for SSS). Perhaps a specialized path can be also implemented using ray tracing, but no work has been done on this specifically so far.

                    Comment

                    Working...
                    X