Baked Shadow Issue

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

  1. Numonic

    Numonic

    Member

    Joined:
    Mar 22, 2009
    Messages:
    203
    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

    Member

    Joined:
    Apr 24, 2012
    Messages:
    614
    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

    Member

    Joined:
    Mar 22, 2009
    Messages:
    203
    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

    Member

    Joined:
    Mar 22, 2009
    Messages:
    203
    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

    Member

    Joined:
    Apr 5, 2008
    Messages:
    26,589
    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

    Member

    Joined:
    Mar 22, 2009
    Messages:
    203
    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

    Insert bacon, receive bugfix Unity Technologies

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

    Numonic

    Member

    Joined:
    Mar 22, 2009
    Messages:
    203
    ]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

    Insert bacon, receive bugfix Unity Technologies

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

    antenna tree

    Moderator

    Joined:
    Oct 30, 2005
    Messages:
    5,300
    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

    Member

    Joined:
    Mar 22, 2009
    Messages:
    203
    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

    Moderator

    Joined:
    Oct 30, 2005
    Messages:
    5,300
  13. Numonic

    Numonic

    Member

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

    antenna tree

    Moderator

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

    [​IMG]
     
  15. Numonic

    Numonic

    Member

    Joined:
    Mar 22, 2009
    Messages:
    203
    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

    Member

    Joined:
    Mar 22, 2009
    Messages:
    203
    Thanks will try that out.
     
  17. antenna tree

    antenna tree

    Moderator

    Joined:
    Oct 30, 2005
    Messages:
    5,300
    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

    Member

    Joined:
    Mar 22, 2009
    Messages:
    203
    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

    Insert bacon, receive bugfix Unity Technologies

    Joined:
    Jan 16, 2011
    Messages:
    2,594
  20. Numonic

    Numonic

    Member

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