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

Reflection probe 'pinching'

Discussion in 'Global Illumination' started by topofsteel, Mar 21, 2015.

  1. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    I'm trying to set up a probe on the inside of a room. The wall corners align up fine, but the reflection of the ceiling is pinched. I had used several reflection probe packages available on the asset store in Unity4, and I would get that if the bonds of the probe stopped before the ceiling. The square room seems ok, but not the rectangular one. Also, in the images, notice the nearest door isn't reflection. How can I set this up correctly? Thanks.

    Probe_01.png

    Probe_02.png
     
  2. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    I have discovered that if the material smoothness (specular setup) is anything less than 1, the reflection starts to pinch towards the probe. Thats less than ideal. Is this by design?

    Probe_04.png

    Probe_05.png
     
  3. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    Well that looks weird. I think I understand why it's happening though.

    If you click on your probe and look at the preview orb, then vary the mipmap level, I suspect you will see the central lights retaining their sharpness compared to the far out lights. This is simply because the far out lights have a much smaller size on the sphere, and the blur is done evenly across the sphere rather than based on distance (because there is no depth information to base it on).

    Then the smoothness of the material determines which mip level to use, giving you the effect you're seeing.

    If I'm right, I can see two ways that they could solve this issue.

    One, take depth into account when doing the specular convolution blur, this depth could either be based on the box used for box projection, or actual depth data rendered by cubemap cameras.

    Or two, when choosing which mip level to sample at runtime, take the position of the pixel on the box projection into account as well as the smoothness. The closer it is too the actual probe, the more extra blur etc.

    The problem is obviously going to be more pronounced in long corridors or very flat rooms, and less pronounced in mostly cube shaped rooms.
     
  4. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    Here's a possible workaround for you to try.

    If you're only interested in the floor being reflective and not the ceiling, move the center of the probe down a lot, even below the floor maybe. I think this will reduce the effect.
     
  5. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    OK, where do I go from here. Neither of these solutions seem easily accessible. I didn't code this reflection probe from scratch, it's out-of-the-box Unity5. Have you played around with modifying the probes like you mentioned? Do you know of a cubemap capturing utility that I could use and plug it into the custom slot? Were ceilings/reflections from above not considered?
    I did plan on seeing the wall reflections, it's an high gloss epoxy laboratory floor. Baring a real solution, my plan was to use the smoothness value of 1 and try to soften the reflection by turning down the reflection value. Or possibly dirt or noise in the secondary maps chanel. Or, seeing if one of the assets from the store will work for unity5. Thanks!!
     
  6. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    I'm sorry, my two possible solutions are aimed at the unity guys for how they could fix this problem with their reflection probe system.

    you could still try moving the actual probe down though. You'll still be able to see the walls reflected in the floor. You just won't be able to use it to see reflections OF the floor in the walls or ceiling.
     
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    did you actually tick box projection and arrange the box to sufficient size?
     
  8. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    yes. I would love it if I was doing something wrong. I was counting on this working. Is anyone getting these results? Should I file a bug report.
     
    Last edited: Mar 22, 2015
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
  10. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
  11. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,875
    This is expected with reflection probes in this scenario, and there's no 100% workaround for this problem.

    The best possible fix is to use screen space reflections, those should hopefully come to Unity as a builtin feature in 5.1.