Download

[Community Project] WIP Weather & Ocean Water Shader

I think it is going to be fine with WaveWorks. I just checked the branch of GalaxyMan2015 and he has displacement readback, so buoyancy is ok. Also with the (somewhat) old Nvidia WaveWorks branch there are enough references how it is done.

this here gives me a lot of hope that it can be done with some source code knife work.
https://forums.unrealengine.com/showthread.php?109551-Thousand-ships-Unreal-Engine-4-with-NVIDIA-WaveWorks

This project is amazing! Really enjoying the results so far :slight_smile: !

Few things that I noticed, I apologize if this has been mentioned/discussed before but I tried to search through the 30+ pages and couldn’t find anything relating to the following issues:

-Our “cloud” light function that we have been using on our map doesn’t play well with the ocean, it seems to get some extreme stretching/artifacting going on when it’s applied to any directional light in the map. Granted, we may be moving to a different time of day cycle system with volumetric clouds that cast shadows in the future, but I was curious if anyone has had similar issues with the setup? This was occurring with or without the current sky dome that is implemented in the island test map, so it feels like it’s something that has to do with the directional light and water blueprint and not related to the sky blueprint.

-The nightsky seems to have strange issues with the exponential heightfog in our map, where it will fade in and out depending upon the players viewing angle, if I look towards the ground it will fade away, and look back up it will return. It seems that this is being caused by the light shaft occlusion setting on the directional light. Thoughts?"

Additional note: Would be awesome to have the stars also animate during the night cycle, I saw this functionality in the TruSky Plugin and it looked really cool even if it is pretty tough to see. I didn’t see this on the trello page but figured I would mention it in case it wasn’t planned yet.

Keep up the GREAT work guys! Looking forward to seeing where this project goes :slight_smile:

Anyone know the best way to address the warning about the plugins build.cs file?

Plugins\OceanPlugin\Source\OceanPlugin\OceanPlugin.Build.cs(8,44) : warning CS0612: ‘UnrealBuildTool.RulesCompiler.GetModuleFilename(string)’ is obsolete

That has already been fixed in the 4.12 version on GitHub, it’s just a deprecated warning.

If you want to fix it yourself (you will need to recompile the plugin) go to Plugins\OceanPlugin\Source\OceanPlugin\ and edit the file named “OceanPlugin.Build.cs” by replacing this line from the ModulePath property:


get { return Path.GetDirectoryName(RulesCompiler.GetModuleFilename(this.GetType().Name)); }

with


get { return Path.GetDirectoryName(ModuleDirectory); }

If you are planning to upgrade to the 4.12 plugin version when it is released, then don’t worry about it. it will not affect you whatsoever in 4.11 :slight_smile:

Nice, thank you. I thought I had compared in github but I must have hit 4.10/4.11 or something :expressionless:

Hey, glad to hear you are finding it useful!

Thank you for those suggestions! I am partway through a total re-write of the skydome that will hopefully be ready for the full release of UE 4.12 (the dynamic sky part at least, weather will take a bit longer), with accuracy being the main focus. Rotating the stars should be easy enough, and it would add a lot to the realism. I will be working on volumetric clouds next, currently finalizing the phases of the moon calculations.

The milky way is too bright on the stars texture I’m using, you have to be in the middle of nowhere to even see the milky way at night, light pollution makes it difficult to see. If you, or anyone else reading this, knows of a better texture please let me know! For now I will try to adjust it in photoshop.

The light function issue might be caused by the underwater caustics light function (in BP_Underwater). I will test it out to confirm on my end, but overlapping light functions might not work right.

I’ll get back to you after I test it out and see what’s going on. :slight_smile:

Any suggestions on how to block out the water inside a small boat?

https://s3.amazonaws.com/uploads.hipchat.com/404135/2480206/Yk748Hijbb1xHco/upload.png

There’s a new map for doing this see my posts a few pages back for the actual implementation

Hmmm, I took a look at the capsule mask implementation. If I’m understanding it correctly it seems like it would only work for tracking one object? Instead, would it be possible to somehow use the info on where the foam edges of the water are being drawn to mask out the appropriate area? So if we have foam edges of the water close to/encompassing one another, then mask out that inside area…hope I’m making sense.

https://s3.amazonaws.com/uploads.hipchat.com/404135/2480206/yFsfcX05koSg4hX/upload.png

That’s my goal eventually and in sure a lot of people’s but no community implementation exists yet. Fancy bpfunclib nodes and custom material nodes are needed most likely.

I’m going to take a look at this example and see if I can adapt it to something that might work: https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/ExpressionReference/Utility/index.html#distancetonearestsurface

First off this looks amazing and I’m excited to use it. Second sorry but I’m still kind of new to using Unreal. I opened the project that came with this and then tried to reproduce the water in my own level but could not get it to work correctly. Does anyone have a tutorial or video kind of walking through or explaining any of the process. Once again sorry but trying to learn :slight_smile:
Thank in advance.

I had to comment

in order to compile it again under 4.12

facc5843d51aaa7de6702fcd599b5a2de6b2f66c.png
you need to change the signature of the Overlap functions, like shown in the image as an example :smiley:

from the release notes:

“PrimitiveComponent delegates OnComponentHit, OnComponentBegin/EndOverlap, and OnComponentWake/Sleep have all had a new parameter added to allow binders to know which Primitive Component the event occurred on in cases where a single event entry point is bound to multiple Primitive Components.”

As I mentioned in the PM, thank you for looking into this! :slight_smile:


@All

I will be recompiling the plugin with these (and some other) fixes and push a proper 4.12 release branch asap!

We made a wiki post about that a while back, here’s how to do it:

Dont forget to enabled the settings in project settings for planar reflections in 4.12 guys.

took me just under an hour to update to 4.12, change project over, and recompile source code + ocean plugin + victory plugin. No snags.

PACKAGE ISSUE

I’m using 4.11.2.

I have a level with Ocean_BP & Underwater_BP going on. It runs fine in the editor. It packages properly. But the packaged file crashes once I load the level with the Ocean BP in it. Nothing else in the level is causing any crashes - it seems to be directly related to the Ocean BP.

Any thoughts?

Thank you very much DotCam!!

upgrade to version 4.12 please :smiley: