[Community Project] WIP Weather & Ocean Water Shader

I think Titon water by sundog studios is a good source of ideas. They were what we were going to use in Unity but its a 500$ asset, its used by the Navy and such. It has rotar wash, prop wash, bow waves, wake waves, kelvin waves (wikipedia it), infinite ocean and a basic underwater system but no weather system apart from wind speed and heading and its all written in c++, closed source unfortunately.

They also have a decal system they call it where things like oil slicks or kelp can be instantiated on the surface when needed for example I could say if my boat is damaged it would instantiate “oil_slick.tga” blended over the ocean shader.

It should be noted, the Unity Community Ocean Project has been going on for years… since 2011 or so, and like I said you guys have already matched it and in some areas surpassed it.

Hey Johnny,

The 0.2 version does not have the Underwater PP volume by default, and that PP material was a quick test at the time. If you want to set it up and give it a try you will need to create a PP Volume that goes from the ocean surface down to the bottom, and then make these changes in the Details panel:

  • In the “Post Process Volume” tab at the bottom, make sure “Unbound” is off, and set the “Priority” to 1, and then the “Blend Radius” to around 50
  • In the “Blendables” tab add a new element and select the Material Instance version (M_Underwater_PP_Inst) so you can easily modify the values such as color etc (can’t remember how many values are in that version, might not have very many)

Hope that helps! New one will be out shortly :slight_smile:

Hey that’s awesome news man! Thanks for the update. Hope the prototype goes well! :slight_smile:

As far as the dev grants, I had not even thought about it for this project. I am not sure what to say at the moment, it could be beneficial at some point to purchase assets or something like that, but it doesn’t feel right to me. I want this to be from the community for the community as much as possible. There have been many people willing to help out (like you! thank you for that ;)), and I want to keep it all open source which might not be possible with licencing code of some kind etc, when money is involved it complicates everything…

Thanks for mentioning it though, and I will give it some more thought. I will leave it open as a possibility in the future i if it is needed.

Ah ok thanks for mentioning which one it was. I actually looked over their project (and downloaded the standalone demo to try out) as I was researching other projects a while back. I am pretty sure they use the Tessendorf FFT model for creating the waves from what I have seen, which is something I want to add in the future as a long term goal.

Most of those features will get implemented in this project at some point, I don’t know whether Kelvin waves will make the cut, but who knows. :wink: Once this next release is out (any day now) I will be working more on the code side to add in more interaction, this one upcoming is mainly appearance related fixes and a few more base features.

One thing I wont add to the project though is a price. It may not end up with as many features as the paid systems, but hopefully it is still a good starting point for those wanting an ocean in their project, and will always be free. :slight_smile:

One last note here, since version 4.7 was just fully released I am wondering which you guys prefer for the download. Are many of you planning to upgrade or already use 4.7? Or are most of you still using (and will use) 4.6.1?

I will provide a link for both versions, I’m just wondering what your preferences are going forward.

Thanks everyone! :slight_smile:

I’ve been primarily 4.7 for over a month now - due to it’s excellent VR dev workflow (VR preview mode). So definitely a vote for 4.7 for me :slight_smile:

4.7 please!

I just updated my project to 4.7 and a bunch of stuff is broken. At this point I think I will remake the OceanManager in pure blueprint and use the new blueprint components to make buoyancy components. Will lead to easier integration with no C++.

Our school is currently using 4.6, so I’m sort of forced into that boat atm :stuck_out_tongue:

My vote is 4.7, Gotta take advantage of all the sweet new stuff 8]

Hey Handkor!

I have managed to find a way around that issue in 4.7. They made a lot of changes to the UMovementComponent class to add in the blueprint functionality, with the specific change being the UpdatadComponent property going from a UPrimitiveComponent to a USceneComponent. The USceneComponent does not have access to the linear/angular damping functions, which is the only problem that needs to be fixed.

Luckily they must have foreseen this being an issue and added a new UPrimitiveComponent based property named UpdatedPrimitive. To fix up the code just replace each of the UpdatedComponent values throwing the error and replace it with UpdatedPrimitive, everything compiles and runs the same as before.

But I do agree with you on the blueprint components, I was planning to work on that once I get a LOD system working. For a head start on it I will zip up the nearly complete OceanManager blueprint later on (it is also in the original download). There are a few functions that will no longer be necessary, but the creation of the Gerstner waves is basically done.

Yeah I found the fix for the code easily but I mean the rest of my project is screwed up, not the ocean part. I figured if I restart that whole project I might as well rewrite the gertsner wave in blueprint too.

I’m on 4.7 so +1 for the the new version and any new features that it brings although I havnt even tried it yet. I JUST updated my subscription yesterday and compiled it last night. Cancelled my Unity subscription today. Going to test your setup this weekend (if I can work through the version bugs).

