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
  4. Dismiss Notice

Unity 5: "Use Light Probes" Checkbox greyed out

Discussion in 'Editor & General Support' started by essimoon2, Mar 18, 2015.

  1. essimoon2

    essimoon2

    Joined:
    Nov 13, 2013
    Posts:
    195
    Hi everyone,

    I recently converted our Unity 4 project to Unity 5 to try the new lightmapping with Enlighten. Nw I noticed all of the objects in the scene suddenly use light probes and the "use light probes" checkbox of each mesh renderer seems to be grayed out.

    Any idea why that is and if I can get rid of it / turn off light probe use?
     

    Attached Files:

  2. Aurore

    Aurore

    Director of Real-Time Learning Unity Technologies

    Joined:
    Aug 1, 2012
    Posts:
    3,106
    Is your object set to static? If it is, then it won't use light probes. You can individually set what you want to be static by click the little arrow next to the option, so if you want it to use light probe, untick "lightmapping static". http://docs.unity3d.com/Manual/StaticObjects.html
     
    TerryScrimsher and essimoon2 like this.
  3. essimoon2

    essimoon2

    Joined:
    Nov 13, 2013
    Posts:
    195
    Oh I see, thank you for the explanation and the fast reply. The object in my attached image is indeed set static.
    I was just a bit confused that despite the checkbox being greyed out it was checked, so I thought it was kind of "on, but it's impossible to turn it off". Also, the object seems to have it's own light probe in its center in the editor window which I'd only expect from objects that actually do receive light probe information (see above screenshot).
     
  4. Aurore

    Aurore

    Director of Real-Time Learning Unity Technologies

    Joined:
    Aug 1, 2012
    Posts:
    3,106
    Yeah, I can see why that would be confusing. Even if that's ticked and greyed out it's not using light probes.


    How does it appear in the hierarchy?
     
  5. HelloGalaxy

    HelloGalaxy

    Joined:
    May 21, 2015
    Posts:
    4
    So how about this, the same thing, one is available, another is grey out....All is static object. But it makes me confusion... :(

    1.png

    2.png
     
  6. peteorstrike

    peteorstrike

    Unity Technologies

    Joined:
    Oct 4, 2013
    Posts:
    116
    Hello!

    So it's likely that what's happening here is that, even though you've marked your object in the second image as Lightmap Static, until Enlighten actually builds your scene (and captures the data for this particular object) it's still technically a dynamic object and can make use of Light Probes like any other non-static object. If you have 'Auto' checked on you'll rarely notice this, as the scene will rebuild automatically any time you check on or off the Static flag, and it'll enable or disable the Use Light Probes option as appropriate.

    The simple fix for this is to either work with 'Auto' turned on or to hit Build in the Lighting tab and any static objects that still have a clickable Use Light Probes field will be greyed out as soon as Enlighten has captured their lighting data and made them fully static.
     
  7. popMark

    popMark

    Joined:
    Apr 14, 2013
    Posts:
    114
    Is this really necessary? I have some objects that are too fiddly for lightmaps, I have them casting shadows in the lightmaps by having them lightmap static and setting their scale in lightmap to zero, but I would like the objects themselves to use lightprobes. This seems like an artificial restriction.
     
    Kragh likes this.
  8. Kragh

    Kragh

    Joined:
    Jan 22, 2008
    Posts:
    656
    What popMark said.
    Don't be too clever while doing these fancy systems. I want to do whatever I like in this editor, that is what I fell in love with. Ease of use, open sandbox, go nuts!!!
    If I want to both have an object lightmapped and affected by lightprobes for whatever creative reason, I don't see why I can't. :) Please bring back the old Unity, where I felt free and god like... I can't even modify the "LightmapSnapshot" asset, or the lightmap array anymore. And you hide away so much shader functionality under macros and global defines, I'm having a hard time getting an overview.
    Please... PRETTY please, don't hide stuff in black boxes!
    Every new little feature you put in, you try and wrap it up so good, that we have no idea what goes on under the hood.
     
    mowax74 and hippocoder like this.
  9. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Have to agree here, it would be nice for unity to embrace advanced settings, for example a tickbox which enables advanced tweakery. So people who aren't clued up and just want thinks to work the unity way are happy, and those of us who like to dig in and tweak are also happy. You can do both.
     
    the_motionblur likes this.
  10. Shinugami

    Shinugami

    Joined:
    Oct 17, 2012
    Posts:
    54
    I had this problem. To overcome the problem I cleared my baked data and this re-enable the button / removed the greyed out state of the button. An inactive/disabled object will not be affected as it is not calculated by the light-mapping and that's why some objects will be greyed and others are not.

    I'm assuming what is happening is that after light-mapping has calculated an object, depending on your settings it greys out the light probe button. To test this I cleared the baked data and then watched the light probes button get switched to off/grey as the lighting was computed.

    Don't know if this is a helpful reply but it identifies "what?" is greying out the button. The next question is "why?" and this comes down to settings perhaps.
     
    mowax74 likes this.
  11. davidguaita

    davidguaita

    Joined:
    Apr 20, 2013
    Posts:
    6
    I'm having the same problem. I want my background objects to use LightMapping AND and to be affected by LightProbes at the same time.
    My Unity version is 5.6. Anybody has a tweak or workaround for this?
     
  12. cyuxi

    cyuxi

    Joined:
    Apr 21, 2014
    Posts:
    49
    Just wondering, is it still not possible to Disable/Enable the Lightprobe or Changing the lighting Data at runtime? I'm currently using 2017.2.

    I have tested the lightmapswitching, which is simply working, however, I used a mixed light to do the bake in order to have only player lit and shadowed, and according to night environment effect, I baked few pointlights with lightprobes, and here the Lightprobes came up to be the tricky one, which I just can't neither found its data entity nor a disable function anywhere via script at runtime.

    I have attached my Test scene, which would be perfect if the lightprobe is run-time changeable.
    NightWithLightProbes_Good.jpg
    Day_StillHaveProbes_Bad.jpg as you can see the lightprobes are polluting the dynamic objects.


    **************** UPDATE **************
    Actually I've just found a way to improvise.
    which just simply set the "Light Probes" property on the mesh renderer from Blend Probes to OFF.
    and then use the Ambient color to control the color tint.
    I've attached the package as result.
     

    Attached Files:

    Last edited: Mar 9, 2018
  13. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,120
    This is kind of an old topic, but I ran into this today, and this post came up in the search for "unity meshrenderer light probes disabled". So I'm posting this in case it helps anyone else.

    In my case, the renderer in question wasn't marked at Lightmap Static. However, it had been marked as lightmap static at some previous time. In order to get the dropdown to become active again, I simply had to bake lighting again after having unchecked Lightmap Static. So, simply unchecking Lightmap Static wasn't enough; I had to rebake lighting.
     
    SimRuJ likes this.
  14. Ignacii

    Ignacii

    Joined:
    May 23, 2013
    Posts:
    91
    My solution was to duplicate and delete problematic objects. In duplicated objects Light Probes becomes selectable. Much faster than rebaking :) Unity 2019.4
     
  15. mowax74

    mowax74

    Joined:
    Mar 3, 2015
    Posts:
    94
    But this only works when you have separate objects/prefabs. In my case, i have an object imported with multi materials/meshes. On some of them it's not possible to set lighting to light probes, it's greyed out. I can't import the whole model again, that's just a mess with reassigning everything.
     
  16. Ignacii

    Ignacii

    Joined:
    May 23, 2013
    Posts:
    91
    Hi,

    Just duplicate parent and everything will stay the same.
     
  17. mowax74

    mowax74

    Joined:
    Mar 3, 2015
    Posts:
    94
    No, it will not - in our case, since some of the sub gameObjects in the Prefab have script assignments or some of the sub gameObjects are assigned to attributes of other scripts outside that hierarchy in the inspector. It's not always that easy to just copy a parent, delete the old one and move on.
     
  18. Ignacii

    Ignacii

    Joined:
    May 23, 2013
    Posts:
    91
    I don't know, maybe it can be difficult. I am coding with Bolt only, so I don't know many traditional coding stuff.

    But for me it seems it's that easy as child names, components and everything stays identical in the duplicated version. So it's hard to believe that some problem could happen.

    It's basically the same as instantiating a prefab—all scripts and script connections doesn't go anywhere.
    I use Bolt scripts on parents and children with references to many other objects as variables and can delete and duplicate as many times as I want and nothing would go wrong.
    Maybe you're doing something more complicated that I don't understand, idk, or maybe you're doing something wrong or overly complicated
     
  19. mowax74

    mowax74

    Joined:
    Mar 3, 2015
    Posts:
    94
    But only references that THIS object that you instantiate use. But when a sub object of this object is referenced SOMEWHERE ELSE, of course, the reference stays to the old object. When you delete it, you get a "missing" entry. Then you can by hand set the references to the instantiated object. For me, that is not even close to a workaround.

    But the main point is: this bug drives me crazy since many years, and it's not getting fixed at all.

    The workaround for me meanwhile is: i do not create a prefab from the bigger objects with a hierarchy (mostly building models) that i import anymore. I just drop it in the scene and every change i do to this model in maya is immidiately updated - other then when i create a prefab first. So i can just rename a sub object that i can't set to use light probes in maya and voila - then magically it works, because unity thinks it's a different sub object. But the only thing that is changed is the name.
     
  20. Ignacii

    Ignacii

    Joined:
    May 23, 2013
    Posts:
    91
    For me it's not an issue since I make reference vars at start using
    GameObject.Find. So when I duplicate, the children names stay the same and outside references work flawlessly too.

    Glad you found a workaround
     
  21. mowax74

    mowax74

    Joined:
    Mar 3, 2015
    Posts:
    94
    I try to create references also from code when possible. However, in this cases the references are set in the inspector, since this belongs to content, that will be delivered per asset bundles and the customers don't get a new build for every changed or added new content.