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

Broken (missing) scene lighting?

Discussion in 'Unity Build Automation' started by gjf, Aug 3, 2021.

  1. gjf

    gjf

    Joined:
    Feb 8, 2012
    Posts:
    53
    Far too often, on multiple projects, the Android (for Oculus Quest) builds created by UCB are broken with regard to the scene lighting. They often appear far too dark - almost as if the baked lighting isn't included, even though the logs show it being imported during the build process. Local builds do not exhibit this issue.

    There's a mix of OpenGLES3 and Vulkan across the projects, so it doesn't appear to be specific to Vulkan, which I first suspected. I believe that most use Linear color space and sRGB.

    Automatic lightmap baking is disabled. UCB configs are set to use the latest 2019.x for all current projects, although UCB sometimes lags by a version (or two) - we're currently on the same 2019.4.29f1.

    Any thoughts on where to look to figure out why it's happening, and any potential fix? What's a 'typical' setup?

    Thanks in advance,
    g.
     
    Last edited: Aug 4, 2021
  2. jmassey-tkg

    jmassey-tkg

    Joined:
    Mar 11, 2020
    Posts:
    7
    I'm currently also experiencing an issue like this. My team is on unity 2020.8.3f1 and the baked lighting works consistently everywhere except the mobile builds coming from UCB. The dynamic scene objects' shadows are far too dark, as if realtime indirect baked lighting isn't being applied. I want to say that the cause is that we're using additive scene loading and manually setting lightmap textures in between loads, but the fact that the realtime lighting works when I build locally with my macbook does seem to indicate the problem is at least partially happening within Cloud Build.
     
    gjf likes this.
  3. gjf

    gjf

    Joined:
    Feb 8, 2012
    Posts:
    53
  4. jmassey-tkg

    jmassey-tkg

    Joined:
    Mar 11, 2020
    Posts:
    7
    Hey @gjf, if you're still working on this. I recently made a few changes to my project and the lighting seems to be working, at least for now. I'm not sure which one did the trick.
    • Upgraded the editor from 2020.3.8f1 to 2020.3.15f2
    • Changed light baking mode from Shadowmask to Baked Indirect
    • Performed a light bake on my main/persistent scene. In hindsight I should have done this from the beginning, but since my main scene is entirely overlay UI and has no 3d I didn't think it was necessary.
    Good luck with your project!
     
    gjf likes this.
  5. gjf

    gjf

    Joined:
    Feb 8, 2012
    Posts:
    53
    Thanks, much appreciated. I'll give it a try and let you know how it works out.
     
    Last edited: Aug 17, 2021
  6. gjf

    gjf

    Joined:
    Feb 8, 2012
    Posts:
    53
    Sadly, the same issues for me...
     
  7. rajivrao

    rajivrao

    Unity Technologies

    Joined:
    Feb 19, 2019
    Posts:
    111
    Sorry for the delayed response. Have you submitted a support ticket? I can ping the team to take a look at that once you've submitted.

    The original post indicated this happened for an Oculus project -- assuming you are not doing a mobile build for a VR headset but for a mobile end device?
     
  8. gjf

    gjf

    Joined:
    Feb 8, 2012
    Posts:
    53
    @rajivrao Thanks for the reply.

    I haven't submitted a support ticket because I haven't had time to create a sample project showing just the issue, rather than needing to share the entire project.

    The build is for the Oculus Quest/2, so it's very much a VR headset! Cloud builds work with the exception of the lighting issue. From your comment about the device, is UCB not recommended for VR headsets?

    Thanks in advance,
    g.
     
  9. rajivrao

    rajivrao

    Unity Technologies

    Joined:
    Feb 19, 2019
    Posts:
    111
    We're working on VR support at the moment but UCB isn't optimized for VR quite yet unfortunately. If you can get it to work without our support since it's Android-based that's awesome (but sounds like there are still some bumps in the road).

    Will keep you up to date as we get dedicated support for Oculus.
     
  10. gjf

    gjf

    Joined:
    Feb 8, 2012
    Posts:
    53
    Thanks; it seems to be just the lighting that's messed up, so hopefully not a million miles away...
     
  11. bpj_mdt

    bpj_mdt

    Joined:
    May 17, 2021
    Posts:
    8
    Hi @rajivrao

    Are you able to provide a broad timeline for this fix, or perhaps a temporary workaround besides building locally? Cloud Build would be an incredibly important service for us to leverage and since we've already paid for a license that does expire after a specific date, it would be helpful to know when it becomes a viable option (whether that's in the near future or distant).

    I seem to have tried changing just about every suggested rendering & lighting option I can find, but nothing has done the trick yet.

    Thanks!
     
  12. rajivrao

    rajivrao

    Unity Technologies

    Joined:
    Feb 19, 2019
    Posts:
    111
    No immediate timeline, unfortunately. Can make sure to update you as soon as we do (hoping Q1/2 of next year).

    Otherwise for workarounds, suggest submitting a support ticket. If you haven't already submitted, perhaps ask in the ticket if you can share the entire project instead of just a sample?