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. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Reflection Probe unable to show Curved Reflections

Discussion in 'General Graphics' started by katnyan, Feb 22, 2018.

  1. katnyan

    katnyan

    Joined:
    May 12, 2017
    Posts:
    25
    Hi,

    I have a Curved cupboard in my Spherical room, where I have baked a Reflection Probe. Box Projection is enabled as the entire contents of the room has to be reflected on the floor as applicable.
    The curved cupboard has to be reflected on the floor as curved image; But As displayed in the image attached, the cupboard is displayed as curved to some extent, but is displayed as square at the zone of the Reflection probe pointed with Green Arrow in the image.

    How could I achieve the Curved Reflection in this scenario? Is it not possible to achieve reflections for objects in Spherical surroundings other than boxes?

    Note: ReflectionProbe_Issue.jpg has the issue described as above
    TopView.jpg has the topview of the room with zone of Reflectionprobe.
     

    Attached Files:

  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    10,982
    Reflection Probes are not supposed to be that accurate.

    You could either look into planar reflections, or you could try SSR in the new Post Processing Stack (v2).
     
  3. katnyan

    katnyan

    Joined:
    May 12, 2017
    Posts:
    25
    Hi.. Thanks for the prompt reply.
    SSR isn't supported in VR.
    Coming to point of using Planar Reflections, I have around 20 light gameobjects in my scene. As of now, I am baking the scene along with reflection probe. Do I get the same reflections when the scene is Baked using Planar?
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,229
    You can’t bake planar reflections. They work by rendering the scene a second time with a special reflected projection matrix.
     
    AcidArrow likes this.
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    10,982
    If you're doing VR, planar reflections are going to be too slow probably (since they require you to render your scene a 2nd time as bgolus said). You could potentially render at a much lower resolution for the reflections and maybe skip some objects to make it a bit faster, but it will still be slow.

    So my advice is this: Since you're doing a VR game, which means you should be even more focused on performance than other games, forget about concepts like "accuracy". Game development is about employing every trick/hack/cheat in the book to make things look good while performing well. So forget about accurate reflections and try to tweak things until they look okay with reflection probes, which are pretty fast.

    Unless of course, in that specific scene, accurate reflections are super critical (maybe for gameplay reasons?). Then you work backwards. You implement some sort of planar reflections (there isn't a built is solution for planar reflections, you would have to either make your own, or find one (there are a couple of floating around) and tweaking, but still this is going to be well above trivial), then you sacrifice fidelity on the rest of your level to make everything perform well enough.
     
  6. katnyan

    katnyan

    Joined:
    May 12, 2017
    Posts:
    25
    Thanks Nick and Bgolus, Will look for a suitable solution.
     
  7. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    629
    An other hacky trick that add an option for you : do old school fake mirror reflection : replace your reflection surface material with a semi transparent and glossy one, and duplicate/mirror part of your geometry on the other side of the surface.
     
    AcidArrow likes this.
  8. cthomas1970

    cthomas1970

    Joined:
    Sep 12, 2017
    Posts:
    75
    I think your getting into the realms of need for raytracing. Problem is, this is still not practical at 30 - 60fps. So, for now, Im afraid it is a choice of Cube Reflections, Screen based, or hand crafted mirror.

    So the question is does this reflection HAVE to be 100% accurate, or is this just a wish? In my game, I have also struggled with aspiration vs reality. But at the end of the day, its a game, and 60fps is more important than 100% correct reflections.
     
  9. katnyan

    katnyan

    Joined:
    May 12, 2017
    Posts:
    25
    Tried using Planar Reflections and it didn't work-out.
    I have used Planar Reflections and Custom Shader as given in this URL: https://drive.google.com/file/d/0B2WDRR3zNNn8YlozZ2ppZm02Q0U/view
    But, this doesn't work for VR. It looks good when displayed in Editor, but the same scene displays reflections weirdly when seen in VR.
    Are there any Planar reflections which work for VR?