Announcement

Collapse
No announcement yet.

Landscape Reflections - Being PBR is Not Enough.

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

    #16
    I don't think it has been mentioned yet, but a big part could also be that the average visible normal on a 3-dimensional ground starts to shift significantly at grazing angles. The strength of that effect depends on how much height the material relative to the detail size has. I've done a quick test for it in Blender, comparing normal mapped planes with actual geometry. (And really this effect is in no way specific to only landscapes anyway, something like a wool sweater would display the same behavior):
    Click image for larger version

Name:	Terrain_and_normals.jpg
Views:	324
Size:	563.2 KB
ID:	1680093
    Click image for larger version

Name:	Terrain_and_normals_sun.gif
Views:	299
Size:	438.2 KB
ID:	1680094
    A quick solution could be to bend the normal towards the camera, but that would require further testing.
    Randomized tiling function to eliminate repeating patterns in textures.

    Comment


      #17
      I've tried my theory of bending the normal. Currently, I'm just creating a dot product from the camera to surface point direction and the vertex normal. And use that with an eyeballed curve to bend the normal towards the camera.
      Example with a light shining towards the camera and roughness values of 1 and 0.25.
      Click image for larger version

Name:	Terrain_and_normal_correction.gif
Views:	267
Size:	477.3 KB
ID:	1682846
      It's less pronounced with a light behind the camera but still a clear improvement (only roughness 1 here)
      Click image for larger version

Name:	Terrain_and_normal_correction_2.gif
Views:	253
Size:	289.5 KB
ID:	1682847
      Randomized tiling function to eliminate repeating patterns in textures.

      Comment


        #18
        One thing that would help rough surfaces at grazing angles would be multiscattered specular.

        Comment


          #19
          Also maybe switching to Oren-Nayar diffuse shading, over the standard lambertian model.

          Comment


            #20
            Since I'm currently rewriting my landscape material I have put my theory to the test in unreal and while this is probably not "correct" bending the normal towards the camera leads to a significant visual improvement.
            Click image for larger version

Name:	witch201912051.jpg
Views:	182
Size:	188.2 KB
ID:	1694708
            Click image for larger version

Name:	witch201912052.jpg
Views:	198
Size:	197.9 KB
ID:	1694707

            Here is the material snipped I'm using to bend the normal, the values are just eyeballed to look good:
            Click image for larger version

Name:	witch20191205NormalBend.jpg
Views:	193
Size:	222.7 KB
ID:	1694709
            Randomized tiling function to eliminate repeating patterns in textures.

            Comment


              #21
              Nice, I love the control you can have with your solution witch-dev. Thank you for sharing the code.

              Comment


                #22
                witch-dev

                Why did you base the lerp on the Saturate output? Not questioning it because I know something better, but asking because I'm learning.

                Comment


                  #23
                  Originally posted by preston42382 View Post
                  witch-dev

                  Why did you base the lerp on the Saturate output? Not questioning it because I know something better, but asking because I'm learning.
                  Because linear interpolates generally take an alpha value between 0 and 1. Saturate works like a clamp between 0 - 1, so in order to avoid any unwanted negative values coming out of the Lerp, you should clamp the alpha input.

                  You could always go outside of 0 - 1 but it depends on your use. In most cases, there is a specific purpose to blend between 2 fixed inputs so you clamp the alpha to never get anything outside of the 2 inputs.
                  Last edited by rosegoldslugs; 12-07-2019, 11:49 PM.
                  Lighting Artist @ Rockstar Games
                  ArtStation
                  Twitter

                  Comment


                    #24
                    Originally posted by witch-dev View Post
                    Since I'm currently rewriting my landscape material I have put my theory to the test in unreal and while this is probably not "correct" bending the normal towards the camera leads to a significant visual improvement.
                    It's definitely a hack, but hey it works, great job!

                    Comment


                      #25
                      Originally posted by preston42382 View Post
                      witch-dev

                      Why did you base the lerp on the Saturate output? Not questioning it because I know something better, but asking because I'm learning.
                      Rosegoldslugs explained it very well, though admittedly, in this case, it's not really needed. The values won't go out of the 0-1 range anyway (At least with reasonable input values).
                      Also, the abs node after the dot product should probably be a saturate instead.
                      Randomized tiling function to eliminate repeating patterns in textures.

                      Comment


                        #26
                        @witch-dev Nice workaround but not suitable for every situation. Imagine looking down a extreme slope. Or having watery/wet layer on the ground. It will look very wrong.
                        Artstation
                        Join the support channel
                        Gumroad Store

                        Comment

                        Working...
                        X