[Community Project] WIP Weather & Water Shader

Amazing!!!

Updated my branch. New settings!

F7N2JM.png

It includes a mesh density override, as per 's suggestion.
Dampening parameters due for a future update!

In addition, I added a water heightmap component that can be used to reduce the wave height computations.
Using it might improve performance for high triangle count meshes.

Click for an animation

It will only generate the triangles that are actually needed for the height queries.

Thank you for your great job. I am using it. I have a question. Please look at the picture,the area has too much noise where marked with red line.
6a9107cf93789930ab667274f7b4d0acffd5d793.jpeg

I have knew the question is about to SSR(Screen Space Reflection) . But I can not get rid of the noise even if I change NumSteps & NumRays with 32*32(reference : 3D Modeling & Texturing: [Unreal Engine 4] Improving Screen Space Reflections). I have set the SSR quality to the highest and noise as before.So how can I do?

Hey guys, I made an underwater exponential-squared distance fog post process material:

Hereā€™s a comparison, first without, then with the fog effect.


Custom node is really simple:



// Get the distance from scene depth
float dist = length(pixelDist);
float fogFactor = 0;

// Compute our fog lerp factor
fogFactor = exp( -pow(dist * fogDensity, 2));
fogFactor = saturate(1 - fogFactor);

// Lerp between fog and scene color.
return lerp(sceneColor, fogColor, fogFactor );



I just added it to the blendable list for the Underwater_PP PostProcessVolume

I tried masking out the fog effect as it nears the surface of the using the custom scene depth but couldnā€™t get it to work out - if anyone can figure out how to make it so the fog ends at the water surface, thatā€™d be and improve the effect a ton.


@mikeche,

Thatā€™s fairly normal for SSR (screen-space reflections) actually, yeah. Though you can increase the SSR quality settings to mitigate it, but it comes at a performance cost of course (check the PostProcessVolume in the level).

Will work with the truesky build do you think?

How would I go about integrating with my truesky build?

Heh funny timing n00854180t I have also implemented the exact same thing + masking under the surface :wink:

Unfortunately the masking is still far from perfectā€¦ the problem is that the masking should also account for the water surface normal, meaning it should include the water surfaceā€™s bottom side but not include the top side.
I still havenā€™t figured out how to properly do that but Iā€™m working on it :stuck_out_tongue:

Iā€™m also looking for a way to detect the water line so we can give it a bit of thickness, then it will be nearly perfect.

That looks :smiley:

One thing I was planning to do is copy over UE4ā€™s ExponentialHeightFog with the in-scattering to use for underwater fog, as the hacky fog I made is almost the same code anyway. I havenā€™t had a to hook that up yet though, since it will need a material parameter collection to pass through the sunlight direction.

does still use a ton lot of blueprints to look good?
And does it sill lag as hell?

Hey! I donā€™t get to work! I open up the and then I migrate the BP_Ocean to my own project. When I then try to drag n drop the BP_Ocean into my world nothing happens and when I doubleclick the BP_Ocean i get : ā€œBlueprint could not be loaded because it derives from an invalid class. Check to make sure the parent class for blueprint hasnā€™t been removed!ā€.

I thought was supposed to work so I donā€™t know what parent class to look for or what I should do to make it work. Thankful for help! (Downloaded the latest version and IĀ“m using 4.9)

EDIT: Got it to work by copypasteing the plugin folder as well! :slight_smile:

Notone answer yet, Iā€™ll post the question again

How would I go about integrating with 4.8 truesky build?

If you donā€™t know for sure, can you at least tell me the changes made on what .cpp/.h files? So I can merge them correctly

is looking better every time I drop by. very nice work, canā€™t wait to see beaufort scale!

Hello again!

I decided to come back to my project after some months of putzing around doing other things. But Iā€™m still stuck on the same I was having before - getting the blueprint gerstner waves to match the material waves. As far as I can tell my BP math is the same as my material math, but in practice the waves are much longer and move much slower. Iā€™m curious is thereā€™s some sort of conversion Iā€™m supposed to do, or what. I checked out the /old/ folder in the 4.7 version of the project, but didnā€™t see anything to my knowledge that would correct for it (not sure what Iā€™m looking for, even).

I have screenshots of my blueprints/materials and 2 waves in my wavesets (both bp and material). The image is kinda large so Iā€™ll just link it. Also included: a crappy 20 color gif that shows what it looks like between my waves/test points with all the same numbers plugged into the bp/materialsā€¦

Thanks for any help you may give me.

threat is getting more exiting
i pm u for my suggestion

Default period for sin and cos nodes is 1 in the material editor, but itā€™s 2pi in blueprints.

Thanks! Somethings still a bit off, but itā€™s a lot closer now. Iā€™ll keep at itā€¦

version?

Is the project dead?

I have been trying to figure out the masking as well. Have you applied your changes into a fork, or into the plugin - or do you have a blueprint I could follow. It would make a big difference to what I am working on, which is a clumsy push camera up/down to avoid the mask problem entirelyā€¦

@ - 's masking of the surface was already a lot better than mine, so Iā€™m just waiting for his version for now.