Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Question Problems with Banding and AO (URP - Oculus Quest game)

Discussion in 'General Graphics' started by Mumphy, Sep 8, 2020.

  1. Mumphy

    Mumphy

    Joined:
    Jun 23, 2020
    Posts:
    18
    Hello!

    I'm designing a VR experience together with a couple of friends for the Oculus Quest using the URP in Unity. I've created some models in Blender and imported the .blend files into my Unity scene (they are UV-mapped and I have also generated Lightmap UVs for them in Unity). Unity version is: 2019.4.9f1.

    1. There's quite pronounced banding in play mode (see image). Is this actually how it is supposed to be or am I missing something here? It's when I click "play" that the banding suddenly appears and it´s not static as it "moves around" when I move the camera. I don't see it in the scene view at all.

    2. Also, ambient occlusion is not working for me. I enable it, but it doesn't show up after baking the light. Any idea why? Is this somehow connected to the banding problem?


    Images attached of the banding issue, Lighting and light settings.

    I've tried:
    - add dithering to the camera
    - changing to "UniversalRP-HighQuality"
    - tampering with the UV maps of the models and generate "Lightmap UVs"
    - change compression settings for the lightmap (this doesn't change to high from normal)
    - change shadow type on the Directional Light
    Lighting settings:
    -- change lighting mode to "Subtractive"
    -- turning up Samples (Direct, Indirect, Environment)
    -- changing the "Lightmap Resolution" (to 60 texels/unit)
    -- changing "Lightmap Size"
    -- turn off "Compress Lightmaps"
    -- changing "Lightmap Parameters"

    Nothing has helped.
    I appreciate any help I can get as this is starting to drive me crazy.

    Thanks!
     

    Attached Files:

  2. Mumphy

    Mumphy

    Joined:
    Jun 23, 2020
    Posts:
    18
    Hello again,

    I realized I wasn't clear about that this is happening on my computer. On the Quest it looks fine, some banding but I think that's to expect. I didn't have a chance to actually play it on the Quest until after I posted this. I guess this is a hardware related problem.

    I'm still wondering about the AO though, but from what I can gather, this doesn't seem to be an option when working with the URP.
     
  3. Mumphy

    Mumphy

    Joined:
    Jun 23, 2020
    Posts:
    18
    So I just wanted to update. Apparently the material shaders used were set to URP/lit and not URP/Baked lit.
    When we changed that, it fixed the problem with AO.

    The banding happening on my computer in game view is still a mystery though. I suspect it has something to do with my graphics card not being able to handle Unity properly (it's super old).
     
  4. FloBeber

    FloBeber

    Joined:
    Jun 9, 2015
    Posts:
    166
  5. Mumphy

    Mumphy

    Joined:
    Jun 23, 2020
    Posts:
    18
    Thanks! Will check that.
     
  6. sewy

    sewy

    Joined:
    Oct 11, 2015
    Posts:
    152
    So this used to work for me at 2019 and old Unity VR setting, but does not work in 2021 with XRPackage, can anyone confirm its still valid?

    EDIT:
    Using OVRPlugin 41.0

    Code (CSharp):
    1. OVRPlugin.SetDesiredEyeTextureFormat(OVRPlugin.EyeTextureFormat.R16G16B16A16_FP);
    2. Debug.Log("Current format set: " + OVRPlugin.GetDesiredEyeTextureFormat());
    Always returns:
    Current format set: R8G8B8A8_sRGB
    , although
    SetDesiredEyeTextureFormat
    is returning true.
     
    Last edited: Jul 4, 2022
  7. sewy

    sewy

    Joined:
    Oct 11, 2015
    Posts:
    152
    So with OVRPluggin 43.0 the previous code returns correct format (the one I've set), but it makes no difference in VR.. Using Oculus Rift and OpenXR plugin (to support other headsets).
     
  8. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,077
    As strange as this might sound, sometimes running out of gpu memory at runtime, or the gpu is being used to process lots of things, going on in the game visually, can cause colour banding. I learned that from a dev guy, who dabbled and apparently helped develop, a handful of games for the snes, when it was a popular console in the early 90's.
     
    Last edited: Sep 17, 2022
  9. sewy

    sewy

    Joined:
    Oct 11, 2015
    Posts:
    152