[Community Project] WIP Weather & Water Shader

Did you check your post process volume for your level? maybe the post process Blendables got changes/corrupted/removed, due to recent formatting changes.

:slight_smile:

Rama

Yeah i have fix that,but is there a way to make the TPS character float like the other objects on the surface of water?

Hey guys, first of all thank you for the great effort on .

Iā€™m having an with it. When I put any Static Light in any maps inside package , and hit Build Lighting ā€¦ Nothing happens! I just get few map check errors and it just doesnā€™t start the SwarmAgent to Build the lights ā€¦
Does anyone else have with baking static lights ?!

They probably have ā€œForce No-Precomputed Lightingā€ turned on in the World Settings.

Ah Thanks Man ! Exactly ā€¦ and Itā€™s weird that it forced off by the way.

what files do you download to get weather system?
and how to do you install it?

, read tge first post.

, would it be possible forme to submit my moon mesh and material to the project?
It uses a half sphere to save on polys (as you never see the back of the moon) and a high resolution photo of our moon.

I love projet and intend to use it fir a game of my own. Would really like to contribute anything i can.
Cheers! And keep up the great work involved!

Hey in the May Epic Jam I made a dynamic wave surface that runs on the GPU and supports custom obstacles. For example the mud is also a dynamic surface and itā€™s heightmap affects the wave propagation. Itā€™s running on a 2048x2048 grid in the Jam entry. Like you said in a previous post the technique tends to be frame based and can cause timing issues to mix with the wave system but in my Jam implementation the surface update is not tied to your fps and can be controlled independently, also since Iā€™ve bumped the buffer from 32-bit to 128-bit the increased floating point precision can allow me to pass a delta time to the transformation to bring it in line with other more mathematical systems.

VQxNfwKjYK8

If you have any questions on implementation Iā€™ll gladly share what Iā€™ve got here.

Dropbox link if you want to try out the demo

Hey , nice to hear from you as always :slight_smile:

I saw your game jam entry a while back, Itā€™s really cool! congrats :wink:

For now Iā€™m not worried that much about the fps problem, I have integrated delta time into the algorithm so itā€™s more consistent now (although not yet perfect, it still needs work but I think I got figured out).
Currently I have to say Iā€™m kinda struggling with the GPU implementation though, I have not done before and there are not any simple examples or guides about vertex factories, .usf and whatnot out there.

If you could lend a hand with that, it would be !

No geometry shader, no vertex factory and not custom vertex buffer, my implementation is strictly applied as a displacement map using CanvasRenderTarget2D and a Transformation material. Itā€™s done using what I wrote in the old RenderTarget read wiki page but instead of a capture camera setup, it is done behind the scene in canvas.

Oh a displacement render target is what Iā€™m currently using for testing but the problem with that approach is the normals.
I can make a second render target for the normal map but that is not going to look smooth (especially with lower resolution grids) since it would be the vertex normals, not the normals per pixel.

Do you know of a way to calculate the correct pixel normal from the vertex normals perhaps? Iā€™m thinking some kind of interpolation might do it.

I just cheated and used the Normal from Height node in the material editor. Yes the best you can do is get the normal interpolated between your height values but ignore the vertices and just focus on the height buffer but as information density/frequency it is all you got.

Depending on how stretched out you make your buffer the normal can be a bit flat. The good news though is that the dynamic plane can follow your actor/camera so you can keep the density pretty high.

Alright, I will keep digging and see how it goes :stuck_out_tongue: hopefully the interpolation method will look good enough (otherwise I will have to power through it and get the vertex factory method working).
Thanks for your input! I appreciate it :slight_smile:

, I appreciate your contribution on , I think you are in the right track :slight_smile:

UE4 absolutely needs a good dynamic water shader (, lake and rivers).
The current options are simply terrible, some just looks like a melted thinfoil, others looks like a perfect colored mirror :),
even lumion 1.0 had a better shader than UE4 today (almost 7 years ago): watch?v=vhOvBICNE9Q
hell, even unreal engine 3 in 2005 had some advanced dynamic water shaders, 11 years ago!!!
So please Epic, make happen, a good believable water shader is very important in game design specially on Archviz.

