Search Unity

No shadows in shadowmask mode

Discussion in 'Global Illumination' started by reggie_sgs, Feb 20, 2020.

  1. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    I've been using Distance Shadowmask without an issue but when I try to use shadowmask, the shadows disappear in my scene on 2017.4.29F1. I can toggle between the two settings at runtime and the shadows appear/disappear. Dynamic objects cast shadows fine but the baked shadows of static objects onto other static objects are missing.

    According to the docs, static objects should have shadows from the shadowmask regardless of the distance but in a test scene using Shadowmask, I'm finding that the shadow distance affects even static shadows with Shadowmask. Outside the shadow distance, the shadows disappear from static onto static objects.

    In the test scene, it's acting as if Shadowmask mode is actually using Distance Shadowmask but the shadowmask is missing and only the shadowmap is valid. I'm sure that's not the case but just what it appears to be doing.

    Any ideas what could be going wrong here?
     
  2. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    could be bug as using 2017x, this is known issue, maybe try update
     
  3. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    A known bug in all versions of 2017? We're not able to update beyond 2017 at this point as we're too close to release.
     
  4. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    Not sure and not want to give wrong advice so await unity team offical answer
     
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Without a case number it will be hard to guess, and Unity staff will not be able be sure either. Need more information.

    Are your lights set to mixed mode? because if you are using shadowmask, you need them to be + to bake them.
     
  6. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Ok I think I figured out what's happening. Part of it was my not understanding the difference between a shadow map and a shadow mask. When switching to shadowmask mode, the shadows from the shadow map are gone and the much lower resolution shadowmask shadows are shown. In my scene which is very large, the shadowmask shadows were practically non existent due to the lightmap resolution which was optimized down for just the GI.

    I was able to duplicate this in the test scene by lowering the lightmap resolution way down to the point the shadowmask shadows were practically gone. It looks like shadowmask mode is just not suited for the type of scene I have but now that I understand what's going on, I can better adjust things.

    Thanks again for the info.