Download

[Community Project] WIP Weather & Ocean Water Shader

Looks awesome! Can’t wait to update and check it out :smiley:

Awesome, you are a true Champion :smiley:

Thanks TK.

I’m starting to think as I pour though my C++ lessons and get more comfortable with it before I make the jump to the UE4 api, could we start designing some of the systems like weather in a public google doc or something? Some psuedocode and references and ideas and such.

I’m stuck on my project ATM till I can mask the water out of boats but would love to doodle with everyone on ways to acheive the project goals and I can create debug widgets all day long, my specialty.

edit:

(hope that helps you a bit Nsomnia ).

hehe checking it out as I merge everything together after backing up. 6gb of content takes a long time to backup on a hdd.

Also one question, was BP_Sky changed at all or is that DC’s baby and un-touched? I made a ton of changes to the blueprint and its a large blueprint in itself so wondering if I should merge my changes into the new one or if there ar eno changes and to keep my old one?

Edit: Just replaced my under-> above water texture sliding off the screen with your PP underwater bpUNderwater parent setup, submarine going up/under is much more beautiful.

Edit: Anyone getting a crash due to physics constraints line 71 (stay upright constraint based) I fixed it by finding the class that had the actual BuyoancyForce component on it, deleting and compiling it, re-adding and compiling int, and then compiling all child and parent classes.

Next step learn how to create a masked shape a pixel smaller than my mesh and to move and rotate with the mesh, then I can start building a ship!

You are fantastic! Thank you all

TK-Master you are da real MVP. :smiley:

Fantastic! The way how ocean fades into beach is perfectly done. Also storm waves are nicely deep. Are those strong waves displaced by height map or is it tesselation requiring DX11?

Awesome Job so far! Really thankfull for a the work put into this.

I have a small Problem, I just can’t get the Underwater PostProcess to work on my Projekt. I have tried to replicate everything exactly as presented on the Island_Map, but It just won’t work.
Is there a specific option I have to activate, or Code I have to modify?

Hope someone can help me :slight_smile:

Can you replicate the crash in the default project? the upright constraint thingy doesn’t work as I intended as far as I have seen and it probably needs to be rewritten, I haven’t worked on it since the first release since I don’t use it.

DX11 tessellation is not required but you might need make a small edit in the material to use World Position Offset instead of World Displacement if you are going to use it with DX10… I wanted to add a feature level switch in the material so that is handled automatically but I keep forgetting :stuck_out_tongue:

Uh yes I forgot to mention that you have to enable the stencil buffer when adding it to your project since it’s disabled by default.

Edit > Project Settings > Rendering > Custom Depth-Stencil Pass = Enabled with Stencil

Ahh thanks a lot, works perfectly now. :slight_smile:

Videos up. Got the masking workign, thanks TK! Now i just have to plug it into the main ocean material… and then write some CPP to take my boat mesh and create a mask shape and apply it to GetPlayerPawn->GetActorLocation somehow.

Time to start learning the UE4 API maybe? Start taking apart all my blueprints via the right click → show native code menu and try to reprouce all my classes… or wait for a proper video/book tutorial?(2 years still waiting)

https://youtube.com/watch?v=XTTJIKJxeAo

https://youtube.com/watch?v=8hAHW7FE0Uc

If anyone needs the bluepritns behind the masking letme know its just simple vector math with TK’s material setup.

Its clear to re-create the beaufort scale assuming oceanstorm is the highest level (5x8sum sets) we are going to need 2 things I can see

  1. waves with a larger height (amplitude?) need to have a longer wavelength (aka less sharp?) so they dont break as easy. and
  2. MAJOR perormance improvments. That was recorded on a gtx760M which isnt a terrible card with only simple gameplay stuff going onin the background mainly buoyancy and GUI stuff plus boat physics.

FFT time? I wouldnt mind trying to implement FFTs over gerstner style waves using all my reference projects that appear to use FFT’s.

Could be a good way to give up on CPP or a good way to see if i’ve come far enough to code what I need in a timely/clean/proper manner.

How are you updating the capsule start/end points? it seems off :stuck_out_tongue:

Excellent i think many users would like to see this in DX10 version aswel so it can be used on mid end graphic cards.

.
I assume ‘capsule’ means its using a z value as well and im just using GetPlayerPawn.worldLocation() so its a plane capsule (an ellipsoid?) I assume im just setting z to 0 or at least a const value for all vectors.

Seems ffts involve matrixes. Havnt touched that in cpp yet, maybe I have more learning to do. https://github.com/CSWest/FFT-Ocean/blob/master/FFT/FFT.cpp This is based on jerrys paper, there is lots out of there to look at for sure.

That video is also using no gravity because using a transparent bp_ocean for buoyancy before was just finicky.

Used your idea TK of creating the interior walls so I dont have to have 2 sided geometry and its working great, I can sit inside a big tube inside the ship with no waves :smiley:

Whoa ! I have only a thing to be said, it’s an AMAZING WORK !
I was inspired by your project for my student project for the water.
I have a question, I send you a PM to avoid ‘‘ruin’’ the topic.
But, really, it’s just awesome !
Thank you !

I just want to go ahead and say that this is the update that I’ve been waiting for for a very long time and it looks fantastic, this will really help my project out, especially the underwater effect. So thank you TK, your time and effort is much appreciated. I’m having a problem with the underwater effect that I can’t quite figure out. The underwater effect is working perfectly fine in the GitHub project file, however when I migrate everything to my project, I can’t get the underwater effect to appear at all. I’ve duplicated all of the settings as seen in BP_Underwater in the example project, but nothing happens, almost as if the M_Underwater_PP material doesn’t seem to be working properly in my project. I can’t quite work out why it wouldn’t. The wet lens effect works perfectly though. Would anyone happen to know what might be happening?

you did excellent work again :slight_smile: Thank you!

Check the level BP and player camera manager, thats how it finds out if its below the surface or not in oceanlevel01 or whatever

I’m talking about for the most recent 4.10 update where it doesn’t use that effect anymore.

NCMcClure please read the previous posts when possible :stuck_out_tongue: you need to enable the stencil buffer when migrating to another project since it’s disabled by default.

Edit > Project Settings > Rendering > Custom Depth-Stencil Pass = Enabled with Stencil