Announcement

Collapse
No announcement yet.

Mirror Rendering with Planar Reflection drops the FPS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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

    #2
    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.

    Comment


      #3
      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
      CEO of Prydetech

      https://www.artstation.com/ixicalibur

      Originally posted by ixicalibur
      Here you go, this is a link to every tutorial you could ever need plus instructions to access all the collective knowledge of mankind: [Super massive awesome link that every amazing game developer uses to instantly learn to be super awesome at making stuff]

      Comment


        #4
        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.

        Comment


          #5
          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.

          Comment


            #6
            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.

            Comment


              #7
              I think SSR is enabled by default.

              Comment


                #8
                Originally posted by ixicalibur View Post
                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
                Specifically, they only showed one at a time - whatever had the most influence.
                George Rolfe.
                Technical Coordinator at Orbit Solutions Pty Ltd.

                Comment


                  #9
                  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.

                  Nilson Lima
                  Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                  Join us at Discord: https://discord.gg/FUwTvzr

                  UE4 Marketplace: Cloudscape Seasons
                  supporting: Community FREE Ocean plugin

                  Comment


                    #10
                    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.

                    Comment


                      #11
                      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.
                      Nilson Lima
                      Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                      Join us at Discord: https://discord.gg/FUwTvzr

                      UE4 Marketplace: Cloudscape Seasons
                      supporting: Community FREE Ocean plugin

                      Comment


                        #12
                        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.

                        Comment


                          #13
                          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).

                          Comment


                            #14
                            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.

                            Comment


                              #15
                              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.
                              Nilson Lima
                              Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                              Join us at Discord: https://discord.gg/FUwTvzr

                              UE4 Marketplace: Cloudscape Seasons
                              supporting: Community FREE Ocean plugin

                              Comment

                              Working...
                              X