Announcement

Collapse
No announcement yet.

Why do these terrain lighting artifacts happen?

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

    Why do these terrain lighting artifacts happen?

    There are two artifacts I don't quite understand in this video:

    https://watte.net/unreal-terrain-lighting-20200608.mp4

    The first is that the sun seems to shine through the top of the hill. (Perhaps this is some kind of bloom/flare?)
    The second is that the hills don't actually cast a shadow on the ground at certain distances away from them.
    You can easily see the "gap" of sunlight, and the gleam in the "rocks" in the texture, at certain distances.
    However, the hills DO cast a shadow closer to me, which is super weird.

    Unreal Editor 4.25.1, Windows 10, GTX 1080 Ti, driver version 26.21.14.4587 (445.87)

    #2
    For those who don't want to download a movie from my random home page:

    Click image for larger version  Name:	unreal-engine-landscape-lighting.jpg Views:	0 Size:	94.8 KB ID:	1773109

    The "No Shadow" problem turns out the be caused by the "Dynamic Shadow Distance MovableLight" setting on the Directional Light component of the sun. Setting it to 100000 instead of the default 20000 made the problem go away. (For this particular map -- other maps have other requirements)

    I still don't know why the bright sun disc seems to draw on top of the hilltop, though. Also, when I park the camera "just so," the sun disk will start strobe flashing like a club lighting effect. Any help with tracking down these sun behavior would be much appreciated.
    Last edited by jwatte; 06-08-2020, 02:55 PM.

    Comment


      #3
      In the material for the landscape, the specular value or a specular property in it could be set too high, so generating an extra bright, specular highlight. Then it appears as the sun going through the peak because the white clouds are right behind it and/or it's so bright and large that it completely masks that part of the mountain peak.

      If it's not specular, then try checking the atmospheric fog actor's Inscattering Intensity value or other properties for it. Or the height fog actor's Inscattering value / properties. Too much inscattering can generate super bright areas on surfaces...and based on the location and rotation of the sun in the screenshot, it would affect that side of the mountain moreso than the other side(s)...particularly with the sun disk there.

      Comment


        #4
        For shadows, use far shadows for landscape only.

        Comment


          #5
          @presto423: I'd expect a specular highlight to be less round, and also to be visible on other surfaces with the right angle (there are no such highlights on the rounded hills to the left/right)
          I'll look into inscattering, that may be the issue!
          @Bits360: As I posted in #2, I realized that the problem was the cascade shadow distance. Also, turning up to 4 cascades made near quality stay okay while still correctly shadowing out to 100000 units.

          Comment


            #6
            Was saying, you should use far shadows with 1 cascade for landscape only, as a performance increase

            Comment


              #7
              The sun disk appears to be semi-translucent or popping in in front of the mountain-side peak abruptly and returning to the background...repeatedly really fast. If that's what's happening, is it possible the sun disk or the landscape material is getting sorted wrong?

              Comment


                #8
                If that's what's happening, is it possible the sun disk or the landscape material is getting sorted wrong?
                That is also a thing that is happening -- I think this is actually a separate problem. It may be some feedback effect from the "should I lens flare" logic in the sun renderer.
                I wouldn't be so annoyed at this if it were my own fault, but these are stock settings from one of the "create new map" settings in 4.25.1, and you'd think those settings would have been reasonably vetted ...

                Comment

                Working...
                X