Announcement

Collapse
No announcement yet.

Physical Water Surface

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

    Originally posted by Theokoles View Post

    It is a known issue that this artifact appears with Raytracing. I will investigate if I can make Physical Water Surface work with Raytracing.
    I've tried to replicate this problem, but I couldn't. Maybe I couldn't see this artifact because my GPU is too old and doesn't support raytracing (I have a GTX 980 Ti).
    Could you please let me know exactly which steps you made in the engine, then I'll try to reproduce them. You're welcome to contact me at therealtheokoles@gmail.com

    Comment


      In our current project, we are trying to move a ship with a set amount of force in a way that represents reality as closely as possible. For this we are using values for LinearDamping, AngularDamping, DragMultiplier, FloatFactor, etc. that are slightly below the defaults.

      However, when running the same project on mulitple PCs the behavior of the ship differs wildly between systems. This is despite each computer running the same project files on the same OS with the same version of UE4 (4.21.2). (The hardware is similar between PCs, but not identical)

      To be more specific, for example: A simulation is set up on System A and runs successfully in a realistic manner. When that simulation and its parameters are moved to System B, the simulation results are so completely different that the two results can hardly be compared (with the bow of the ship flying off the surface and swinging like a pendulum in one example).


      When using this plugin, are there any effects which are affected by the system hardware that could result in what I have described above? Is there anyway to mitigate these problems and create a simulation project that will produce the same results regardless of hardware (within obvious limits)?

      Comment


        Originally posted by iPX Co Ltd View Post
        In our current project, we are trying to move a ship with a set amount of force in a way that represents reality as closely as possible. For this we are using values for LinearDamping, AngularDamping, DragMultiplier, FloatFactor, etc. that are slightly below the defaults.

        However, when running the same project on mulitple PCs the behavior of the ship differs wildly between systems. This is despite each computer running the same project files on the same OS with the same version of UE4 (4.21.2). (The hardware is similar between PCs, but not identical)

        To be more specific, for example: A simulation is set up on System A and runs successfully in a realistic manner. When that simulation and its parameters are moved to System B, the simulation results are so completely different that the two results can hardly be compared (with the bow of the ship flying off the surface and swinging like a pendulum in one example).


        When using this plugin, are there any effects which are affected by the system hardware that could result in what I have described above? Is there anyway to mitigate these problems and create a simulation project that will produce the same results regardless of hardware (within obvious limits)?
        My first guess would be that the result of the buoyancy physics simulation depends on the framerate (which is slightly different on the two systems), which could cause your issue. This is a know effect, see this article that also provides a solution for framerate independent physics. See also the documentation about physics substepping. My first recommendation is that you try to achieve framerate independent physics by following the advice in this article.

        You should also be aware of the N Points Per Frame and N Frames Pause parameters of the Buoyancy Blueprint. These improve the CPU performance by reducing the number of frames that update the Water Depth for each Point. However if these two settings are the same on both systems, this should not result in the observed behavior.

        Does your application require that a real-time simulation of buoyancy is performed? Would it be an option to prerecord the motion of the floating ship? The water motion in Physical Water Surface is always exactly the same when the game is started (it just depends on the game time). So if the simulation is always the same this would be an elegant solution.

        Comment


          In the past I have been providing the documentation for Physical Water Surface on a page in the Epic Wiki. Today the Epic Wiki was disabled.
          The documentation for Physical Water Surface can now be found here on GitHub.
          Last edited by Theokoles; 04-21-2020, 05:25 PM.

          Comment


            Hi Theokoles,

            Is there any plans of making physical water surface mobile friendly? I have tried my game on IOS, and the water material does work after some modifications, at roughly 1 fps

            Comment


              Originally posted by RMelin View Post
              Hi Theokoles,

              Is there any plans of making physical water surface mobile friendly? I have tried my game on IOS, and the water material does work after some modifications, at roughly 1 fps
              Yes, a mobile version is definitely on my list of things that I want to investigate because quite a few people have already requested it. But at the moment I'm working with highest priority to bring transparency to Physical Water Surface.

              Comment


                Tried to create a mobile friendly shader/material that uses WaterMotion. and it kinda worked. FPS is acceptable on newer IOS devices (40-60FPS on Iphone 7) used in the videos below.

                Comment


                  The documentation for Physical Water Surface is now available here on GitHub: https://github.com/Theokoles/PhysicalWaterSurface/wiki

                  Comment


                    Originally posted by unit23 View Post
                    The page does not exist, can you point me to a guide, or briefly describe steps, thanks.
                    I've updated the documentation with a detailed description how to setup the connection between Orbit Weather and Seasons and Physical Water Surface, see here: https://github.com/Theokoles/Physica...er-and-seasons

                    Comment


                      In the newly released Engine version 4.25.0 there seems to be a problem with screen space reflections (they only work correctly with Temporal AA).
                      I've also noticed this issue when I tested Physical Water Surface in UE 4.25.0: If FXAA is enabled then the SSR don't look right. Everything else works fine in the new engine version. So please consider this if you plan to migrate your project to 4.25.0.
                      I'll monitor the situation, hopefully there will be soon an update of the Engine that fixes this issue with SSR.

                      Comment


                        Originally posted by Theokoles View Post
                        In the newly released Engine version 4.25.0 there seems to be a problem with screen space reflections (they only work correctly with Temporal AA).
                        I've also noticed this issue when I tested Physical Water Surface in UE 4.25.0: If FXAA is enabled then the SSR don't look right. Everything else works fine in the new engine version. So please consider this if you plan to migrate your project to 4.25.0.
                        I'll monitor the situation, hopefully there will be soon an update of the Engine that fixes this issue with SSR.
                        In engine version 4.25.1 the reflections look good again, so I've marked Physical Water Surface as compatible with the latest engine version 4.25. Please let me know if you should encounter any problems.

                        The following information could be important for people working on cinematics with a fixed camera position: The phase of the Gerstner Waves in Physical Water Surface is randomly generated in Blueprint, using the Random Float in Range from Stream Blueprint node. This approach results in a deterministic water motion each time the game is started because the same seed is used. In UE 4.25 the Random Float in Range from Stream node returns a different value from the same seed than in previous engine versions (according to the engine release notes this behavior is intended).
                        As a consequence, the water motion in UE 4.25 is still deterministic, but it is different from the water motion in engine versions 4.10 to 4.24. The only difference is the phase of the waves (which is random anyway) and it is actually quite difficult to spot the difference with the bare eye.

                        Comment


                          I'd like to share some news about my progress with the transparent version of Physical Water Surface. This will provide some insight about the direction I'm taking with the development and about what to expect in the next updates.
                          Please note: This is just a preview, these feature are not yet included in Physical Water Surface at the moment.

                          True Refraction Shader
                          The look of a transparent water surface is heavily influenced by the reflection and refraction of light. While there is a good-looking solution for reflection (SSR), UE4 lacks a good solution for realistic refraction on large water surfaces. To look realistic, refraction needs to follow Snell's Law which means that a straight object appears to have a sharp bend at the point where it penetrates the water surface, as shown in this picture.
                          UE4 offers the Refraction Modes Index of Refraction and Pixel Normal Offset, and from the screenshots shown in the documentation it is clear that neither of these two option provides provides a geometry distortion according to Snell's Law.
                          I've developed a shader called True Refraction that aims to provide realistic refraction for large water surfaces, providing geometry distortion of submerges objects according to Snell's law.
                          Here is a screenshot that shows what this shader can do. The water surface is just displayed just a grid in this preview to highlight the refraction effect. On the left image, the refraction is disabled, while on the right image the True Refraction shader is enabled. Notice the sharp bend where the edge of the tilted cube penetrates the water surface, and also the distorted geometry of all submerged cubes.

                          Click image for larger version

