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

Disabling Enlighten?

Discussion in 'Global Illumination' started by mh114, Nov 5, 2015.

  1. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    295
    I suppose it's not possible, but asking anyway: is there any way of disabling Enlighten? I'm doing a mostly 2D Android/iOS game that doesn't need GI nor lightmaps for that matter. Yet there is still the Enlighten worker thread spawned. While testing on iPad, I noticed in the xCode CPU view that the Enlighten thread does stuff even though I'm not using any of it. Seems it depends on scene, but I didn't figure out why it's more active in some scenes than in others. (I actually had forgotten some "Clear to skybox" cameras in some menu scenes instead of "Clear to solid color", but that was not the cause of the extra Enlighten activity.)

    Anyway, it should be possible to disable Enlighten if one does not use it. The worker thread is probably not sucking too much CPU time, but on mobile devices any unneeded background activity is not a good thing IMHO.
     
    solkar likes this.
  2. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Hi! We have a bug in our database regarding the idle Enlighten worker thread. We are aware of the problem but no ETA for a fix yet...
     
    mh114 likes this.
  3. Brian-Kehrer

    Brian-Kehrer

    Joined:
    Nov 7, 2006
    Posts:
    411
    Yeah - EnlightenRuntimeManager.PostUpdate...
    ReflectionProbes.
    I'm writing custom shaders, and it's getting harder and harder to disable all these 'features'
     
  4. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    295
    Good to know it's a known problem! Still, I'd like a way to just completely disable Enlighten if it's not needed. Or perhaps you could automatically infer if it's not used from the built scenes and disable when building the player. Food for thought. :)
     
  5. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    241
    Also wondering why it's even enabled if running with -nographics on dedicated servers. Got reports of big servers with 56 cores having 14 worker threads for Enlighten per game instance. How do we disable that stuff for dedis?
     
    mh114 likes this.
  6. Miguel-Ferreira

    Miguel-Ferreira

    Joined:
    May 8, 2015
    Posts:
    90
    Any news about this? Enlighten is taking 300ms on the main thread in my 2d game without any kind of lightning
     

    Attached Files:

    shkar-noori, mh114 and bluescrn like this.
  7. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    295
    Hi, is there any news on this? I'm not seeing Enlighten worker thread on iPad Air with 5.3.2, was something done about it? I think I saw the worker thread being spawned on Android while testing earlier today, but I don't recall if that APK was built with 5.2.4 or 5.3.2..
     
  8. thefranke

    thefranke

    Unity Technologies

    Joined:
    Jun 20, 2015
    Posts:
    153
    Hello everyone,

    the worker thread should not appear after 5.2.4.

    Cheers
     
    mh114 likes this.
  9. daklab

    daklab

    Joined:
    Nov 24, 2013
    Posts:
    27
    I'm still seeing it in in 5.3.0f4. Is this supposed to be automatically removed or is it our responsibility to ensure that nothing in our Scene is accidentally trying to use lighting when we don't intend to? If the latter is the case, is there a checklist that we can go through to "remove" all the lighting related stuff Unity tries to "help" us with? I feel as though I have, but I'm obviously missing something since the Enlighten thread is still spawning.

    upload_2016-2-14_8-32-59.png
     
  10. funshark

    funshark

    Joined:
    Mar 24, 2009
    Posts:
    225
    daklab : 5.3.0 is an old version
     
  11. thefranke

    thefranke

    Unity Technologies

    Joined:
    Jun 20, 2015
    Posts:
    153
    daklab, does the worker thread consume any processing power? If yes than I have to investigate if something else is missing.
     
  12. daklab

    daklab

    Joined:
    Nov 24, 2013
    Posts:
    27
    The image showing the "Setting up 1 worker threads for Enlighten" was on Android via Android Studio's logcat. I'm not sure how to determine if it is consuming any processing power. How would I do that?

    I ran locally on my Windows machine too, but I'm unable to find any thing with "Enlighten" when I try to search in the profiler. How would I best confirm whether or not the spawned worker thread is consuming any processing power?
     
  13. daklab

    daklab

    Joined:
    Nov 24, 2013
    Posts:
    27
    @thefranke Also, is there a checklist that we can go through to "remove" all the lighting related stuff Unity tries to "help" us with?

    I'm not complaining that Unity does this, but there are certain applications/games that warrant a "clean slate".
     
    Last edited: Feb 16, 2016
  14. bfoddy

    bfoddy

    Joined:
    Mar 27, 2012
    Posts:
    85
    This problem is back in 2020.3
     
  15. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    Did it ever go away?
     
    mh114 likes this.
  16. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
  17. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    Is the GI profiler exclusively for Enlighten?

    Total CPU: 0.14ms
    Light Probe: 0.00ms
    Setup: 0.00ms
    Environment: 0.00ms
    Input Lighting: 0.12ms
    Systems: 0.00ms
    Solve Tasks: 0.01ms
    Dynamic Objects: 0.01ms
    Time Between Updates: 3.79ms
    Other Commands: 0.00ms
    Blocked Command Write: 0.00ms
    Blocked Buffer Writes: 0
    Total Light Probes: 0
    Solved Light Probes: 0
    Probe Sets: 0
    Systems: 0
    Pending Material GPU Renders: 0
    Pending Material Updates: 0

    These should be all 0 then, since I'm not using Enlighten in any capacity.
     
  18. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    For a project that doesn't use Enlighten at all, this doesn't look quite enough like 0 to me.

    upload_2021-4-12_12-54-17.png
     
    mh114 likes this.
  19. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,431
    yes. At least currently.

    In 2021.1 (or 2? not 100% sure right now) It's been fixed to only show data if enlighten was on. In the Editor, there are some minor idle bits that are still running in a background thread. The "Total CPU" category on the chart was also removed because it summed up all other categories, basically making things in the stacked chart look twice as bad as they are.
     
    AcidArrow likes this.