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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Screen Space reflection produce an additional grey looking reflection. See screen shot.

Discussion in 'High Definition Render Pipeline' started by harrywenjie, Apr 19, 2020.

  1. harrywenjie

    harrywenjie

    Joined:
    Jun 25, 2018
    Posts:
    12
    As shown in the screenshot blow, see the testing red ball, the reflection on the marble has a secondary grey reflection. Does any know why and how I got it? I've spent 4 hours trying to figure this out, and I couldn't. Help needed!
    Annotation 2020-04-20 085417.png

    This is another clearer screen shot with a cube and a ball

    Annotation 2020-04-20 090828.png
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,064
    That’s just a limitation of SSR in general. (I think you can set it up to fallback to a cubemap in that area so you have more appropriate colors there instead of gray)
     
  3. harrywenjie

    harrywenjie

    Joined:
    Jun 25, 2018
    Posts:
    12
    It has the correct red reflection. The additional gray ones comes from nowhere. Using probe has other limitations. for now I want figure out the HDRP SSR, because everything else looks fine.
     
  4. valarus

    valarus

    Joined:
    Apr 7, 2019
    Posts:
    430
    Did you try to adjust SSR settings?
    I'm having the same issues. I think SSR affects how camera is placed and what is scale of your prefabs with the rest of the world.

    You have jagged edges. I think number of ray steps could improve this.
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,064
    Read up on how SSR works.

    Very quickly: the basic idea is that it takes the rendered image, calculates the reflection vectors (based on normal and depth) and finds where in the already rendered image the reflection should hit.

    The issue (or one of) is that things that aren’t already in the rendered image cannot be reflected.

    See the part of the fence, that should be reflected, but instead has the “grey reflection”. That part is occluded by the sphere, as such SSR has no information to use there and instead outputs grey.

    SSR in general kinda sucks and looks ugly. Unity’s implementation is not great but it’s not bad either, it’s just that the method in general has so many shortcomings, I don’t know why games still use it.
     
    valarus likes this.
  6. harrywenjie

    harrywenjie

    Joined:
    Jun 25, 2018
    Posts:
    12
    Thanks, I just ordered 2080ti, and I will see how DXR reflection does for the scene. For now, I guess I'll have to stick with probes.
     
  7. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    642
    You can't rely on SSR only.
    HDRP SSR implementation works as following :
    1. For each pixel, try to do a ScreenSpaceReflection
    2. If it fails, fall back to the reflection probe
    3. If there is none, fall back to the environment reflection
    Have you tried setting up a (or more) reflection probes, to circumvent where SSR fail ?

    Have you also maybe tried to use a planar reflection probe ?
     
    valarus likes this.
  8. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Copy entire scene and render it flipped :D Not being silly, sometimes just stencil, or use a transparent effect for key parts if the above fails.
     
    Olmi and valarus like this.
  9. valarus

    valarus

    Joined:
    Apr 7, 2019
    Posts:
    430
    @Remy_Unity would it be possible to replace existing SSR code with something more adaptable and functionale in such situations?
     
  10. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    642
    @valarus Please do as you wish, all the code is here : https://github.com/Unity-Technologies/Graphics
    SSR isn't magic, being based on what is visible on screen, it can't display reflection of what is behind objects, and this is exactly the issue you are having here.
    But if you have a proper fall back reflection probe, it should be less visible.
     
    Last edited: Apr 21, 2020
  11. harrywenjie

    harrywenjie

    Joined:
    Jun 25, 2018
    Posts:
    12
    Yes, probes works. But I didn't think about having them work together. Now it's clear that I need both.