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

Unity5.1 - Shadows disappear after bake

Discussion in 'Global Illumination' started by DreamEnder, Jun 17, 2015.

  1. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    I have an outdoor scene with a single directional light set to Mixed and Hard Shadows.

    Before I bake the scene looks like this:

    BeforeBake.jpg

    After I bake:

    AfterBake.jpg

    My settings:

    LightmapSettings.jpg

    Why are the shadows disappearing?
     
  2. SpiriTx

    SpiriTx

    Graphics QA Unity Technologies

    Joined:
    Apr 12, 2012
    Posts:
    252
    gitlinjoss likes this.
  3. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    I tried setting the directional light to Baked and still got the same issue - shadows not showing up after baking.
     
  4. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    That issue you linked is not relevant. My scene is static and the static baked objects do not have shadows after baking, yet have shadows before.

    In Unity4x with Beast, the shadows you could see in the Scene view baked perfectly into the light map. Now I can't even get a scene to bake shadows.

    This issue is pushing back my release dates and affecting my business.
     
  5. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    I tried a new scene with just a static cube and plane.

    Before Baking:
    BeforeCube.jpg
    After:
    AfterCube.jpg
     
  6. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    Has anyone managed to light map their outdoor scenes?
     
  7. SpiriTx

    SpiriTx

    Graphics QA Unity Technologies

    Joined:
    Apr 12, 2012
    Posts:
    252
    For cube scene, that baked resolution is way too small. Something around 10 should make it look decent
    What size is your house in the first screenshot?

    To visualize what I mean please check out this screenshot, cubes being:
    10x, 5x, 1x, 0.5x Screen Shot 2015-06-18 at 16.36.05.png
     
  8. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    Thanks for the response. My house is size 10.

    I tried increasing the Baked Resolution to 10 and it took forever to bake. The results looked better but the size of the light maps was over 50mb!
     
  9. SpiriTx

    SpiriTx

    Graphics QA Unity Technologies

    Joined:
    Apr 12, 2012
    Posts:
    252
    Is it 10 meters or simply scaled to 10 sizes of original? Please compare to a cube which is 1 meter.

    Furthermore, it's more likely that you terrain is big, not the house itself, so you can use different resolutions for different objects using Lightmap parameters