Name:	RefractionPreview6.png
Views:	242
Size:	237.0 KB
ID:	1774649


                          Line Trace to the Water Surface
                          Physical Water Surface already brings a Blueprint that calculates the water height at a given location, which is basically the same as calculating the intersection point of a vertical line and the water surface. During the development of the refraction shader, I've implemented an algorithm that can calculate the intersection point of a line of any angle (e.g. a light ray) with the water surface. This can be very useful for other things than refraction, since it allows to perform a line trace to the water surface.
                          The screenshot below shows the line trace Blueprint in action. The green sphere is drawn at the calculated intersection point of the line and the water surface. The number 4 indicates that the algorithm needed 4 iterations to converge.

                          Click image for larger version

Name:	WaterLine.png
Views:	169
Size:	301.5 KB
ID:	1774650


                          I'm planning to publish a video very soon that showcases the True Refraction shader. And you can expect an update very soon that brings the Line Trace Blueprint.
                          Please let me know what you think about these upcoming features!

                          Comment


                            Hi, Theokoles!
                            Could you help me please?


                            I have project in 4.24, where I've animated scene in Sequencer with WaterPlane and Ship, But when I opened it in 4.25, Surface of WaterPlane doesn't look as a Surface of WaterPlane from 4.24 project. And unfortunatly Surface of WaterPlane(4.25) dissynchronization with Ship.
                            What could have gone wrong with it?
                            Attached Files

                            Comment


                              Originally posted by Zipker View Post
                              Hi, Theokoles!
                              Could you help me please?


                              I have project in 4.24, where I've animated scene in Sequencer with WaterPlane and Ship, But when I opened it in 4.25, Surface of WaterPlane doesn't look as a Surface of WaterPlane from 4.24 project. And unfortunatly Surface of WaterPlane(4.25) dissynchronization with Ship.
                              What could have gone wrong with it?
                              I'm trying to replicate this issue.
                              How did you convert the project from 4.24 to 4.25? I recommend using the Migrate Tool, it worked quite well for me in the past.

                              Comment


                                Hello!

                                I just bought Physical Water Asset and I have a problem. The water looks OK in the editor, but totally red when started the game.
                                I figured out that it probably relates to my character as I don't get the issue if I use a standard spectator pawn.
                                Have you any idea what can cause this?
                                thanks

                                I have also a + question, how can I get beach foam? I have a lake with long beach and would be fine to get foams and some opacity in shallow waters.
                                Attached Files
                                Last edited by BigaCubensis; 07-02-2020, 01:08 PM.

                                Comment

                                Working...
                                X