is it possible to use in ark?

I know is stupid of me but someone said it wouldnā€™t cook and package for them a while back and I said Iā€™d try. I just downloaded the project fresh off github and tried to cook n package (tried oceanexamplemap01 and the entire project) but it failed with code 25, anda ton of material warnings, path warnings.

Tried a sample c++ project Iā€™ve been working on and cooked n packaged no problem, tried a bp third person template, no issues. Win 64.

Ideas. I can post the output log.

Edit it appears because the old sky BP fails to compile or whatever in the level BP in OceanExample01 you need to replace the skydome with the new one and the new hud. Works fine.

Edit2: Iā€™m getting 17-25 fps average on the stock project in 4.12, any ideas why? I used to get 60-120, gotta be planar reflections the last time I packaged up a stock download off github it was silky crazy high fps. is on a 760m(obile). must be planar reflections? will do some testing.

[2016.07.28-01.28.16:380][996]LogChartCreation: 142 frames collected over 8.38 seconds, disregarding 0.00 seconds for a 16.94 FPS average

I figured I should post my findings for anyone who might be interested about stuff. @

After spending a few days experimenting with various ideas and normal interpolation methods I ended up using bicubic B-Spline interpolation, itā€™s considered to be on the blurry side out of all the bicubic methods but itā€™s the only one I found that can completely eliminate pixelation artifacts even with really low-res maps (like 64x64) so itā€™s a perfect fit in case.

Linear interpolation between the 3 triangle vertex normals (using barycentric coordinates) doesnā€™t seem to smooth it at all for whatever reason.

Quick comparison screens between trilinear texture sampling and bicubic.

Thatā€™s a huge difference if you ask me! in case it makes a 128x128 normal map look like 4k.

Here is the custom node code for bicubic sampling.
Required inputs: Tex, UV


float2 res;
Tex.GetDimensions(res.x, res.y);

UV = UV*res-0.5;
float2 index = floor(UV);
float2 fraction = frac(UV);
float2 one_frac = 1.0 - fraction;
float2 one_frac2 = one_frac * one_frac;
float2 fraction2 = fraction * fraction;

float2 w0 = 1.0/6.0 * one_frac2 * one_frac;
float2 w1 = 2.0/3.0 - 0.5 * fraction2 * (2.0-fraction);
float2 w2 = 2.0/3.0 - 0.5 * one_frac2 * (2.0-one_frac);
float2 w3 = 1.0/6.0 * fraction2 * fraction;
float2 g0 = w0 + w1;
float2 g1 = w2 + w3;

float2 h0 = ((w1 / g0) - 0.5 + index) / res;
float2 h1 = ((w3 / g1) + 1.5 + index) / res;

float3 tex00 = Texture2DSample(Tex, TexSampler, h0);
float3 tex10 = Texture2DSample(Tex, TexSampler, float2(h1.x, h0.y));
float3 tex01 = Texture2DSample(Tex, TexSampler, float2(h0.x, h1.y));
float3 tex11 = Texture2DSample(Tex, TexSampler, h1);

tex00 = lerp(tex01, tex00, g0.y);
tex10 = lerp(tex11, tex10, g0.y);
return lerp(tex10, tex00, g0.x);

Wow @ that is a huge difference. It looks fantastic.

How long before we can possibly see implemented into the shader too?

Also, how would we add to a project, stand alone? atleast, what you have so far.

Edit: Checked your other thread and I understand youā€™ll be releasign an alpha once the configurations are set, godspeed my friend.

While I wouldnā€™t mind testing it without , just for a play around, Iā€™d hate to take time out of your schedule to have you upload it when it isnā€™t ready.

I wanna use the in my Project! its Really GReat Work!, But how i Replace the Character with mine? Delete and Replace Reference is not Working./ Should i Copy and Paste a