Announcement

Collapse
No announcement yet.

Requesting improvements about planar reflections (4.12)

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

    Requesting improvements about planar reflections (4.12)

    Hello Epic,

    First of all let me thank you for (finally) implementing planar reflections we have been asking that for ages.

    Secondly it would be great if the following could be implemented:

    1) Be able to manually update the planar reflection captures rather than every frame.

    Setting bool CaptureEveryFrame to false doesn't have any effect (is this a bug in Preview1?).
    We should have the option to do this via blueprints.
    I have seen games (like GTA V for instance) that update reflections in half the framerate in some cases which greatly helps with performance.
    You may get slightly unaligned reflections if the camera moves quickly but it's certainly a good option to have.



    2) Allow us to (optionally) set a render target manually so we can use it in the material as we like.

    I can somewhat understand why this is not done by default (ease of use and all that) but I'm sure many artists would appreciate having some actual control over the reflections.
    As it is right now (in Prev1) a planar reflection actor seems to effect every object in the scene! which results in incorrect/weird reflections. What if I want it effecting only 1 wall or floor for example?


    3) Enable optional use of the clip plane in the regular scene capture 2d component so we can make our own custom planar reflections.
    Again, this would give us more control (which is basically what I'm asking for ).

    Thanks in advance and keep up the greatness!
    Last edited by TK-Master; 05-02-2016, 06:10 PM.

    4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
    WIP Interactive Water Shader, WIP 2D Water Sim
    WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

    #2
    1) The planar reflection texture is dependent on the main camera so you really can't ever skip updating it, or artifacts show on the edges as you are reading outside of the rendered region of the texture, depending on how fast you are rotating the camera. bCaptureEveryFrame is forced on under the hood. This is different from the way regular SceneCapture2D works.

    2 & 3 - thanks for your feedback

    Comment


      #3
      Originally posted by DanielW View Post
      1) The planar reflection texture is dependent on the main camera so you really can't ever skip updating it, or artifacts show on the edges as you are reading outside of the rendered region of the texture, depending on how fast you are rotating the camera. bCaptureEveryFrame is forced on under the hood. This is different from the way regular SceneCapture2D works.
      Hmm weird, I guess I will have to explore the source code.
      If you have some spare time, could you explain how does the planar reflection actor work?

      I can't say I understand why it needs to update every frame .. what if the camera is stationary? there is that scenario too (we could render at half framerate when the camera isn't moving).
      And as I understand it, it doesn't need to read outside the rendered region either but instead use the camera position/rotation that it was rendered at (like I said, this can result in slightly unaligned reflections but it works fairly well in GTAV).

      Thanks for the reply!

      4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
      WIP Interactive Water Shader, WIP 2D Water Sim
      WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

      Comment


        #4
        When I turn on "Support global clip plane for Planar Reflections", my projects are stuck at 45% and I have "Unreal Engine" with 3 "Shader compiler" processes, that can be turned off only manually.

        AsRock Z77 Extreme4
        Intel Core i5 2500K @ 4.3 Ghz
        Gigabyte Radeon R9 380 Gaming G1, 4 GB GDDR5
        Seagate 1TB Sata III 7200RPM
        2 x Patriot 4GB DDR3 1600 Mhz

        Comment


          #5
          Sounds like you need to let the shader compile finish.

          Comment


            #6
            ^ Yup. Wait a few minutes (can take a while) for shaders to compile at it'll be fine. Probably compiling all the engine shaders too.

            Comment


              #7
              Hi,

              Could someone please explain how the planar reflection actor is meant to work? I thought I could use these actors as mirror panels as this is how it appeared to work in the editor, however, when running the game it appeared that the actor only influenced the reflections in the nearby reflective materials.

              How would one go about creating a full mirror using this feature?

              Thanks

              Comment


                #8
                The reflective plane you see when placing a PlanarReflection in the world is just an editor-only preview. Press G in the editor viewport to see what it will look like in game - that plane will disappear. You can make your own perfect mirror by placing a plane mesh in the same spot, with a material that has values of 1 hooked up to Metallic and BaseColor.

                Comment


                  #9
                  Hi Daniel,

                  Thank you so much for adding this feature to the engine, it is already working very well. I have a couple of questions (or requests if not possible) regarding the implementation.

                  1) As [MENTION=1127]TK-Master[/MENTION] mentioned (we're working on the same project), the reflections are being cast on everything when used on an ocean surface. For testing I currently have it set up as a component to the Ocean mesh blueprint, however it applies the reflections even to rough/opaque materials on other actors along the same plane. For example:
                  Click image for larger version

Name:	PlanarRef2.PNG
Views:	1
Size:	846.1 KB
ID:	1106143

                  This is a shot from inside a ship above the ocean surface. The material applied to the wall is the same one applied to the floor, with the planar reflections turned on it causes the floor to look glossy and reflective. Perhaps I misunderstood how the planar reflections were supposed to work, but I thought it would be something that needed to be enabled in the material itself, allowing us to opt in for certain surfaces (such as the water surface only). Is this something that can be done currently or might be possible later on?

                  2) This might not be possible due to the way the planar system works, but is there a way to include some surface displacement into the normal distortion? Reason I ask is the ocean material we are using produces waves through surface displacement, along with surface normals, but only the surface normals affect the reflection. To get around this I have to crank up the normal displacement pretty high to distort the "flatness" of the reflection enough for it to look believable. Even without this the reflections look 100x better than SSR, but it would add just a little bit more to the scene. Here's an example shot:
                  Click image for larger version

