Download

[Community Project] WIP Weather & Ocean Water Shader

That sounds good, look forward to your full reply.
I have a question though. Does the update interval scale with the time scale multiplier? I set that to 2000 for testing, and the 0.08 you’ve suggested doesn’t work. Could that be because the two aren’t linked, like time scale multiplier is using real world time or something?

Cheers

EDIT: @Dotcam My Update Atmosphere had an extra bit on the top left but ultimately the Use Skylight was not connected to the ‘AND’. Once I did that, I could indeed get the update working as intended. As you say thugh there is a noticeable hit on performance so it will be GREAT to get your update with the blends and no performance hit :slight_smile:
Awesome as always
Daz

So far I’ve got everything working great in our game using this plugin, but only recently during an optimization pass on our textures/meshes did I come to realize that the terrain heightmap being used to control the height of the waves near shore is way too big.

The steps I’ve taken to incorporate our heightmap is to select the landscape, export the heightmap and import it into the content browser, then apply it to the appropriate slot in the ocean actor settings. However, the size of the exported/imported heightmap is 4081x4081, and takes up around 65mb of texture memory, so it’s by far the most expensive texture asset in our game and takes up a large portion of our texture budget. It’s set to not have any MIP maps by default when used with the ocean plugin, so I can’t make use of the LOD bias to reduce the texture memory load. So based on that, I just tried to manually drop the texture size in photoshop down to 2048x2048 and reimported that into the editor, but upon saving and then reopening the editor the waves no longer get reduced based on the heightmap, so basically the terrain heightmap feature isn’t working anymore with the lower resolution texture.

Tried just about everything I can think of to get this texture memory size reduced to something more appropriate but so far I haven’t had any luck.

Is there anything that can be done to solve this? Does the terrain heightmap texture need to be very specific depending on the terrain size? It doesn’t seem like it would really need to be all that high resolution to get the results I require as my shoreline is pretty smooth and isn’t highly detailed. Any help would be greatly appreciated as this heightmap texture is really hogging a lot of the texture memory budget for our game lol :stuck_out_tongue:

Thanks! Keep up the great work, this project keeps looking better and better every time I come back to see the progress :slight_smile:

You can use a lower res texture but you will have to do some changes so that you can pass the original landscape size manually via parameter… currently if you plug a low res texture then it will assume your landscape is smaller and therefore will not match the actual landscape in the game.
Open BP_Ocean and check out the Set Global Parameters function, the heightmap size x,y is taken directly from the texture via GetSizeX, GetSizeY… you can switch that to a variable which then you can manually set.
You will also have to do a similar change in the OceanManager.cpp thought so that buoyancy is synced :stuck_out_tongue:

Fantastic work guys, thanks for that! :slight_smile:

As far as I can tell from my first experiments the ocean plane simulates the earth’s curvature, is that right? And if so, could someone guide me to the proper blueprint so I could take a look how it’s implemented? Thanks :slight_smile:

So that seems to have worked, in that I am seeing the wave size is being controlled now by a 1024 texture while manually setting the landscape size of 4081x4081 in the function within BP_Ocean. However this now causes my game to crash when trying to simulate in the editor :frowning: The crash seems to have something to do with linear color? I’ve tried to look into this crash but can’t figure out what could possibly be causing this, any ideas?
**
EDIT** - Looks like I spoke too soon! For some reason upon importing the texture, the compression settings were not applied to the new lower resolution texture which was causing the crash. Just went in and manually changed the texture compression settings to match the settings that was automatically applied to the previous high resolution heightmap.

Hi there,

First off thanks for making this, it looks incredible. Unfortunately I’m having trouble getting it to look exactly like some of the example maps, in my own map.

The main issue is the area around the beach, I noticed in the example maps that you have it working where the waves die down and you get foam along the shoreline.

Right now in my project the water just continues to wave right through the landscape.

How would I fix this? and is it possible to do it without a height map? I just built the landscape in UE4 and don’t have a height map to import.

Thanks!

This is awezome. Tried it with TrueSky and its great for me that enjoys storms and lightning. Now I can simulate my own storms, when its not a real storm outside :slight_smile:

When you select the ocean_bp in the details panal you can select to use your landscape. Did you do that?

I did do that before I posted here but it didn’t seem to have any effect :confused: Any other ideas?

There is a Heightmap/mask right under the landscape on the BP_Ocean. If you load the Default map and change that Heightmap your are going to see what you are talking about, i guess it controls the density/movement of the waves based on black, normal wave movement to white, no movement at all.

i didnt read this part:

try to export it as a png file from the landscape menu, here is the answerhub question related to it.

https://answers.unrealengine.com/questions/11999/export-landscape-heightmap.html

Hope it helps

Okay, I’ve done this before but for the life of me, I can’t remember how, and I’ve read about 20 pages of the thread… how do I disable/modify the crosshair in the HUD when it switches to first person?

Sorry for sily question but what i should do to open plug-in and project file in 4.12.4 ? try to compile it but always with errors, maybe who knows how correct compile it ?

You don’t need to open it

Here, follow this:

Hello,

Could anyone tell me how do I fix the darker part?

Thx i saw it, and i know how add plugin but how i write in previous post problem is if i try add plugin to a project when start editor he ask me to compile and compile with error. Question is same how to compile plugin to 4.12.4 editor, i use github version of engine. Edit: compile without errors, problem was in name of folder or version in .uplugin file, compile with: development editor win64.

Hi, there

We were trying to deploy the project to IOS(iphone 6, 6s), but failed with several compile errors below. Could anyone tell me how to solve this?
compile errors.png

I had something similar with an object that was referenced to the controller but did not exist, don’t know if it will help you, but you could check dependencies, maybe there’s something missing.

Open up the folder \ShipsAndExamples\UI\ and then open the widget named “Interaction Widget”. From here select “Crosshair” from the Hierarchy panel and either delete it, or edit it however you want. :slight_smile:

This project is not compatible with Mobile devices at the moment. The ocean material requires DirectX 11, the Destructible objects require the Nvidia Apex, and the buoyancy requires the PhysX libraries, all of which are not available on iOS.

We do plan to make an OpenGL compatible version of the material, but without PhysX the buoyancy calculations will need to be re-written, and without Apex there won’t be any destructibles or cloth simulation (ship sails).

Sorry for the bad news. :frowning:

Very cool plugin! Thank for making this effort! I have been playing with this for a few hours, I striped down one of the examples to just have the ocean, and my own sky as I was trying to reduce the overall learning curve to the system.

Question if I want to make wakes for a boat simulating an engine what method would be the best way to go about that? Do I create physics impulses perturb the water? I am doing some tests just wondering if someone has already created an additional example of this working.

Question 2: Wet sand? Someone must have done this already as well.

Thank you again for the continued effort on this plugin / system!

-V

@DotCam @TK-Master

Wow! This offering of yours is tremendous! Thank you thank you!

I am sorry I am only just noticing this thread for the first time :slight_smile:

I tried it out and I especially loved the breaking up of waves along the shoreline, your landscape feature. The buoyancy and Gerstner waves are great, tho personally I think of them as DotCamWaves

This is one awesome community contribution, thank youuuu!

[FONT=Comic Sans MS]:heart:

Rama