Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Baked Shadow Issue

Discussion in 'Editor & General Support' started by Numonic, May 30, 2012.

  1. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Hello everyone I'm currently working for a company working on a project that is under strict NDA.
    Needless to say the file has nicely baked lighting and shows. But when the programmer had the controls added to the light to shut off with a float value on and off it acts a little strangely. I asked the programmer he was still investigating a way around this but said it was causing all the other lights to turn on and off.

    Has anyone ever run into this issue and resolved it?

    Thanks
     
  2. Glockenbeat

    Glockenbeat

    Joined:
    Apr 24, 2012
    Posts:
    669
    You are turning a light on and off with a float? Wouldn't a boolean fit better? Nevertheless, without a single line of code this is a bit hard to solve. I guess you'll need to give some more details, like what type of light, what values you change, maybe (parts of) the code which is used for this - no worries, this will surely not give anyone a "big picture" of your project so I assume this would be ok (maybe ask your boss for approval).
     
  3. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    I personally didn't code the scene but I did add a spot light and a point light in the scene. But I'll let my boss know if I can release some info about the internal components of the project.
     
  4. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Programmer wrote

    " Naturally I used a float to control the intensity of the light, because a boolean only has values of true and false. If the problem was the type of variable that I used, then it would not have been solved by removing the lightmaps. The problem manifested before any code had been written, while I was using the editor to manually change the intensity levels on the light object to see where they should be set for the dimmer."
     
  5. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Can we get a definition of 'strangely'?

    There is some interaction between lightmaps and lights, depending on the lightmap type and render path though that differs pretty massively so we need precise informations here to be able to give you an answer
     
  6. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Programmer wrote "The problem we encountered is that with lightmaps in the scene, if you change the intensity of any of the lights, the other lights react in ways that cause problems. For example, raising and lowering the light in the auditorium experience caused all the other lights to turn on or off. When the intensity on the dimmer went above the intensity another light, that light would turn completely off. The only way I could solve this problem was to remove the lightmapping completely."
     
  7. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
    Check what Quality Level you're set at, and the number of permitted pixel lights at that quality level.
     
  8. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    ]These are the specs I have for the scene for baked maps and light settings concerning the scene.
    From here the file was handed over to the programmer, he says it's not a programming issue and that its a issue with the scene.

    LightMap Settings

    Bake

    Dual lightmaps- use in forward rend.
    Quality is on high
    Ambient Occlusion 1
    Max distance 0.1
    contrast 1
    Lockatlas off

    Resolution 3000
    _________________________________________________________________________
    Point light settings

    Range 2.4

    Shadow Type no shadows
    intensity is 1.5


    Pointlight

    Range 4
    Spot Angle 26.9
    Cookie Has spotlight cookie
    Shadow Type Hard Shadows
     
    Last edited: May 31, 2012
  9. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
    No, that's the lightmap settings. The quality settings are found in Edit->Project Settings->Quality.
     
  10. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Yes, as Superpig pointed out, this sounds like an issue with the number of allowed simultaneous pixel lights in the scene which can be increased in the Quality Settings.
     
  11. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Everything is at default settings

    Default StandAlone Quality Good
    Default Web Quality Good
    Default Mobile Quality Simple
    Editor Quality Good
     
  12. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
  13. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    The projects are based mainly for ipad 2nd gen and ipad 3rd gen. As well as iphones I believe.
     
  14. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    You need to change the pixel light count in these settings.

     
  15. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    I'm wondering why would this affect the scene if it is left at default. The default settings look ok for me.
     
  16. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Thanks will try that out.
     
  17. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Because the default is 2 pixel lights and if you increase the intensity of a light and have more than 2 pixel lights in the scene it can potentially affect other lights in the scene (essentially turn them off).
     
  18. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    aNTeNNA trEE

    Well on my end I've checked those settings and they are in play I have now sent those specs over to the programmer and see if he has those.
     
  19. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
  20. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Thanks will pass this along, thanks for the help really helping me narrow out the issue.