@TK-Master - So I looked at some pictures and also how Dying Light does the fade when the camera is half-submerged. Basically, it’s a thick black gradient on the submerged side of the hard line (both IRL pictures and the Dying Light method), with a little bit on the top.
I’m thinking you could do a secondary gradient towards the very top of the surface for the underwater fog post effect in order to get this, but I’m not sure how to achieve it Basically it needs to go from 0 opacity at 90-something % to the top of the volume to 100 at the very top.
Once I get to the skill levels of some of the members here I will be doing all sorts of things with displacement for my game. Right now im working on getting my C++ skills up with InfinteSkills 3 C++ video courses and Bjarne S.'s books and then gonna start learning the UE4 API and I’ll be doing some stuff like bow waves, kelvin wakes, splashes, currents, water temperature etc. etc. etc.
My timeframe is the same as TK’s/DC’s though… when we get around to it.
In the meantime become an expert in particle systems, itll help you get placeholder effects for now and will help you create optomizations later.
The problem is the positioning of the line, not the gradient.
I have not found a (cheap) way to match it exactly where the ocean plane clips the camera.
Dying Light uses a flat water plane from what I have seen which is really easy to calculate and mask (how convenient for them :p) just a straight line.
I might make a flat plane version sometime if there is enough interest.
Ya it’s nothing special… just a panning normal map with distorted uvs.
(It will be included in the update ofc.)
Anything is possible but something like this will not be easy to implement.
The article does not have any details about their implementation but essentially it’s like the fluid surface plugin (which its code is a bit too complicated for me at this point in time).
It might be a lot easier to use a projected texture mask with the shape of the hull to displace the ocean but that can not work for more than a ship or two at the same time and you won’t be able to generate kelvin wakes or anything like that that way.
I used the stencil buffer to do the half-in-half-out masking (mentioned a couple pages back) will be included in the upcoming update.
The upcoming update will be compiled for 4.10.4.
The ocean plane follows the camera which make it appear as infinite so there are no tile limits.
All things considered, the performance in the project is really good… it’s not a heavy project like the kite demo or anything
You could say it’s optimized for mid-range cards since I’m currently using a gtx 690 (which is like a 680 since UE4 doesn’t support SLI) so I’m trying to keep the performance at 60 fps for my card which probably translates to over twice the fps for the lucky 980 owners.
Sorry, I will only be providing 64bit windows binaries but it shouldn’t be an issue to compile for linux/mac.
However the shader is not currently compatible with opengl due to the 16 texture limitation (also no tessellation).
I am working on a “Lite” version of the shader though which should be compatible, not sure if that will make it to the upcoming update though.
Wow with clouds and rain. Looking forward to this update. Not sure if the Linux/Mac stuff still makes much sense, thinking about the soon to arrive Vulkan support. Ships moving with wind and/or waves, also breaking waves and I’d be in heaven.
Can you give us a quick list of what will be included in the next update?
I am hoping some of the items on my short list will be fixed in the next release:
The caustics should be visible when standing near shallow water, not just when under water. If I remove caustics from the Set Underwater Mode and put it in the PP Underwater volume blendables will that fix it?
Need an integration of Ultra Dynamic Sky with this shader. The developer will not respond to e-mail. In the level BP, Set Underwater Mode, when using Ultra, the Ocean Wave Cue new volume will work, but the caustics and Set Intensity and Set Light Color do not, even when replacing the BP_Sky target intensity and color with an Ultra float and Linear Color to provide a new Sky Light Component. Also, tried plugging in the "Update sun’s rotation material parameter (SSS) into the “Ultra BP Set Material Variables”, can’t get that to work either.
Or, add “Ultra like” clouds and shadows to the Skydome_BP.
Swim and tread water animations
Character buoyancy when breaking the water surface plain, so it bobs with the waves while treading or swimming.
Landscape Height modulation so I can stop waves encroaching on shoreline, and add my own swash, backwash, and wet sand function
Light rays integrated with the caustics during daylight hours.
A blocking volume function so underwater assets “stay dry.”
Function changing water color based on Z depth, like Black Flag.
Thanks for all your hard work. I understand, it is a spare time thing for you … I would gladly donate to speed things up or to get you to work on these issues … if people in the community like you do not work on this it will not get done.
I don’t think EPIC gets it. Water is a big deal today. Even Unity and Blender are way ahead of us. UE4 is the only engine without it. I don’t need an engine that support a hundred square mile level, or better looking hair for our 1st person character, or planar reflections on only Samsung mobile apps. Maybe someone at the top of EPIC needs a baptism to understand our need for good water.
This article explains the systemic problems with UE4 in a very supportive way:
One of the most beautiful games of all time, The Vanishing of Ethan Carter, was developed on UE3. But to port it over to UE4 and Playstation 4 required their 8 person team to include a full time engine programmer to fix UE4 issues. In the article they talk about the same issues you face with this ocean shader, which are systemic to EPIC’s engine roadmap for UE4:
“the way screen-space reflections are culled on the sides of the screen in a trapezoid shape”
“depth-unaware blending of reflection cubemaps”
“translucent mesh rendering … scene colour texture resolve is done per mesh element, not per entire mesh”
“lightmaps are meant to contain indirect (bounced) lighting only … they don’t have specular highlights”
The “workarounds” in this ocean shader are great, but they create a form of spaghetti code that is not easy to work with and is just one engine upgrade away from not working.
Still, no pressure TK, but this project is our only hope for realistic water.
A lot of these are still very specific implementations that TBH youll probably never see anytime soon or for free. Even commerical ocean solutions have users do some of these on their own because the implemntations are project specific.
The update is planned for tomorrow (yay?) so wait for the changelog.
Most of the things you mention are either done, being worked on or planned (not sure what you mean in #8 tho).
About the sky/clouds… it’s not something I will be working on anytime soon since ultra dynamic sky works pretty well in my personal project.
It’s not difficult to implement the update light vector function to it, I might post some instructions later.
I’m working on a skylight manager blueprint though that will blend between multiple captured cubemaps for seamless day night cycles (that one won’t make it in the update) which will also have the option to update the sun vector, all you will have to do is connect the directional light from the level.
About char. buoyancy… to do this one properly it looks like we need a custom C++ CharacterMoventComponent so don’t expect this anytime soon either (working on swim anims though).
I wouldn’t feel very comfortable profiting from this project :rolleyes:, there are multiple people who have directly contributed (DotCam, Komodoman, Handkor etc.) or indirectly.
Yeah I read that article a while ago, it really is right on point isn’t it? if Epic solves most of the issues mentioned there (translucency, reflections, anti-aliasing) then it will be hands down the perfect engine for me.
I saw that! Whats up with that? mobiles will have graphical features not available on desktop now? (especially something as important as reflections) that can’t be right :eek:.
@TK-Master - I wonder if you couldn’t use the stencil mask you’re already doing, downsize it and blur the crud out of it to mix the colors on the hard cut, then use that resulting mixed color as a mask for doing the gradient.
Advanced BuoyantMesh component by Nubtron (thanks again!)
Accurate height readback by accounting for x,y displacement
Harpoon gun with rope physics
Various code improvements
Various shader improvements
Large landscape with deep underwater sections, much nicer for prototyping.
Includes mounted harpoon gun and breakable rope example bp.
Includes the new ocean material with heightmap modulation.
Includes the new underwater post process.
-It is now possible to add multiple Gerstner 8-wave clusters.
Made all the necessary C++ changes.
In the material side however only 1 cluster is used so you will have to add them manually, check the material in OceanStorm map for a 40-Gerstner example.
Toggles the wet lens effect.
Includes optional directional light to be used with caustics light function (it’s a bit costly to have 2 directional lights but it’s the only way I have found so far to be able to mask the caustics so they are displayed only in shallow sections and not above sea level).
It can optionally be used (instead of the new stencil masking) to set the location of a post process volume to match the ocean (check OceanExampleMap_01 for an example of that).
It can optionally be used to set the location of the swim volume to match the ocean waves (currently not working properly in multiplayer mode for clients).
-Added OceanMasking map with a opacity capsule-mask material example (hope that helps you a bit Nsomnia :p).
-Added custom .usf files to fix Gaussian DOF (found under ShaderFilesToCopy folder).
It reads the scene depth + custom depth, instead of just the scene depth buffer.
You will need to manually copy and replace the files in the engine’s shader folder (4.10\Engine\Shaders).
(These can cause an engine crash if used with an incompatible engine version so I recommend you backup the original files first).