I want to get on board with you on this I already have working AI ships in 4.6 using your buoyancy method. However I’m running into small issues of acceptance radius for triggering movement to a new way point. But other then that its working, the Ai is moving to the way point. I made a change to use the capsule as the buoyancy effect object rather then the mesh, but now I’m thinking about how the mesh use to trigger the way point just fine in my flying drones. I’ll let you know where I’m at later in the week. But keep me up to date with your progress I would like to see it work in blueprint, I know the complexity of your C++ and how it makes things easier to construct the functions you need so I wish you luck on using the function BP method.

I’m going to try starting a project with this today for my Submarine Simulator game. Any tips for using 4.7/4.7.1?

Hey DotCam,

Firstly, thank you so much for this contribution to the community. Amazing work!

I saw on your Trello that you have the Ocean shader as a plugin in the completed section of Trello. Does this mean its available?

I may just be looking in the wrong place, but wanted to check.

Thanks agin for all this hard work, you’re a hero!


For 4.7 you will need to change the code slightly as mentioned above in my reply to Handkor. To make this even easier, download this zip file and extract the “BuoyancyMovementComponent.cpp” file into this folder:


and choose yes when it asks you if you want to overwrite the file. With that in place launch UE 4.7, browse to the OceanDemo folder and open the *.uproject file. It will ask you if you want to convert in place or create a copy, either way is fine if you don’t plan to go back to 4.6.1, and it will then compile the code and open up.

Let me know if you run into any problems, it should work just fine though. :slight_smile:

Hey Andy,

It is not out yet unfortunately :(… I’m trying to get an LOD system operational first but might end up releasing it earlier without if I can’t get this to play nicely. I moved those features into the Completed section but should have noted it was completed *for the next release (I will try and have it out this weekend).

Sorry for the confusion, just ran into some issues. Thanks! :slight_smile:

I’m curious and havnt read it anywhere… other than yourself DotCam how many other people are committing to the project?

Hey man,

As far as dedicated to the project, it is currently only myself, however I have received contributions from quite a few users to the project. Handkor has provided code to the project, Tk-Master has helped out with the material, Komodoman has offered his Fish Flocking AI as well as a bunch of different fish species for the underwater portion. There have been many other small contributions from others as well.

I am open to any and all help with the project as I am not always able to give my full attention to this as much as I would like. I do want this to be a community project, and have thought about moving everything to GitHub to allow more collaboration. Any ideas are welcome, and would love to hear any/all feedback on how to make this better for everyone.

Thanks! :slight_smile:


great job on the water, I really like it so far. Also the plans you have for it sound great.

I copied the water over to my project and it looks great, but I just have one issue, like you can see in the picture, in a certain radius around my island, the water gets those open spaces. On the left side, its alright, but on the right you can see where the radius starts.

I have not found a way to fix this yet. Hope you can help me out with it :slight_smile:


Thanks a lot and keep up the good work :slight_smile:

GitHub is a great idea. You can have a release branch, a release candidate branch for accepted merged contributions, and a working branch for the public. Anyone that wants to make contributions sign up and they clone the repo then when they make a change(s) they commit it to the repo with a note of what they changed and if you or another admin doesnt like it, you revert to the last commit. I’m using it for my project and it works great.

Id suggest that to get more people on board and to centralize all information (Readmes in every directory, a wiki, bug tracker, comment system, unlimited storage space, backup system, revert/apply changes at will, contributors of admin or user status, multiple branches) you know how it works im sure. Once I get my project files from Unity all switched over to Unreal I plan to make many additions especially to the underwater system and fluid dynamics and would love to share them.

Over on the Unity community ocean shader project they had 3-4 people each with their own github and then people would make their own changes and upload the project to their own github or mediafire or something and it was a mess. Centralization is key, especially for open source.

With the engine being free… expect some people with skills (and some idiots) to start flooding this thread. I’ll be making a persona githubl branch for it even if you dont lol. Currently working on modelling an important sub with really tricky lines though.

Yeah man I totally agree, if you can help me out to keep the project up to date and how to make changes to the GitHub version, I will do it asap. I know how to use Github to fork UE4’s repo but I haven’t set up my own version before.

Sorry for the late response, been trying to keep up with the huge flood of messages to be moderated… I have never seen anything like this, it’s just nuts…

I created the repo so a while ago so I just need to upload the files to GitHub, might need to wait until tomorrow. Here is the link so far (its empty :p)

GitHub Link - GitHub - UE4-OceanProject/OceanProject: Environment Plugin Project (Ocean Simulation, Sky Simulation, Buoyancy, Time, Fish plugins for Unreal Engine 4)

I’m not all that great with github yet, but hopefully that will just be temporary :slight_smile:

@LandsHeer -

That looks to me looks like the plane mesh was scaled too large, or that you are using the Mesh in your scene instead of the Blueprint. Double check you are using the BP, and if not, use the BP instead :slight_smile: