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

Bug 2022.2 URP Realtime GI Indirect Multiplier works in Editor but not on Android

Discussion in 'Global Illumination' started by gaiomed, Feb 14, 2023.

  1. gaiomed

    gaiomed

    Joined:
    May 5, 2013
    Posts:
    48
    Hi, as title says.

    The goal is: I want to create a dark scene that can be either light by a moving realtime light (flashlight) or by "turning the light on" (not moving light). BUT I do not want to use several lightmaps that are switched. Instead, I want to use Realtime GI and a single spotlight in a scene. The scene itself has almost not ambient light, so it is dark when I turn the realtime light off. When I turn it on, the realtime light should add only little direct intensity (like 0.5) and a lot of indirect intensity (like 16) to the realtime lightmap. As I understand, the realtime lightmap chunks under "Ligthing/Realtime Lightmaps" are created with Enlighten lightmapper, which I read will be retired/replaced by 2024.

    Result: This combination of realtime spotlight with indirect multiplier + Realtime GI works fine in the Editor and on an iPad, but not on Android (here: Galaxy A51s 5G). On Android, the indirect light is just not there, I only see the direct intensity changing the scene when turning on/off the light e.g. with a toggle.

    Project setup: Unity 2022.2 (and also 2021.x), URP with ARFoundation

    I found out that even in an empty project, the problem occurs as soon as I add URP. Even when I then remove URP, the problem remains until I delete the library folder and do a complete reimport.

    I also found out this issue is unrelated to:
    1. Graphics API (Vulkan/OpenGLES3)
    2. if there is a baked lightmap along the realtime lightmap or not (I have no baked/mixed lightsources)
    3. Any changes on texture compression formats or normal map encodings
    4. Building and/or generating lightmaps on Mac or Windows
    5. Any form of Builtin/URP Shader striping
    6. Directional/Non-Directional Mode
    7. Change Lighting Mode

    Steps to recreate:
    1. setup empty project in Unity 2022.2.6 (either on Mac M1 or Windows)
    2. create a scene with 2 cubes, mark them as static
    3. add 1 spot light, realtime, with indirect multiplier e.g. 30, and intensity low like 0.3
    4. open Lighting Settings, enable Realtime GI and bake
    5. now, if the spotlight is turned on/off, the indirect multiplier should brighten up the environment heavily
    6. build this to Android and notice that the setup works
    7. now add URP to the setup, do the setup (like linking the Universal Render Pipeline Asset in the Project Settings)
    8. do another build, notice on Android indirect lighting does not work any more

    Please help me - am I missing something here or is this a bug?

    About the screenshots:
    1. GI Editor On - correct result (Editor+iPad) when realtime light is ON
    2. GI Editor Off - correct result (Editor+iPad) when realtime light is OFF
    3. GI Android - wrong result when realtime light is ON (notice the entire indirect lighting part is missing)
     

    Attached Files:

  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Could you please report it? Light Transport team will take a look at it. Please include the link to this thread, too.
     
  3. MichaelHeiml82

    MichaelHeiml82

    Joined:
    Nov 2, 2009
    Posts:
    27
    kristijonas_unity likes this.