Search Unity

Overlapping/strange looking Shadows

Discussion in 'Global Illumination' started by Nomiis, Aug 12, 2019.

  1. Nomiis

    Nomiis

    Joined:
    Aug 2, 2019
    Posts:
    5
    I am incredibly confused. I have been trying to find a solution for the past 2 days, and I cannot for the life of me figure out how to fix this issue.

    In the picture below you can see the shadow of an object in my scene. And as you can see, it's not very pretty. I think I have an idea of what's causing this, but I have absolutely no clue how to fix it.

    What I think is happening, is that because I have multiple light sources from different places in the room it keeps overlaying those shadows, and because of their different positions relative to the object, it creates the weird outline. Which makes sense, however, it looks awful. This happens to all object that has multiple lights shining on them by the way.

    What I have tried to do: Setting shadows to Hard, that does remove the layering effect, but the edges get super jagged and pixelated. Altered with pretty much all light and shadow settings I could find. Lowering the shadow strength on all lights in the room, if set to around .25 it looks decent on that object, but is way too light for other parts of the scene. Plus the light bleeds through walls when it's not set to 1.0, which will ruin other parts of my project. And a few other things, but I don't remember what exactly.

    The only thing I haven't tried is baking lightmaps instead of using realtime lights, but Unity estimated 8+ hours to bake my scene, and my scene isn't even that big, so that's not really something I want to do until I'm completely done with my scene, which I'm currently not. And I would prefer to avoid doing at all since it'll seemingly take days upon days to lightmap my whole game once I'm done with it. But from my understanding baked lights is just overlayed images of the shadows, to increase performance over realtime shadows, so I can't really see how that would fix it anyways.

     
    ROBYER1 likes this.
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    The effect you are seeing (multiple shadow penumbras) here is intentional, given the fact that you have multiple shadow casting lights. The easiest way to mitigate this would be to disable shadow casting for the lights which are casting unwanted shadows.
    Alternatively, you could switch to baked lights and then try adjusting baked shadow angle to smoothen the shadows. However, if the lighting calculations are taking long in your scene, you'd first need to optimize your scene and lighting setup to speed up the baking process.