Physical Water Surface

Check out these videos by Scorpion Venom Studio Games about using Physical Water Surface!

Note: During most of these videos the water looks a bit strange. As far as I can tell, this happens because two water planes exist in the level at the same time. At some point in both videos the additional water plane is deleted, making the water surface appear normal again.

watch?v=wLQ9QSJfQsg

https://www…com/watch?v=fEUoAlZz-zo

Hi,
Could you help me please? I’m making a previs and want to animate waves via sequencer, because I need to have similar waves each time when I start the play. This is necessary in order to record some cameras from boat, for example.

I already tried to replace node “Time” with Scalar Parameter in GerstnerWaveCum. And when I did it - waves really changed via sequencer, but buoyancy of the boat controlled via second invisible wave.

How can I animate waves which include buoyancy effect via sequencer?

In my experience, the wave motion is exactly the same each time the game is started. I’ve noticed this when I produced the videos of Physical Water Surface for my channel.
The explanation is this: The wave motion depends on the Game Time. The Game Time starts always with the same value when the game is started.
Please try this (with an unmodified version of Physical Water Surface): Load the DemoMap Level. Click “Play” to start the game and observe the motion of the boat, then stop the game after a few seconds. Then start the game again and observe again the motion of the boat. You will see that the motion is exactly the same.
So I think you don’t need to do anything, the waves are already the same each time the game is started.

Thanks, Theo! Your advice was very helpful!
I decided my issue in this way:
I animated Time in GerstnerWaveCum via Scalar Parameter in sequencer and than record movement of boat via Take Recorder in run-time. This setup allowed control and observe movement of the boat in the editor(not in simulation). Also this is useful for camera animation for previs.

But I have one more question:
when I ran my project with RTX, waves have strange noise mask effect . I think it happens inside “WaterMotion” node, but I don’t know how can I fix it.
Could you tell me please, is it possible to fix this noise on the water if RTX on?
I use UE4_4.24.3
Annotation-20200312-001159.jpg

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 [EMAIL=“therealtheokoles@gmail.com”]therealtheokoles@gmail.com

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.

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.

Hi ,

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.

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.

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

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//PhysicalWaterSurface/wiki#compatibility-with-orbit-weather-and-seasons

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.

I’d like to share some news about my progress with 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, this feature is not yet included in Physical Water Surface at the moment.

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.

Please let me know what you think about these upcoming features!

Hi, !
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.

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.