Download

[Community Project] WIP Weather & Ocean Water Shader

This ocean is really exceptional, fantastic!! I am using it for a VR project, and everything looks perfect until i turn on instanced stereo rendering, then stereoscopy on water is messed up.
Anyone got this working with instanced stereo rendering?

Hey all, been a while, how’s things? :smiley:

I just pushed a couple new branches to Github, first one was a 4.11 branch which had no changes since the 4.10 branch other than recompiling the plugin for 4.11. Second one is the 4.12 preview branch (requires 4.12 preview 3) with the new Planar Reflections that were added by Epic.

The PlanarReflection scene actor also comes as a blueprint component, which has been attached to the BP_Ocean blueprint 360 units above the surface and scaled up to cover the whole plane. Performance did take a bit of a hit, but considering the increase in quality it is well worth it (not a lot, only 5fps on my machine).

Anyone who is interested in using the 4.12p3 version should read up on the limitations so far, and also a bug that affects editor performance when adjusting parameters (not in game). This is just an initial commit with the base feature implemented, any fixes that arise will be added as possible.

Let me know how it goes if you try out 4.12!

Hes alive! And here I was going to trek across the mountains in search of the elusive Dotcam.

Excited to take a look for some demo screenies for my game… I was going to sleep after 24 hour coding fest for a fire control system but no DC just had to give us a tease, compiling 4.12p3 now and donwloading your commit. :smiley: Thanks!

I’ve got a team member working on FFT’s still. progress is slow but steady.

4.12p3 will crash continously with the shader files when compiling defaultgridmaterial if you dont run a regular template project and compile materials before opening oceanproject preview

Edit: still crashing, verified engine to replace shaders to default, ran a first person template and made sure the material in question was compiled, saved/closed, ran fresh project and
shadercomilerworker.exe loads up the cpu like youd expect and project gets to 45% thenc rashes.

Preview versions for a reason.



Fatal error: [File:D:\Build\++UE4+Release-4.12+Compile\Sync\Engine\Source\Runtime\Engine\Private\ShaderCompiler\ShaderCompiler.cpp] [Line: 1559] 
Failed to compile default material /Engine/EngineMaterials/WorldGridMaterial.WorldGridMaterial!


Actually it runs on stock shaders I’ll assume they havnt been rewritten for a preview version. Woo multi post

Hey Nsomnia! How are you doing? Good to hear from you!

Yeah I was just going to reply with that, shaders will need to be updated for each version. I actually haven’t even tried them in 4.11 yet, should probably get around to trying that. :slight_smile:

The Shaders were updated by TK on the 4.11 branch, but for now anyone wanting to use 4.12p3 just ignore the optional shaders, they will be updated for the full 4.12 release.

There are some big changes from 4.11 to 4.12 shaders so itll take someone with smart slike TK. I might lookinto it because I love this look.

Heres a demo screenie, feel free to use it.

When building from source using the code from GitHub I get a lot of errors regarding “Property is exposed to the editor or blueprints but has no Category specified.” I was able to fix it by going through OceanManager.h and adding a Category argument to all of the UPROPERTY definitions, and everything then built fine. Just a heads up if anybody else is getting this error.

Hey TK. Want to take my ShipFwdVector to FVector X return float angle in degrees code and create an entire bpfunclib for me (and everyone else :stuck_out_tongue: ) that does trig and vector math. Rama could add that too.

Rotations make no sense to me in ue4 versus unity/blender/maya etc.

Just for the record, this will remain free once its released right? Or is it going commercial?

I had this problem too, but mine is not compiling still, i have this error, UnrealBuildTool: LINK : fatal error LNK1181: cannot open input file ‘E:\Program Files (x86)\Epic Games\4.11\Engine\Plugins\OceanPlugin\Binaries\Win64\UE4-OceanPlugin.lib’

Any ideas?

That tells me it’s not linking but is compiling. Check your write permissions and make sure your using vs 2015 as administrator and check your UFUNCTION() tags

Tried what you suggested and everything is fine, but i do NOT find that lib file anywhere on my system, or the github repo?

You don’t install the plugin to your engine folder, it needs to be in your projects folder for it to work. Just create a Plugins folder in your project if there isn’t one already there and copy the files in. You will need to remove it from the Epic Games\4.11\Engine\Plugins folder first though.

If you are compiling from Visual Studio, ensure your build config is “Development Editor” and “Win64” to use the plugin from the editor. When built there should be a DLL and PDB file only.

Yes it will, and will always be that way. This project is from the community, for the community. :slight_smile:

It is already released but is still a work in progress, as in more will be continuously added. But is a full working project already.

Its created locally shouldnt be in that directory either

Awesome! I was hoping that was true.

Anyways, keep up the best work mates! I love this ocean thus far!

Is there any way to use the custom stencil with other objects that have custom stencil values? When my character who has his own custom stencil goes underwater, the underwater effect doesnt apply to him.

DotCam, TK-Master and all contributors, why not give WaveWorks a try to check the performance of their FFT method.
It turns out that Nvidia has a UE4 WaveWorks branch.
https://developer.nvidia.com/nvidia-gameworks-and-ue4

The stencil buffer can be used for many things, like object outlines and whatnot so you basically have to choose what it is used for, unfortunately you can not have both at the same time without interfering with the underwater post process in some way.
Ideally we would want the ocean mesh to write in its own texture/buffer so it doesn’t interfere with the stencil buffer but that that’s easier said than done :stuck_out_tongue:

You can try to enable/disable the custom stencil flag on your character based on where the character is (relative to the ocean surface for example).

There are 2 main problems with WaveWorks (meaning there are more problems that I will not go into in this post :p).

  1. It’s not a plugin, it’s integrated into the engine… maintaining a custom engine branch is not exactly convenient :stuck_out_tongue: neither for me or for the users.
    There is GalaxyMan2015’s branch (kudos to that guy btw!) but he is a community member, not an nvidia employee so it is not guaranteed if and when his branch is going to be updated (right now it’s still on 4.9, so you can see what I mean).

  2. It has been pretty much abandoned by nvidia (the official branch hasn’t been updated for over a year), there is also functionality that hasn’t been exposed into the engine (like height readback, which is essential for buoyancy).

So right now, I would say WaveWorks is pretty much out of the question, you are much better of using my custom VaOcean branch which has FFT and height readback working… with some performance problems that is.