Name:	PlanarRef3.PNG
Views:	1
Size:	967.1 KB
ID:	1106144

                  Overall I am really happy with this system so far, it is producing much more realistic surfaces than SSR ever could, so once again thank you for finding the time to get it implemented, much appreciated!

                  EDIT: btw this is for 4.12p2
                  Last edited by DotCam; 05-09-2016, 02:33 PM.
                  Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                  Comment


                    #10
                    [MENTION=404]DanielW[/MENTION]: the features requested by TK-Master are exactly what is needed and what I expected from this planar reflection feature.
                    So, when you say:
                    2 & 3 - thanks for your feedback
                    Could you please elaborate a little bit?
                    Last edited by EdWasHere; 05-11-2016, 03:49 PM.
                    GLASSES & WATER SHADERS & CUSTOM PLANAR REFLECTIONS on my Youtube Channel: https://www.youtube.com/channel/UCP2...26Y2bEV4kfl9kA

                    Comment


                      #11
                      Just grabbed 4.12 as we are trying to compare various reflection based rendering effects and compare costs. Really eager to give the planar reflections a try. I still don't get how to hook these up in the editor? New to Unreal, but assuming the planar reflection entity should be able to write to a render target similar to the cubic reflection actor? However, I don't see a "render target / scene capture" anywhere within the planar reflection actor? How do I generate the reflection texture and apply it to the "mirror mesh"? Thanks in advance.
                      dave blizard || senior director lighting || baobab vr

                      Comment


                        #12
                        It is generated by the engine which applies it to the mirror mesh. For now, you don't have direct access to the render target.
                        Last edited by EdWasHere; 05-14-2016, 10:57 AM.
                        GLASSES & WATER SHADERS & CUSTOM PLANAR REFLECTIONS on my Youtube Channel: https://www.youtube.com/channel/UCP2...26Y2bEV4kfl9kA

                        Comment


                          #13
                          Please correct me if I have anything wrong. To enable planar reflections in 4.12:
                          -Enable global clipping plane found within: project settings > rendering > optimizations "Support global clip plane for Planar Reflections"
                          -Setup a simple material using Roughness = 0 / Metallic = 1.0 / Base Color = 1.0
                          -Apply material to a quad mesh (mirror)

                          Play the game and the quad mesh will now have planar reflections applied.

                          So what is the purpose of the "Planar Reflection" actor found within the "Modes" menu? If I drag this into the viewport, I get planar reflections on this mesh, but only in preview mode and not in the runtime game mode. This sent me down a bit of a path questioning how to get planar reflections actually working.

                          Just making sure I understand the basics here.

                          Thanks in advance,
                          dave blizard || senior director lighting || baobab vr

                          Comment


                            #14
                            Adding to my last post.

                            I do see that the "PlanarReflection" actor does come with a bunch of sliders that control various reflection attributes. So, guess it's safe to say that we need to keep the PlanarReflection actor saved into the scene with these values tuned. Probably why it doesn't render when running the game.

                            thx
                            dave blizard || senior director lighting || baobab vr

                            Comment


                              #15
                              [MENTION=350986]blizzzz1[/MENTION]: Yes you need to have the actor in your scene, scaled large enough to cover the surface you want to have reflections on. Alternatively if the object you want reflections for is a blueprint, you can simply add a PlanarReflection component to the BP, and adjust the values there (it should scale to the object size automatically). When you hit Play, the PlanarReflection actor will disappear and leave a reflection on the surface the size of the actor.

                              --------------------
                              [MENTION=404]DanielW[/MENTION] - Just entered a bug report for the Blueprint based PlanarReflection component causing massive memory/performance issues in editor when adjusting a slider variable value for the blueprint. A video is included as it is difficult to fully explain, along with steps to reproduce in a new project. Thanks.
                              Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                              Comment

                              Working...
                              X