[Community Project] WIP Weather & Water Shader

I think it is going to be fine with WaveWorks. I just checked the branch of 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.

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

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

Few things that I noticed, I apologize if 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 , it seems to get some 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? 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 is being caused by the light shaft occlusion setting on the directional light. Thoughts?"

Additional note: Would be to have the stars also animate during the night cycle, I saw functionality in the TruSky Plugin and it looked really cool even if it is pretty tough to see. I didnā€™t see 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 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 , 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 line from the ModulePath property:


get { return Path.GetDirectoryName(RulesCompiler.GetModuleFilename(.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 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 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 , knows of a better texture please let me know! For now I will try to adjust it in photoshop.

The light function 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 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 example and see if I can adapt it to something that might work: .unrealengine.com/latest/INT/Engine/Rendering/Materials/ExpressionReference/Utility/index.html#distancetonearestsurface

First off 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 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


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 ! :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:
https://.com/UE4-//wiki/How-to-add-to-your-project

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 + plugin + victory plugin. No snags.

PACKAGE

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 BP in it. Nothing else in the level is causing any crashes - it seems to be directly related to the BP.

Any thoughts?

Thank you very much !!

upgrade to version 4.12 please :smiley: