[Community Project] FREE Ocean Water Shader

That’s very different to community project, community project uses thrusters.

Going to give a look into this during the week.

Finally at the stage to start implementing water.

Have tried several shaders but sadly have not found one that seems to fit.

Ultra is too reflective and recourse intensive and the other shaders seem to have this “black” spot issue or i have no way of controlling the water. Im also wondering if a way has been found on shrinking the ocean to a certain size yet?

Yes you can turn off infinite ocean and set the mesh size of the ocean. If you keyword search the old, now locked thread you can find some answers to most questions you might have.

@Dreamcastgamer The Infinite Ocean System just scales the top mesh (the below ones aswel) which is a circular plane with more vertices in the middle and less vertices around borders. There is one approach to make a smaller plane without touching a single line of C++ code:

  1. create a substitute circular plane mesh with equally distribution of vertices (otherwise when near the border of the plane several artifacts are seen at the waves)
  2. in the Infinite System portion of the details panel there are two settings: Scale Min and Scale Max (default values are respec. 1 and 45 times) which you can use very small values like 0.2 on both
  3. the setting Follow Method should be changed to Stationary

Remember that, if you are inside a boat and travelling you need to have the Follow Method changed back to Pawn or Camera and probably have the Scale values changed to something different.

Another approach possible requires changing the C++ code for you to specify that you don’t want the scaling at all, but this would still need the Follow Method to work (otherwise you will need it ahead) and the circular plane will still have to be made to offer a better look near the borders.

@Dreamcastgamer besides above, the performance is only an issue on open sea, where the ocean becomes a large area and the planar reflections becomes a heavy cost. At land you can try to occlude whenever you can parts of the ocean providing a cove and some hills around the cove, unless you really need a free beach for some reason. If there is a harbor, some building will help occlude portions of the ocean ahead, and improve performance (less things to show).

Having a smaller plane hardly will improve much the performance, but certainly will have some percentage in gains.

Thanks everyone for all the help, will play around with it in the future and share the results here

Jumping into the thread. Tested the plugin a couple months back and checking it out again. How hard would it be to apply the ocean to a sphere? Any suggestions?

Keep up doing God’s work,

Best,
Max

Was able to figure out how to limit the size and shape, thanks a bunch!

On a side note, i was curious about the foam.

In order to try and improve performance, i have been trying the shader “Ocean w/ SSR & Foam” as it looks fantastic but not as intensive as Ultra.

However i have been unable to get any foams to appear period to it, im wondering if there is something special you have to do in the foam settings or is it only available in Ultra?

@Dreamcastgamer I think something is indeed wrong with foam there. There is no change that makes the foam caps to return. It will be necessary to compare M_Ocean_SSR and M_Ocean_Ultra and seek what the difference is. It is sort of a hack, but you can select in BP_Ocean the Ultra, edit the M_Ocean_Ultra and enable SSR and Forward shading, also break the connections inside the BP_Ocean which turns on the Planar Reflection component and see if it will gives the performance you want.

I am without a bit of time right now to do the experiments.

Figured it out, just started working for no reason :).

One last set of questions, so when i implement the smaller ocean, that is located in the same world as my main ocean, it seems like the two mangers collide with each one consonantly overwriting each others property’s.

While it might sound a little weird why im doing this, its because i wanted to add some more turbulent water to one section, but like i said it seems when i start editing settings it seems to mess with the other ocean.

Also when i did a test render today, it seems like some of my particles where being overwritten when the camera moves to view it with the ocean, just wondering if this is a known problem or not (as shown in the photos)

The Ocean was not made two work with two or more instances since their material share a Material Parameter Collection, having two or more instances will collide doing changes on this MPC. Use the Ocean for the Ocean and use something different for river or lake, like the free Water Materials from Epic.

For the particles you need to increase the value for Translucency Sort Priority in the details panel for such particles. The default value for all assets are 0, I even think I have made the Ocean planes being -1 so it would be bellow anything else already.

