Mirrors and reflective surfaces really seem to be a struggle in modern-day games unless you are using RT, and of course, that has a huge performance penalty so I am quite curious why these techniques that were used in the 90s have fallen out of favour for other techniques that produce significantly worse results visually.
In: Technology
It’s a few things, I think.
1. Models and textures are a lot higher resolution now, and player characters get more resources budgeted toward them than other models sometimes. It’s not quite as trivial to just render them twice (this is not really a huge issue, but is a factor). It’s especially true for models that have a lot of physics in them, if the physics aren’t exactly mirrored, you’ll notice. Add in more than just the player character, like reflecting a whole action scene, and at some point you’re rendering every frame essentially twice and each extra thing requires extra care to look correct.
2. Raytracing is more accurate. It avoids any issues with physics or anything that faking it has because it more directly simulates how light bounces off of surfaces and into the camera. The way angled surfaces can skew the image, the way a surface like brushed aluminum can reflect the scene in a very diffuse way, these are a lot more difficult to take accurately that raytracing can handle with ease.
It’s very expensive. Unreal did have this feature in Unreal 4, it was called “planar reflections” and it tanked performance. It was mostly made for scenes that did not need to run in real time (like artists personal work). And it can only work across a plane (like a mirror or a lake). Things like Lumen reflections, probes, or sphere captures are drastically cheaper and most people won’t notice the visual difference (but will notice the performance impact).
Even if you could somehow make planar reflections performant, you would still need 99% of your reflections to use a different method, because literally every surface in a modern video game is reflective to a certain point, and so reflections need to work on any shape of surface. Why is every surface in modern games reflective? Because that’s how it works in real life! Sure, something like smooth plastic or metal is obviously reflective, but even things like dirt and rubber are reflective in real life, even if it’s only a few percent as reflective as a mirror. Reflectivity is how we see things. Light hits a surface, reflects off, and hits our eye. One of the things that makes physically based rendering materials look so much more realistic than older style materials is the fact that PBR rendering is based on reflections.
That technique had a hard limitation of only being usable in a single small room where a small number of characters (ideally just one – the player character) is reflected.
Imagine trying to apply that technique for *water reflection* in an outside environment. You’d need to duplicate *the entire world*, all characters, every leaf of every tree, the skybox, any buildings or mountains in the background, everything. Any changes to one version of things, you’d need to replicate to their duplicate (so any physics, all animations, VFX like fire and blood splatter, etc etc). Plus, you’d effectively be rendering everything twice. This would all be insanely expensive, much more so than just using a simple screen-space reflection (which is a different kind of hack, you should read it up, i think you’d find it interesting). This is all for one plane of water – now think about reflective armor on your character, the windows of the nearby buildings, and anything else in the world that could be reflective. That old hack is just not practical in any other setting than a single room with as few characters as possible and not much gameplay happening.
* More memory, and still basically having to process the scene twice. A much better and efficient way would be to re-render the scene again from the POV of the mirror, which would be the same amount of processing, but require less memory and storage.
* “Screen space reflections,” are WAAAY more efficient (compared to older methods, they’re basically free). The amount of situations where you need to have a physically accurate mirror in your scene are actually pretty rare, and the whole reason they were ever done in the first place was usually just to show off the new tech. Once mirror tech became old-hat, level designers stopped going out of their way to design levels that include 1:1 mirrors. Instead, the scenes that _do_ need reflections, cars, large bodies of water, etc. can mostly get by with a mix of SSR or “reflection probes.” SSR isn’t perfect, but for most situations it does what’s needed.
* “Reflection probes,” are even more efficient than SSR, but are pretty rough so are better used on things where the player isn’t going to get a good look at the reflection. It’s basically just a pre-processed image of the scene that gets distorted around the object to look like it’s being reflected. It doesn’t update if the scene changes, and is only “taken,” from a single POV, so close-by objects in the reflection might not line up perfectly (which again, is why it’s not great to rely on reflection probes if you can clearly see the reflection).
Latest Answers