Physical Water Surface

This is the default phsyical water pasted into the default beach cliffs scene.

Also, the beach cliffs scene use a planar reflection, but the material isn’t compatible with forward rendering. I saw a mention of of improving existing water shaders with the physical water movement, but I also need the distance field masking. Is this possible?

Ok, so turns out that planar reflections was super easy (just tick the box in the material). :slight_smile:

I’m still interested in a way of fake extending the ocean all the way up to the skybox.

Please try to increase the HeightZoomFactor parameter of the WaterPlane Blueprint. Changing this parameter from 1 to 10 will increase the size of the water plane by a factor of 10. After increasing this value you should have a look at the running game in Wireframe mode to check if the mesh size of the water plane is still appropriate.

Thanks, that helped, but it made the water immediately around the boat very coarsely tesselated using any value above 5.

I’m using quite calm waters right now, so it works for me, but it seems that unless I missed something, I wouldn’t want to try this with larger waves.

Please have a look at the water plane mesh, it has an area with higher triangle count in the middle. The camera is always above this area where the triangle count is high, resulting in good looking water under normal conditions.
If you set HeightZoomFactor to 5, this means that the water plane mesh is scaled up by a factor of 5. As a result, the triangle size in the middle of the water plane becomes too large, resulting in the “coarsly tesselated” look that you describe.
To fix this, you need to modify the water plane mesh or create your own water plane mesh where the triangle size in the middle of the water plane is five times smaller than in the original water plane mesh that comes with Physical Water Surface. Then the water will look normal again (with HeightZoomFactor set to 5).

Thanks, I will have a go at this when I get the time!

Let me know if you have more questions!
I’ve used Blender to make the water plane mesh. Just create a plane and then use the Subdividetool to add more faces in the middle of the plane.

Physical Water Surface - Quick Tips #3: Events for entering/leaving the water

Did you know that Physical Water Surface provides events in the Buoyancy Blueprint that are triggered when an objects enters or leaves the water?
This can be very useful for performance optimizations in case you have a large number of objects and only some of them are actually floating in the water. With this events you can easily disable any Blueprint code that doesn’t need to run when an object is not floating.

events.PNG

Quick Question on something, i have a world with a complex ship object that the player stays on for most of the level, having the ship move at cruising speed can cause problems with performance and player issues.
A method that seems to work well is program the ocean and world to move by using level sequencer or Matinee. I created a cube that i attached the ocean and sky too, and in the editor it seemed to work fine. But when playing the level, the ocean does nothing and stands still, is there something im missing?
Any help would be appreciated!
world.PNG

First I would like to recommend to you to investigate with the UE4 profiling toolsif you can find out the reason for the performance issues when moving the ship at high speed. I’ve never encountered this, and fixing the performance issue might prove to be easier than to move the ocean and level as you suggest.

If you want to move the ocean and level, please consider the following:

In the Water material you can see that the AbsoluteWorldPosition node is used for the coordinates. This means that if you move the water plane, it appears as if the water (waves and textures) don’t move and remain at the same location. To make the water actually appear to be moving with the world, you can try to replace the AbsoluteWorldPosition node with a Panner. Please note that in some of the Material Functions the AbsoluteWorldPosition node is also used, it needs to be replaced everywhere.

Please also have a look into the EventGraph of the WaterPlane Blueprint. You will find the Blueprint code responsible for the InfiniteOceanSystem. If enabled, the InfiniteOceanSystem could cause movements of the water place that are not desired in your case.

Will do, thanks a bunch for giving some ideas!

Will let everyone know what solution i ended up going with to help others in the future.

Does this work with Tropical Ocean Tool? I would like to keep the underwater, auto beach material wetness effect, and automatic landscape detection for proper wave generation if possible. Since 4.23 it includes infinite ocean too.

Some manual work will required for sure to make it work together. I don’t have access to Tropical Ocean Tool, so I can’t say exactly how much work it would be.
From this tutorial you can get an idea how Physical Water Surface can be combined with other water materials. It will probably be a similar process to use it with Tropical Ocean Tool.

Hi , do you maybe have some suggestion on how to achieve something similar to this?

The page does not exist, can you point me to a guide, or briefly describe steps, thanks.

Here is how I would approach this:

  • Make your own water plane mesh with a hole
  • Disable the infinite ocean system (otherwise the hole would move with the camera)
  • To get the effect of water flowing into the hole, have a look at this free asset. It has a setup for water flowing down rocks.
  • Add particle systems for the foam falling into the hole, and for the smoke rising in the middle.

Let me know if you have questions about any of these steps!

I’ll clarify this and let you know when I have more information.

Thanks for your input , I actually used a stencil render depth mesh to mask out the ocean layer, and disable the boat buoyancy, and player swim and post process volumes at the hole … https://twitter.com/LegendsofEpica/status/1199781224065249280

That’s also a great method to make the hole in the water surface. Actually, there are many diffferent methods to achieve this. Another method would be to use Mesh Distance fields, similar to how the water can be made invisible inside of boats.

So I’m still having trouble with reflection probes showing reflections from my (static) boat all the way on the horizon…

Anyone have any tips for how to get the water to perhaps only reflect the skybox? (Using the default one with the slow moving clouds built into the engine for now.)

Physical Water Surface is compatible with the latest engine version 4.24. Please let me know if you should encounter any problems.