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

Infinite reflections?

Discussion in 'General Graphics' started by yoonitee, Mar 4, 2015.

  1. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,364
    High I'm doing some tests with the reflection probes. I notice you can set the reflection bounces up to 5.

    Is it possible just to have infinite reflections? i.e. It could just use what was previously calculated for all the other shiny surfaces when calculating it's new reflections? Do you see what I mean?

    So after frame 1 it would just be like having one bounce. Then after frame 2 it would be like having two bounces and so on. It wouldn't take any extra processing power since it only calculates one bounce each frame.

    Is it possible to do this in Unity 5?

    reflections2.png
     
  2. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    If you think about what's involved... one ball looking at one other ball, that would be one probe... but to get the reflections that are ON that other ball, you have to look up that other ball's reflection probe also ... and may see ball 1 reflected in it. Okay so far.... but it now depends on which order the objects are drawn.... ball 2 only reflects what ball 1 looks like BEFORE ball 1 gets updated with the reflections that it found from ball 2.... so now there is a conundrum. Even with that said, each time you want to get an extra bounce, you have to look up another reflection probe (I'm guessing) and every time you do this it all gets slower performance-wise (since they are texture lookups). What you're asking for is to have like 50 bounces of reflections so you see like 50 little counter-reflected `spheres within spheres` using some kind of feedback mechanism... like looking in a mirror reflected in a mirror... but a) this would still produce a time delay between frames/bounces (you add one new bounce per frame, takes 50 frames to update the entire sequence) .... and there is not unlimited processing power. You can't keep results of previous bounces UNLESS all objects are absolutely stationary, otherwise you have to recalculate eveyy pixel in every bounce in every object. Even in real raytracing this is a similar problem.
     
  3. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,364

    Nah. If you point a mirror at another mirror, there is a time delay caused by the speed of light. Or if you point a TV camera at a television there is a time delay. That is fine. The inner reflections will only be wrong by 1 frame. And the inner-inner reflections by 2 frames etc. It would create some interesting feedback.
     
  4. Lions4

    Lions4

    Joined:
    May 10, 2013
    Posts:
    34

    this isn't a problem at all with ray tracing, in fact the only true solution is ray tracing.
     
  5. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,658
    Hi,

    with reflection probes you cannot achieve infinite reflections. It may be possible to do this with realtime probes, but not with Baked or Custom probes.
     
  6. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    Hi. Did you manage to do infinite reflections ?