Search Unity

Why are my "baked" point lights still producing realtime lighting?

Discussion in 'Global Illumination' started by DaVeF101, Aug 31, 2015.

  1. DaVeF101

    DaVeF101

    Joined:
    Sep 7, 2014
    Posts:
    134
    I have a scene with over 50 points lights, all set to baked and one directional light for shadows.

    If i bake the scene and run the game I get a huge drop in frame rate.. if I disable all the point lights the game runs at 100fps, but the scene is then only lit by the one directional light and is of course really dark! Am I missing something here?

    I assumed that all light from the point lights would be baked and therefor they wouldn't actually do anything at runtime.. isn't that the idea???

    Any advise or help would be great!
     
    Last edited: Aug 31, 2015
  2. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Please add a screenshot of your settings in the lighting window and from the inspector for one of your point lights. Thanks!
     
  3. DaVeF101

    DaVeF101

    Joined:
    Sep 7, 2014
    Posts:
    134
    screen shots attached.
     

    Attached Files:

  4. Hjeldnes

    Hjeldnes

    Joined:
    Jul 22, 2012
    Posts:
    116
    Well, maybe its culling related? I've seen that the light culling is quite costly even for lights that are set to baked. I would think they should be just disabled, but they are not.
    On mobile I could get up to 4ms permance hit on baked light culling. (So I disable them manually before build).
     
  5. echo4papa

    echo4papa

    Joined:
    Mar 26, 2015
    Posts:
    158
    There are no light maps baked, so there is no baked info. Do you have any geometry marked as static?
     
  6. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    Temp fix: turn real time light bounce intensity down to zero.
     
  7. DaVeF101

    DaVeF101

    Joined:
    Sep 7, 2014
    Posts:
    134
    Yes, everything is marked as lightmapped static, I had just cleared the bake data before that screen shot to re-bake the screen.
     
  8. DaVeF101

    DaVeF101

    Joined:
    Sep 7, 2014
    Posts:
    134
    'Compositing' job failed with error code: 6 ('Failed writing or importing the composited texture file.').

    Failed writing to: '/Users/../Library/Caches/com.unity3d.UnityEditor/GiCache/c3/c36f44c75a3be602cbc61eaef6e0fee7._comp_light.exr.tmp'.

    I'm getting 999+ errors now in the console??
     
  9. echo4papa

    echo4papa

    Joined:
    Mar 26, 2015
    Posts:
    158
    Kill your library and let the project re-import maybe? Also kill your lightmap cache.

    May want to try just closing and re-opening Unity first.
     
  10. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Perhaps you ran out of disk space since writing a file suddenly fails. If this is not the case, please file a bug report.
     
  11. o_64xp

    o_64xp

    Joined:
    Jun 13, 2019
    Posts:
    3
    Came across this still in unity 2020.2.2, just in case anyone has this problem in the future, set the Culling Mask of your lights to Nothing.

    This way, they will not contribute to real-time lighting, but will contribute to baked lighting.