Dismiss Notice
This Section is READ ONLY - All Posts Are Archived

Shadow Distance is borked

Discussion in 'User Interface (Including Launcher)' started by Barugon, Aug 8, 2018.

Thread Status:
Not open for further replies.
  1. Barugon

    Barugon Avatar

    Messages:
    12,528
    Likes Received:
    19,715
    Trophy Points:
    153
    Gender:
    Male
    08/08/2018 16:33
    Title: Shadow Distance is borked.
    Reproduction Rate: 100%
    Blocker? No.
    Details: The Shadow Distance setting is not working correctly.
    Steps to Reproduce: See the text and screenshots below.
    User Specs:
    OS: Linux 4.17 unknown 64bit
    CPU: AMD Ryzen 7 1700 Eight-Core Processor (16) System RAM: 32157
    GPU: GeForce GTX 1070/PCIe/SSE2 GPU RAM: 8192
    SotA.Linux.64.819.Date.08.01.18
    Area: POT_island_metropolis_01_template/Mystic Isle
    Area Display Name: Mystic Isle
    Loc: (17.6, 89.0, -70.3)
    Debug: UE9UX2lzbGFuZF9tZXRyb3BvbGlzXzAxX3RlbXBsYXRlfE15c3RpYyBJc2xlfCgxNy41ODMsIDg5LjAwNCwgLTcwLjI3NCl8KDAsIDAuMDYsIDAsIDAuOTk4KXwtMTE0Mi44MjJ8MzQuMTkyNDF8OC42NDAwMDI=

    This is what shadows look like with the Shadow Distance setting set to Maximum:

    [​IMG]


    This is what shadows look like with the Shadow Distance setting set to Low:

    [​IMG]
     
  2. Chris

    Chris Tech Lord Moderator SOTA Developer Ambassador

    Messages:
    2,423
    Likes Received:
    27,449
    Trophy Points:
    190
    Gender:
    Male
    Yay, an excuse to talk tech stuff! :p

    This is a result of two things, one intentional and one a side effect. First, in Maximum we enable soft shadow edges. This smooths the edges of shadows to make them less hard which generally looks more realistic. While lights on computers are single points, in the real world the sun is not a point but a sphere. A single point light modeled would give hard edges but a sphere light would give soft edges. So that is the intentional part.

    The side effect part is due to us dramatically increasing shadow distances. For a direction light, like the sun, it generates a large buffer to capture the shadow. The more space you stretch that buffer over, the lower resolution it will end up being. For the higher quality settings, we increase the size of that buffer but even at max size it isn't enough to give equal resolution. We hide some of resolution degradation by using shadow cascades. These generate 2 or 4 different buffers and uses them at different distances to keep stuff close to the camera sharper. My guess is your camera in the top shot is just outside the cascade line and if you zoom the camera in a little closer and watch the shadow, you'll see a visual line of higher resolution shadow move towards your character.

    It is also there is a problem in the shadow state stuff that leaves it in a state with no cascades or small buffer when you toggle settings on your own. I'll investigate that option as that does look worse than I would expect.
     
  3. Barugon

    Barugon Avatar

    Messages:
    12,528
    Likes Received:
    19,715
    Trophy Points:
    153
    Gender:
    Male
    I actually don't mind soft shadows but, since the buffer is so low resolution, I can still see pixel swimming at the edges. Also, I would rather suffer with a bit lower frame-rate in town than completely lose shadows from local sources.
     
Thread Status:
Not open for further replies.