Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

DIrectionnal light not baking shadows

Discussion in 'Global Illumination' started by zenGarden, Nov 10, 2015.

  1. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Hello,


    I have one directionnal light with shadow mode = baked
    When i click on bake , the shadows are not baked and i have floor and objects marked as "static", it is a bug ?
     
  2. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    It should work. It is very hard to say with so little information about your problem. Please supply some more details. Thanks!
     
  3. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    The documentation i found is dealing with the old system not Unity 5
    http://docs.unity3d.com/Manual/LightmapParameters.html
    http://docs.unity3d.com/460/Documentation/Manual/LightmappingInDepth.html

    This is Lightmapping settings


    Below on left this is directionnal light in baked mode , on the right the directionnal light is in mixed mode


    The soft shadows of the static objects are not baked, they don't stay if i turn the directionnal light off.
    Is there any step by step tutorial ?

    I use Unity 5.2.0f3.
     
  4. Xanthius

    Xanthius

    Joined:
    Aug 20, 2012
    Posts:
    28
    Check your Shadow Distance in the Quality Tab. I am not sure if it affects Baked Shadows. Try increasing it substantially and seeing if that helps.
     
  5. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I tried , but this does not change anything.
    Also this is really strange the generated lightmap resolution is 128*128 while i put 1024 on lightening settings.

    I downloaded Unity tank demo and baked lightmaps and it worked, perhaps something is wrong in my level.
     
  6. Xanthius

    Xanthius

    Joined:
    Aug 20, 2012
    Posts:
    28
    You're baked Resolution is really low. What is in your Quality Settings?
     
  7. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    The last lightmap will be smaller than max atlas size, if you are not using all of the available space. This is done to conserve memory and will not affect the output or quality.
     
    zenGarden likes this.
  8. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
  9. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,019
    Your Baked Resolution is too low.
     
  10. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    The issue is with 1024 there is any shadow baked visible.

    I have done a new test, the baking with a directionnal light in mixed mode seems to work, but on the floor none of the baked pillars shadows or fly jet are visible ? How to make lightmap display ? it is a bug perhaps ?
     
  11. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,019
    I didn't mean atlas size, I meant the Baked Resolution.

    Don't use mixed, use baked mode.