Mirror Rendering with Planar Reflection drops the FPS

Hi people,

My team is creating a game with many levels,and one of the levels is just a mansion. In the mansion I have 3 rooms in different locations(the manor is big) where I have 3 planar reflections,one in each room. The size of the planar plane is small(we are talking for bathroom mirrors, the scale is something like x=0,002, y=0,0025, z=1). The problem is that the FPS drops from 100 to 22 in unlit mode. The settings for each planar map is low after I did a research of what does each setting option.

So my question is,Is a limit of planar maps that you can use.And if not,what should I check to increase the FPS? If you require any images from the project to help you with my problem,please let me know to attach it.

Thanks in advance

Planar maps do not have occlusion culling, they are only culled by the view of the object bounds. So by having 3 planar maps in view, even if they’re occluded by walls and other objects, your scene is being rendered 6 times. Planar reflections are obviously not ideal for multiple planes. You can probably get away with one plane large enough for a lake or an ocean, but for multiple floors on multiple levels it would be much more optimized to just use SSR combined with the box reflection capture at a high resolution.

I’m not sure if it’s possible to remove a reflection plane using level streaming, but it’s not done automatically.

cant remember if it was in a live stream or on a demo project, but epic had a level that has 30 or so planar actors in it and hid them when out of view

Use “Show Only Actors” feature and then only add actors inside that room and player. Also make system where you set planar reflections visible toggle false when you are not in the room.

We might use blueprints to on/off the planar maps.At the moment I am testing scenecapture2d. It works ok,but when i use them for small mirror sizes,their reflection looks a little bit offset. As for the SSR, i tried to find something to explain me how to use it but I cant find anything in depth.

Probably should look at the Robo Recall levels for the best practices with planar reflections, they also talked a bit about them in live streams.

I think SSR is enabled by default.

Specifically, they only showed one at a time - whatever had the most influence.

SSR you enable within you material setup panel at left at Translucency section: Screen Space Reflections (of course it requires a translucent blend mode). They will add extra cost inside your material including texture samplers, be sure to have your textures marked as Shared:Wrap or Clamp when needed.

As far as result SSR is not as good in reflection quality when compared with Planar Reflections, but they are faster. You can have all materials set with SSR and add PR everywhere disabling then when they are not in your field of view. There is a minor tweak inside the PR which is the overall screen resolution used by them, thou if your graphics card is good lowering this value will not result in significant increase of FPS (50% to 10% gains in order of 3FPS), but with lower-end cards it might result in some more gains (up to 15FPS). You could reduce that value for PR far away but still in field of view.

Going off of what Nilson said, Planar Reflections are perfect scene captures, but that means rendering your entire scene all over again. Draw calls and polygons are the biggest issues with it: no matter how low the resolution of the capture is, you still have to deal with the fact that objects and polygons still need to be rendered. There are some options to help with this, though:

  • LOD Distance Factor - Scales distance at which objects use lower LOD. Set this accordingly so objects in the reflection use a lower LOD than in the main render pass.
  • Use ShowOnly List - Select only the objects that should be rendered in the reflection: walls, important objects on floor, sky, etc. This is great for reducing draw calls!
  • Screen Percentage - Even though this is not a great help in reducing the cost, there is still no need for a reflection to be as pixel-perfect as the main render, especially if being distorted in the material.

SSR uses the G-buffer data already present to provide a reflection, so you don’t need to render the scene again. Don’t knock the effectiveness of it before trying: blending a sphere reflection or cube reflection on floors that are not perfect mirrors (and a little rougher) can work well enough for a realtime environment. If that doesn’t work, then you’ll need to optimize the planar reflections manually.

On another thought you are handling mirrors in your scene, you will want those PR scaled exactly to match the mirror surface area and not to include the lateral frames. I don’t know the appearance of those mirrors, but it is good to have this tight as much, because in a complex scene any gain is a gain.

thanks for your responses,at the end I used planar reflection with on/off blueprint.Because the lvl is small,I dont have big issues.However I will try the SSR method for the future.I tried the Scene capture method,but it needs a lot of tweaking to have a good result.

Hi, is it possible to improve the performance of FPS using an SLI solution? I have a room with 3 PR and the client wants the most detailed reflections as possible. A more powerful graphics card (Titan V)?
Now I mounted a 1080 ti and without the PR runs at 60/70/100 FPS, activating the PR drops to 15 FPS (minimum value framing the PR).

SLI doesn’t work natively with the engine, and even if you got SLI working for your project, you’d have to disable features like SSR and TAA.

There’s some tricks you can do to get better reflections, like duplicating and mirroring meshes, using reflection decals, etc. The solution is going to depend on your project and needs.

Multi-GPU will start being part of the engine, with the release of 4.20 (according to GDC presentations) and the effort of integrating this will definitely happen for high realistic film.

As ZacD mentioned, you might want to tweak better the scene. The future of the engine with realtime raytracing (expect a year from now) will make this project of yours much more easy and with higher quality.

This is not true. Planar reflection capture do use occlusion queries just like the main view does. Planar actor is also occlusion tested as if it’s occluded reflection pass can be skipped completely.

But precomputed visibility is broken with planar reflections and that has to be disabled manually to avoid some missing reflectors.

If two or more PR’s are visible at the same time you will tank your performance, there is a note about this on the documentation page that says:

That’s probably why you are experiencing performance issues.

Have you already looked into using SceneCapture2D actors for the mirrors instead? Might be worth trying

I have made optimizations and fixes for planar reflections. These should help a lot when you are trying to use multiple small planar reflection actors.

How do you add the player? Since the player isn’t in the World Outliner I can’t pick it from the list. I tried adding an instance of the character BP but that didn’t work because when you spawn with player start it’s adding the character to the level dynamically.

I’ve since discovered that you can add your player character into the map and set the Auto Possess to Player 0 and it will work when you then select the player character in the world outliner and add it to the planar reflection’s included list.