[Community Project] WIP Weather & Water Shader

The foam is scale able, I was playing with it last night. should be foam settings in the object properties.

Found a little thing:
It works fine only in the foliage-mode, but not when Im in the other modes and try to edit it.
What can be wrong here?

]
Hey ****, can’t you just reconstruct pixel position from scene depth map in pixel shader and then just use it as a mask for your underwater PP shader?
[/QUOTE]

That’s a good point, it should be possible. Would that allow a line dividing the water from the air? for example as you go underwater the water surface goes from the bottom to the top as you go down, or would it still instantly turn it off/on? Hmmm… will need to test that out it should work, thanks for the suggestion! :slight_smile:

Thanks for the info, will look into that soon!

LOD is the next thing to be added in, if you are interested I am looking to implement a procedural mesh generator similar to :
https://wiki.unrealengine.com/Procedural_Mesh_Generation

Not sure whether to go for now or get a basic LOD system working first, what do you think?

I’m in the process of setting up the repo at the moment, and need to make a couple quick tweaks, but very very soon (likely tomorrow).

What do you mean by “Foliage mode”? If the blueprint is in the scene all you should need to do is select it in the outliner and edit it in the details panel. Sorry not sure what you mean, can you clarify that bit? thanks :slight_smile:

In the modes panel in the editor, when Im in the foliage-tool everything goes smooth. But when Im in the other tools (lights, BSP ect) it starts to lagg. is when I have a fresh OceanDemo scene only and as well as in my Erebor project.

I have no idea why that might be happening to be honest. I just tested it on my machine and did not see any differences between the two, although I have a pretty fast system with a GTX 980 so it likely doesn’t show up for me. The material is pretty complex, over 600 instructions so it is not surprising to hear performance issues. I will be working on adding in the various levels in the near future.

So even with no foliage going into that mode increases your FPS? or is the itself is slowly rendering but the editor is still responsive? or is it the other way around, renders fine but editor is slow?

I am putting together a base hardware system at the moment, with a GTX 660 ti and a slightly older i5 as a test machine and to use as a build server. I will be able to test it out then, but only happens in projects containing the correct?

On 4.6 everything went well :slight_smile: Yes, its lagging even with no props or anything in the scene. But I can live with that bug, as it isnt too annoying, when its working fine when Im in the foliage-tool.

Yeah, I understand that system is pretty complex. Like I said, its the most realistics watersystem I have tried. I could dive right into it (If I knew how to swim) :stuck_out_tongue:

Np, btw, I’ve just checked how it is implemented in Battlefield 4 and FarCry 4 and they actually do it the simple way - camera’s always above or below water completely. And for example in Battlefield 4 on Naval Strike map with some big and choppy waves it is possible to see “underwater” geometry without any PP applied while swimming through a huge wave.

I got an idea, if its not possible already. What about waterfalls?

We tried tiling multiple tiles together. There is no apparent or otherwise just the odd pixel of a seam they seem to blend seamlessly!

Procedural as in the floor? I think people who need it (very few only people like us using submersibles) would need that and could do it themselves. At the same time LODs… on my gtx 760 even with 16 tiles I get 60-100 fps.

hi
I downloaded it but how do I make any object to have Buoyancy because I tried to put a ship and it just sunk.

Add the buoyancy BP component IIRC I dont use it much yet, working on the GUI and adjust your test points and mass.

What is not OpenGL compatible? I’ve tried the other water from the learn section and it works fine on Ubuntu even though it uses tesselation etc. I only need to find out how to scale them up
for huge storm waves, any ideas?

Yep! Forgot to mention that, everything is using world space UV’s so you can tile/overlap without too much trouble.

I mean for the surface plane, instead of using a static mesh use a generated one based on the camera position. You could then dynamically create lower LOD meshes fairly easily to get an infinite surface. The sea floor would need to be done with landscape streaming.

Have a look at article on how they work the LOD’s in AC 3/4 (doesn’t talk about the mesh, but a similar grid system would be used) - Assassin’s Creed III: The tech behind (or beneath) the action – fxguide

I had another link with more info, I’ll see if I can find it again and post it up later on.

As mentioned, you will need to create a blueprint with the static mesh as one component, and add a “BuoyancyMovementComponent”. In the settings for the buoyancy movement you can create “Test Points” which actually determine how much force to apply. You need a minimum of 4 test points (one in each corner) but more can be added if needed. The interface for will be improved soon, it is a bit difficult to get right at the moment.

The reason is I am using Shared Samplers in the material. By default the material itself uses up 10 of the 16 samplers before adding anything, so that leaves me with 6 textures only. DX11 will allow you to use up to 128 Shared Samplers. It is possible to reduce it down, but some features would need to be cut from the material as it is now.

Aside from that OpenGL should work just fine, but as is currently it will not.

Wanted to ask about the Buoyancy. See I am changing the test points over a short amount of time and its not updating fast enough. Seems like the wave cycle has to run through first before it can take a new test point value. To picture my logic I am increasing the Z values of my test points over time to keep Buoyancy of the ship as it descends underwater. What happens however is that it lurches down after each wave cycle rather then a smooth graceful dive. If can get back with me on to confirm that is how things will work, I can then try another dive method, or if he has a fix for it I would greatly use it.

What about if you want to use in multiplayer?

I second , and LOD too :P, I’ve played with Nvidia demo, which make the LOD change whenever the camera move. It’s really great for an infinite plane, tried implementing in unreal but I have no luck, maybe because my knowledge in unreal rendering pipeline is still limited :slight_smile:

If you want to see their implementation for references check it out here https://developer.nvidia.com/dx11-samples

Personally I would focus on the core details first, i get great performance on mid-range hardware. But thats just me. Once I get game further along I can stop pulling in 13 hour days and start seeing if i can code some additons.

Ok so quick update:

Plugin now works flawlessly!

Unfortunately to get it to work i have had to create a new project and rebuild the blueprint. It was originally built off the OceanManager code in the project, moving it to a plugin breaks that link so it needed to be recreated. I was hoping to avoid that but decided to give in, from point on you will be able to migrate easily.

It is complete now, currently tweaking values a bit and copying over default values. project no longer has any code outside of the plugin, which only needs to be placed in your OceanDemo\Plugins folder (or YourProjectName\Plugins).

I will be removing all links later today for the current version (if for some reason you need that version, please PM me) and replacing it with the build, which will be going up asap here:
https://.com/UE4-OceanProject/OceanProject

Thanks guys!

Is it possible for to work in a networked game? Ship positions updating over the internet while sailing on these oceans or battling?