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

Light Estimation combined with Reflection Probes

Discussion in 'AR' started by frictionman, Jun 21, 2019.

  1. frictionman

    frictionman

    Joined:
    Sep 15, 2017
    Posts:
    10
    I have an issue when combining light estimation with reflection probes in ARFoundation. The thing is that when based on light estimation I turn all my lights ( including ambient ) to zero, all the reflective objects remain untouched by this - meaning they are visible as with lights' intensity set to 1. I figured the issue is they still receive cubemap from reflection probes taken from fully lit environment.

    Is there any way to counteract this somehow ?
     
  2. frictionman

    frictionman

    Joined:
    Sep 15, 2017
    Posts:
    10
    For now I overcame this with controlling negative emission on reflective material through global property of a custom shader. Doesn't feel as a most elegant solution though.
     
  3. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    are you using the standard PBR shader? The specularity / metallic channel can be used to offset this
     
  4. frictionman

    frictionman

    Joined:
    Sep 15, 2017
    Posts:
    10
    I'm using custom shader but the same thing happens on standard shader and I wanted to leave specularity / metallic properties intact. I've found another solution for this issue. Instead of tinkering with emission, I'm now altering intensity of reflection probes base on estimated lighting. Works perfectly.
     
  5. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    ah... you can edit this globally with
    Code (CSharp):
    1. RenderSettings.reflectionIntensity = myval;
     
    Last edited: Jun 27, 2019
  6. frictionman

    frictionman

    Joined:
    Sep 15, 2017
    Posts:
    10
    I tried that at first but for some reason it didn't work on reflection probes placed by the ARReflectionProbeManager. So I ended up with keeping track of these reflection probes and changing the intensity directly on them.