6
$\begingroup$

I'm working on my own engine and I'm struggling to find any techniques that give okay-ish reflections in realtime on dynamic scene. So far the only technique I found that work in real time on dynamic scene is SSR but it's really heavy and have a lot of bias.

The idea of having multiple cubemaps and updating them in real time crossed my mind but because that mean re-rasterising the scene that also mean that every cubemap updated in realtime is a shadow casting that I can't do.

So my question is: is there another technique other than reflection probe (cubemap) or Screen Space Reflections ?

The artstyle of the game where the engine will be used is based on a lot of "almost mirror" reflections and it's not PBR.

[Edit] To be a bit more precise with what I'm searching:

  • I do not need more than one bounce.
  • I do not want any baking that cannot be done at "loading time".
  • I prefer if the technique work with a per-pixel normal but if you know a technique that work with a per-vertex normal I am also open.
  • I am open to techniques that only work in specific cases (like tiny scene, deferred rendering only etc...) as long as it meet other requirements.
  • If your technique is a feature of a global illumination technique I am also open but I would prefer if it work stand alone.
  • If it can easily support GGX it's better but not required.
  • Inaccuracy is not a problem as long as it is predictable by the artist
$\endgroup$
2
$\begingroup$

If there is only a single flat mirrored surface the solution is to render the scene twices, once normally. Afterwards you use stencil to mark the area where the mirror is visible.

Then only drawing into that area you render the scene again but mirror it around the mirror's plane and cull any geometry on the other side of the mirror.

$\endgroup$
  • $\begingroup$ I will keep that in mind but I was talking about generalised methods $\endgroup$ – newin Mar 20 '17 at 12:36
  • $\begingroup$ @newin When you say generalised, do you mean non-flat surfaces, or multiple flat surfaces? Do you require distortion of the reflections? Multiple reflections of mirrors in other mirrors? It would help to edit the question to specify what you do need and what you don't need, then answers can take that into account and focus on just what is necessary. $\endgroup$ – trichoplax Mar 20 '17 at 20:49
  • 1
    $\begingroup$ @trichoplax I edited my question with much more precisions I hope that's enough. $\endgroup$ – newin Mar 20 '17 at 22:13
2
$\begingroup$

If you want a real-time solution (no baking), and only need one reflection bounce, you can try to generate (or update) a cubemap of the scene every frame, as described in this graphics study of GTA5 .

This solution should work in general cases (be sure to handle cases when the cubemap probe would be in an object of the scene).

If rendering the six faces of the cube every frame seems too heavy, you can try for example to update only one face at a time. You can then use some kind of average function when updating the faces so that the change between each frame looks smoother.

It is only an idea, there are many other solutions that one can think of.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.