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

Question Hopefully an easy question, lit transparent objects have no reflection

Discussion in 'High Definition Render Pipeline' started by aitchest-of-dees, Jun 20, 2023.

  1. aitchest-of-dees

    aitchest-of-dees

    Joined:
    Dec 28, 2013
    Posts:
    71
    I've gone through the settings to the best of my limited knowledge. I have Screen Space Reflections and transparent checked on the HDRP settings (in all 3 quality level assets and in the project settings, not sure why there's so many place for the same setting) and I've tried a bunch of other tick boxes on the materials and lighting and everything I can think of, but the only thing that makes the reflections work is turning the material opaque. What am I missing?

    upload_2023-6-20_14-41-8.png
    The material on the right is pretty much the same as the one on the left, except it is transparent and 2 sided, instead of opaque.

    Unity 2022.3.1f1 if that matters.
     
  2. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    692
    Hey, SSR Transparent is maybe misleading but it's SSR ON Transparent, meaning, when activated, Transparent objects should receive Screen Space Reflection.
    Transparent objects won't appear in SSR because they are rendered later in the pipeline.

    If you want to have your transparent appear, it needs to be in the "Before Refraction" pass (cf documentation)
    However, you still don't have the depth of it, so its position will be wacky, thus why the green sphere reflection is weirdly placed. (it takes the depth of the opaque behind)

    Hope that helps.
     
  3. aitchest-of-dees

    aitchest-of-dees

    Joined:
    Dec 28, 2013
    Posts:
    71
    Useful info as to why it isn't working, thank you. And I appreciate the correction on SSR Transparent!

    This still seems like it would be a common thing people would want: Say if a jelly monster jumps over a pond, or a ghost goes by a mirror, you would expect to see the reflection, no? Maybe not a vampire but that's another topic. Is there any non-wacky way to make it work? Or should I abandon translucency?
     
  4. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    692
    I completely understand this is something one would want, but transparency in rasterization has always been a really complex topic, with lots of different solutions.
    HDRP's transparency implementation already introduces a lot of complexity to be able to support many use cases, at some point, supporting new things has some diminishing returns.

    The only thing that comes to mind would be to use raytracing (Recursive rendering specifically), but it also has some caveats, like its cost among others, so it should really be used sparingly.
     
  5. aitchest-of-dees

    aitchest-of-dees

    Joined:
    Dec 28, 2013
    Posts:
    71
    Oh. Wow. Recursive rendering looks fantastic. Thank you!
     
    chap-unity likes this.