[Community Project] WIP Weather & Ocean Water Shader

Version for 4.12 has been out for a couple months nearly.


first: Nice Project. I hope you can help me. i placed the ocean into my level and i want to change the position and it doesnt work. i changed position but the ocean is still on the same position. i want to set the resolution scale and the positon into my level (i want the water into my swimming pool in my level). also i want that the waves are not so strong and the water is red. so my questions:

  1. how to change the position of Ocean BP ?? (Water)
  2. How to change the color of water ??
  3. how to change the waves (not so high/strong)

Im using unreal 4.11.2

thanks for help and sorry for my language i`m german :wink:


The project has now been updated for ver 4.12

Special thanks to LeFxGuy for helping out with recompiling the shaders for 4.12, and for the FlockFish fix!

The 4.12preview branch will be removed shortly as a new branch was added for 4.12 (it is now the default branch):

A new update will be merged in for the SkyDome update very soon, 4.12 got released earlier than I expected… :eek:


A quick note for those moving to version 4.12, Planar Reflections are enabled by default. There are some issues with them that I want to point out:

  • The reflection is applied to any surface with less than 20 degree slope at 400 units above, or below the ocean level. This includes Opaque and fully rough materials (DanielW will be fixing this in an upcoming release).
  • The reflections do not take surface displacement into account, meaning the panning normal maps are the only thing affecting the reflections. With a high enough distortion value, it looks just fine from most angles, but it can cause reflection of an object behind a wave to reflect in front of the wave with the camera at surface level.
  • Planar reflections are slower than SSR

There are more that I haven’t covered here, please see this thread for more info on the limitations currently.

If you want to disable Planar Reflections and use SSR instead, please do the following:

  1. Open the BP_Ocean blueprint from the Ocean folder and in the Components tab right click on the PlanarReflection Component and select delete. Rebuild the blueprint.
  2. Open the M_Ocean_Ultra material in the Ocean\Materials\M_Ocean_Versions folder, then in the details panel on the left enable the checkbox named “Screen Space Reflections” from the Translucency tab.
  3. Compile the material and you are now back to SSR only.


Hey guys, I’ve been trying to reduce the opacity of the ocean ultra shader on the shore, I’ve tried all opacity settings but they seem to do no good. Tried editing the material but can’t figure out how UE works on translucent materials. So I have a couple of stuff to ask you.

1 - Does anyone knows how to reduce translucency on the shore? I never seen an ocean that is so translucent as in the island map. I don’t want to change the scene depth parameter as that changes the water color on shallow areas.

2 - Also I still get the black spots in the water. I thought planar reflections would solve that and well…it did solve a lot of things…but the ocean still have some dark spots that I can’t get rid off.

3 - Also as many before me I can’t seem to tweak the wave settings to achieve the look I am looking for, there are WAY too many waves, it’s like every 2-3 seconds huge wave in the face. they should be slightly bigger but way less frequent, the only setting that seems to reduce the frequency of the waves in the wave cluster length and while that sort of works, there is still too many…overusing that setting causes tiny but really powerful almost tsunami-like waves that throws the player pawn into the sky and all boats get really funky.

4 - Perhaps related to 2 and 1, the waves are translucent, it’s a bit weird I can see right through them specially on foamy areas along with some black spots as well. Tried increasing the tesselation but that seems to break up the mesh leaving white (missing) spots on the ocean surface.

I’ve tried both planar reflections and SSR and the issue seems to be the same, even with the default settings.

can somebody confirm this issues or is it just me? I’ll keep trying to fix them if they exist, might be that I am doing something wrong in that case please enlighten me :slight_smile: I’ve read this thread from back to back and still can’t find a solution.

I’ve been comparing this to gta V water and while I think that technically our water is better (more realistic, better movement) the gta water looks better for some reason been trying to figure out why.

EDIT: Added image

Weird edge


This is my first post - I usually do not have the time to post here, unfortunately.

First off, this is a great water shader! Everyone here (especially the authors) has done a really great job! - I tried to create my own for months but I failed with extremely bad results.

I do not know if this has been discussed already. But I just upgraded this Ocean shader to 4.12 and I have noticed some strange behaviors with planar reflections that I do not seem to be able to get rid of…

Here is a picture of the problem:

I seem to be able to get rid of it by disabling the skydome(object) - However that is not really a good solution…

The same type of behaviour appears in the example scenes.

I tried to change to SSR instead - That works great, but I really want to test out the planar reflections :frowning:

Also the edge appears after a certain distance:

The strange water starts off at (0,0,0) and my custom water (with the correct color settings etc) is enabled outside after the edge:

With the skydome enabled (the strange water appears):

With the skydome disabled (my custom water is enabled and I get the result I want)

I am using a custom day/night cycle (not the one that is provided in the example) - But since I mentioned somewhere above (hopefully) that this also appears in the sample scenes, it can therefore not be anything in my scene.

Since I am doing other things I haven’t had the time to go deeper into this shader and see what is happening and how the Blueprints works etc… So that is why I am reaching out here first. Maybe this is all just one setting on my end and that there is a really easy fix - I honestly do not know.

I have tried recreating all the reflections using a capture object

Also, the planar reflection object does not inherit the same behaviour:

*Therefore there must be something with the water? - But what do I know…

The effect persists even if I use “move water with camera”:

I did edit some of the shader properties in the 4.11 version, but since the upgrade I haven’t touched it.

If I come up with a solution I will post it here (Or perhaps I have just messed up something somewhere and therefore I could be the only one who has this problem…?)

Best regards,

I came up with a SOLUTION:

Apparently the water was scaled to (x,y,z): 1.25,1.25,1.25

I scaled it back to 1,1,1 and now I have no issues whatsoever, anywhere - That feels great but… - I also feel stupid.

It’s set up for tropical water by default, I live in the pacific northwest so I know what you mean, the water can look much different depending where you are in the world.

To change it you will need to do 2 things:

  1. Adjust the shallow water color to be more blue, around here the ocean is dark blue on the surface and dark greenish-blue underwater. Adjust it to your preference.
  2. set the “Scene color custom depth” setting to around 500 to 1000, this will move the depth at which the water is fully translucent closer to shore.

Only adjusting the scene custom depth will not give you optimal results, let me know if this still won’t work for you, the shader can be modified further.

It looks like that is being caused by the foam texture itself. I’ll look into this some more and see if I can find a fix.

You’re correct, the waves are controlled by the OceanManager settings such as amplitude, length etc. Try these settings:
In “Wave Clusters” -> “0”

  • Length = 4500
  • Amplitude = 200
  • Steepness = 1
    Then change the Foam Wave Caps
  • Foam Caps Height to 200

If this still is too much, you can manually adjust each of the 8 waves that are generated by clicking the + sign on “Wave Sets Offsets Override”, which will create a new struct containing the default values for each wave. Try setting 2-4 of these to higher values, and the other 4-6 to lower (or even 0 for a couple of them) and you should get a better spread.

The tessellation issue has been fixed on my internal build, which will be released in the coming days. To get it to work you need to alter the materials quite a bit, and tessellation does look much better. I will push that update later this morning, the rest of the update is still a couple days from release.

GTA V uses the Tessendorf formula’s for their ocean (which is a combination of FFT and gerster waves), while this project is currently only gerstner. It’s possible to get really close to the GTA V look by (highly) customizing the materials, but at this time is not really possible to duplicate. FFT is very complex and requires a lot of code, but is something we are investigating.

Thanks! :slight_smile:

That fixed the whole issue? That’s great but at the same time means something is wrong, it should scale properly since it’s world position based. I’ll look into it and see what’s up. :slight_smile:

Not sure by the images, but the Post Process included with the demo project has Gaussian DOF turned on, which is set to show up at a certain distance (in the demo level the world origin is not 0,0,0 currently). In my project I disable DOF usually, not a big fan of it, but by default it will create a sudden barrier where the water looks fine then all of a sudden is entirely blurry. If you have the PP_Global in your scene, try disabling the GaussianDOF setting just in case that is contributing to the problem.

Thanks for the images, I’ll see if I can find out why that’s happening.

Great to have a reply from you DotCam!

That sort of worked, I wish I could keep the green tone with more opacity but I think I can manage it. thanks!

The foam is disabled on that screenshot, but it also happens when it has default settings right from github.

I tried that before, the problem is…I get less waves but with less amplitude. I can’t seem to get medium waves with less frequency. Either I have a lot of waves or very little but no amplitude.
Is this a gerstner wave limitation?

I wanted something like this

Maybe with a little more amplitude but about that frequency. I think it would be a bit annoying for the player to be constantly hit by a wave, but little waves are no fun :stuck_out_tongue:

I’ll keep messing around with those values.

Fun fact that I missed from the 4.12 changelog:

New: Heightfields are now represented in the global distance field, which is useful for fading out water normals near shores.


quick question from … page 1 … followup ?
The river thing was mentioned, and, i was wondering what ever came about for that? I have been waiting for someone to come up with a BP-driven river spline tool “forever”. lol
Kitedemo has one, kinda, and, without the documentation on it, kinda left pressing random buttons and seeing what happens (plus the water is terrible for “general use”)

I would love to see that too!

Would anyone have an objection to me packaging this is in a bundle, sort of a kick start to a multiplayer game? It would be free and open source and I would give full credit to you guys for all of your hard work of course.

The bundle would include a virtual Linux server and other free assets, to give developers a head start on a large multiplayer open world, that could easily be scaled and deployed to a more powerful server when it was ready for production. It would also provide some more scripts to make it easier to manage the server, and cook the project and deploy it to it. I always felt like an ocean should be included in the engine, like with Cryengine. I really like what you’ve done with the player blueprint as well.

How it would work basically, is users would create a new empty project in UE4, then copy a script into the new project folder, execute it, and it would integrate the Ocean Plugin and other content (foliage, materials, etc.) automatically, and then build a virtual Linux server using VirtualBox, so when the scripts are complete, they would have a fully functional multiplayer game with all of the bells and whistles. I may eventually be able to have it integrate with existing projects.

I’m doing this for myself really. I’m one of those guys that has started hundreds of projects and never finished one. But I thought others may find it useful.

Hi Quintela, Angrytoilet, I believe there’s a BP spline river system in this pack:

Along with a lot else, obviously. I don’t have the pack personally and not sure if it suits your purposes but it does exist. :slight_smile:

This being my first post in this thread I should take this chance to thank DotCam, TK-Master and all other contributors for releasing the ocean project to the community.

There’s a spline-BP river in the Kite Demo assets. It takes a bit of fiddling to make it look right but it works and is free.

One quick suggestion I have is to add an additional parameter to the shoreline foam that controls the overall foam opacity. Currently there are parameters to control the foam depth/softness etc, but for my project I would love to have the foam be present but not as opaque, to add a subtle amount of foam to a lake scene.

(If there is already a way to do this please ignore, I searched everywhere but can’t find this specifically)

Hi guys,
this looks so cool ! i really wanna try it out.
please help me i am totally new to all github related things.
once i created an account, how can i download a working example of the 4.12 version.
I really wanna try out the under/over water effect for a scene of mine.
is there a how to install guide somewhere ? or something similar ?

thx for all this crazy work on it !!

Hi there,
I keep checking back on this amazing project every few months and I have to say I am stunned by the work you and the community have done.
Can I ask a dumb question?
Why is it not possible to have this as a free addition on the marketplace? I assume it’s because it makes code changes and such and I don’t understand enough of the tech side to know how or why that’s a problem.
Is it not the kind of thing you could release as a plugin?

I only ask because I really want to use it but don’t want to get into the whole compiling side of it. A previous project I worked on I did a similar thing and the project ended up failing to compile and then I could never get it working again after that even when deleting the offending stuff. So I didn’t want to go down a similar route with this after months of work.
If it’s not too much trouble can anyone explain why we can’t have this as a download for blueprint only projects?

Thanks, and keep it up!

Hey dude, you don’t have to compile it, the github includes all the binaries you should be able to use it simply by copying the plugin folder to your project plugins folder. You can delete the source folder if you like I think it still works without it, on either case I don’t think it will compile it.

Now…I am not sure if it will work on a BP-only project because I don’t know how to “include” plugins in those projects…but it should work I think…sure the plugin has c++ code but it is compiled so it should work on a BP.

If you don’t need buoyancy stuff you can simply migrate the materials and assets from the example project.

hi, i downloaded the 4.12 version of it
sadly it doesnt work with 4.12.1
could you please upload a version for 4.12.1. i am really so curious to test it :wink:
sorry if this can be done be me, but i really have no clue about all this…