Thanks again for all the help!

One last question (hopefully will be the last one :slight_smile: )

The last few weeks i have been playing around with the wake blueprint located in the project, i know you did a great video of fixing it with the boat pawn, however i was wondering if its possible to have it function on its own without a pawn?

I have been playing around with making the blueprint spawn on its own forever but have not been successful, i have a actor im controlling in Matinee that needs a wake so it seemed like the perfect solution due to how well it works on the fishing boat.

Was just wondering if its possible at all

@Dreamcastgamer some posts ago @SpartanDevTeam asked if there is a way to control the boats using AI, which in theory would accomplish what you want, I didn’t have the time yet to look into this and I am not sure if I will soon, because me and my associates are working hard to have some projects in a state of seeing the light and this + the new changes in the engine 4.22 are driving us crazy.

My advice is to consider looking for AI tutorials, first in the Epic’s resources/Youtube videos, and then other Youtube videos from 3rd parties. The thing in AI is that you will have a player controller that exists for the purpose of an AI and you will construct behavior trees that will tell which inputs will be directed to the actor (boat) through that player controller AI controlled. Following this concept is the same as bots used in AI shooters, but the input redirected to the actor would be different then ones accepted by the boat actor.

In the video I made to fix the wakes at old versions, you see that the current player controller using the 3rd person character after pressing ‘E’ starts to control the boat, becoming the boat (we call this possession), and all your input via keyboard is not redirected to the boat instead. You can see that the 3rd person character is still there at the boat, but can’t move during the boat possession even if you press keys that otherwise would make it move.

Hey there,

I’m currently using the free ocean material for a personal project of mine (which is very good - thank you so much for making and sharing it with the community!) and an explosion particle effect pack from the UE4 Marketplace (specific one can be found here: https://unrealengine.com/marketplace…-big-explosion).

However, whenever I use both the ocean and the explosion particles together in the same scene, the explosions are not rendered unless I turn off the water’s transparency. I tried changing the sorting orders for both the ocean and the particles in the scene (as you suggested doing in one of your videos here: UE4 - WIP Community FREE Ocean project and translucency sort hint - in the video Cloudscape Seasons - YouTube), but it still didn’t work. The only solution I can find to getting the particles to render over the ocean is by making the material it uses (I’m using the “Ultra” one) set to opaque, but then it loses some of that subtle translucent detail when objects are beneath the water.

Do you know of any way - besides changing the sorting orders (already tried that and it didn’t work) - to get them both working with each other? Or why the sorting solution didn’t work for me and how I can get it to work? Any help would be much appreciated!

Opaque Ultra Water


Translucent Ultra Water

I have made some tests here, and I have tested with the packages Fire Builder and Explosion Builders, both from W3 Studios and available at Marketplace and they work fine against the ocean. It might be an issue with the material of those particles and they are all set to Translucency Sort Priority = 0, since the ocean planes are all = -1, and this is supposed to work.

I would ask the particle system creator you are using on what is happening that it is not drawing (sorting) against the ocean translucency in the condition of the sort priority as explained above.

Sorry if I can’t be of more help on this.

That’s no problem, thanks for the answer! I’ll contact the author of the explosion pack for any info on how I might be able to fix this issue I’m having.

Water looks amazing! Nearing completion on this project, thanks for sharing this great asset to the community

How to setup the Fish Manager of the OceanProject Ocean Shader Plugin? Since I did not find this entirely conveniently to setup, below is an example.

Place drag the BP_FishManager to the Ocean surface, then use that location Z value for the Max Z value inside the BP_FishManager, then drag down to the lowest point you want fish spawned, and use that Z for the corresponding Z Min value.

Minimum value corresponds to the highest Ocean point fish should spawn/swim, Max value to the lowest point, or greatest depth.

Since this was an user contribution long time ago, before I even started looking into the project, I am not familiar with it, give me some time to look at it and I will let you know. I am almost sure there was one map with it setup, but I might be wrong.