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

Enlighten woes

Discussion in 'Unity Build Automation' started by idunlop_oefun, Mar 11, 2015.

  1. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    What are the best practices for using UCB with a scene that uses Enlighten?

    With continuous building on, there are no light map or cube map files to commit to my git repository.
    With manual baking on, the lightmapsnapshot.asset file can be very large (> 0.5GB). Committing this to a bitbucket repo isn't going to work long term. Ignoring this file (.gitignore) breaks the UCB build process in a subtle way - your scene is missing it's lighting (even though the light map / cube maps are present).

    Any help would be appreciated. Thanks!
     
  2. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    @David Berger Any comments? Seems like a major problem with UCB; unless I'm missing something obvious. I need some help here and the manual doesn't help.
     
  3. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    Baking in the cloud is currently not possible although we look into ways to support it. For now you will need to submit the files to your repository.
     
  4. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    @David Berger Which files specifically? Do you mean the LightmapSnapshot.asset is required?
     
  5. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    Yes, depending on features and Unity Version, e.g. for Unity 4 you need Lightmap images while in 5 you might want to check in:

    NavMesh.asset
    LightmapSnapshot.asset
    ReflectionProbe-0..n.exr
    SkyboxProbe-0..n.exr
     
    idunlop_oefun likes this.
  6. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
  7. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
  8. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    We still investigate this issue, is your behaviour comparable to the one I could reproduce (based on Case 683343)?

    Local build with baked lightmap:
    case_684145-LocalBuild.png
    UCB: realtime GI (the realtime shadow doesn't have the shadow from the stadium itself because this is a single-sided geometry.)
    case_684145-Cloudbuild.png

    Please let me know, maybe you already found a workaround in the meantime?
     
  9. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    Yes, issue is same as your screen shots. The only work around I have is to build locally (i.e. not use UCB).
     
  10. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    Can you check if you have turned on Continuous Baking in the Lighting options? It works properly for me if it is turned on as we do not trigger the Build function in UCB so it needs to use Continuous Baking.
     
  11. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    If continuous building is on the light maps are hidden in the library / cache. The only way to build with lighting intact is to turn it off and manually build the lighting. Then it puts the light maps etc. in a sub folder next to the scene name. How would I generate those light map files if continuous building is on?

    Are you suggesting a workflow of:

    - turn continuous baking off
    - manually build lighting
    - turn continuous baking on
    - commit to repo


    cc @Kuba FYI, this issue only arose when I turned off the realtime GI in the Lighting window. When that is on, the UCB build works fine when continuous baking is turned off.
     
  12. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    Yes, that's what I did. :D Will check that with someone of the team though if this is practical correct :rolleyes:.
     
  13. Kuba

    Kuba

    Unity Technologies

    Joined:
    Jan 13, 2009
    Posts:
    416
    No, please don't do that as this is the worst of both worlds:
    • you will get all the GI data in your Assets folder, since you built them manually when the continuous mode was off
    • they will get completely ignored when continuous mode is turned on and the scene is built/loaded
    We might change that last behaviour, so that the GI data from the Assets folder is used if it exists when the continuous mode is on. However, that will only help you locally -- you'll be able to see lighting that was correct at some point until the continuous mode catches up.
    It won't help you at all in UCB -- here you need to decide whether you provide the GI data yourself (manual build in non-continuous mode) or if UCB should take care of that (automatic build in continuous mode).

    Ok, this is exactly the info that I was looking for. We'll try that against the project you submitted in case 683343. Thanks!
     
    David-Berger likes this.
  14. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    @idunlop_oefun does this answer all your questions? Does it work as expected? If not please clarify what you do, what you get and what you actually expect.
     
  15. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    @David Berger @Kuba Ok, so it appears as if it now works properly (i.e. what I would expect). Clearly something got fixed / updated recently. I can now build lighting manually without the precomputed GI and the UCB build is correctly lit at runtime. So, thanks! Would sure be nice to know when something gets fixed.

    To answer your question; Kuba's post did not actually answer anything. I already knew the "suggested" workflow was a hack / workaround at best and was not attempting to use it. Additionally you had confirmed the issue in your post #8 (above), which is the information Kuba was seeking (i.e. how to repo).
     
  16. Kuba

    Kuba

    Unity Technologies

    Joined:
    Jan 13, 2009
    Posts:
    416
    Hey Ian,

    I poked back in the FogBugz case I created for this issue, but as I understand it currently everything works as expected for you.
    @David Berger can you still reproduce it? If so, please provide the info in case 689037, thanks!
     
  17. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    We tweaked the workflow a little bit which hopefully resolved some problems. @Kuba I can not reproduce it anymore!