Download

[Community Project] WIP Weather & Ocean Water Shader

Thanks… for this free project you made… i hope this will add to UE4 Modes at Landscape :slight_smile: thanks for your answer… Good luck

Just wanted to say thank you for the awesome work. I can’t wait to see what you have planed for the next release.

If you feel this is a bug please report this on the Answer Hub: https://answers.unrealengine.com/ and include a link back to this post. That is also where you would want to post a feature request.

Thanks!

Absolutely amazing work, when everything is tweaked right you can create some truely fierce storms. I wish I could help but most of this is beyond me for the moment, can’t wait to see how this develops.

Gah! I just noticed your post now… Ugh… sorry HeadClot.

But some good news!! Buoyancy is almost ready, I found I was calculating the wave incorrectly from the OceanManager BP, got that fixed and I can get something to float a bit finally. It still needs a bit more work but it should be any day now!

I am creating a BuoyantMesh blueprint base classes that will allow you to set any static mesh you want, and it will calculate the mass and center of mass offset of the input mesh. It will be adjustable as well, but by default it will create 4 debug spheres around the COM of the object that get used for applying gravity or buoyant forces to each sphere so it can rock back and forth with the waves.

Regarding multiple water planes as it stands right now, you can add a second Ocean BP right next to (or even overlapping) so long as they have the same settings. But that is the least performant way of doing this, I am planning to add a Mesh Spawner in the Construction script to create multiple meshes in a grid format. The material itself is in WSC so there shouldn’t be any problems getting them to line up correctly, you can even overlap them if you need to.

Also I have been working on getting an LOD system functional to avoid the performance issues I just noted, I will have some more info on this later, but if you have any ideas you’d like to pass my way I would be all ears!

Thanks HeadClot! :slight_smile:

Thanks Steve, I have ocean spray on my list, but it’s a long list :smiley:

This actually was a bug worth mentioning, only problem is I can’t get it to happen again. The issue ended up being that the Slider value range for one variable got set to 0 when it should have been 10 after I migrated out the content from my master project. Somehow this value got changed in the process, it ended up forcing the value to 0 when I tried to adjust the value, freezing the ocean waves in place.

Anyways if I can get it to happen again I will be reporting it on AnswerHub. :slight_smile:

Thanks guys! new version should be out very soon. :slight_smile:

I love you DotCam. Superb work.

“Thanks guys! new version should be out very soon. :)”

Cant wait!!! Thx DotCam!!!

DotCam, I sent you the code to my BuoyancyMovementComponent. It allows you to add buoyancy to any BP without a base BP. It’s C++ though since we cannot create MovementComponents in BP yet.

Handkor! Good to see you bud!

Responded to your PM as well, but I will give this a try over the weekend and let you know how it goes, thank you very much for doing this! A BP only solution to this is proving to be exceedingly difficult, I wanted to try so it would be accessible to all, but the performance hit is too much.

Just an FYI for everyone reading this, this project would not have been possible without Handkor. For anyone wanting to know more about how this shader works I highly recommend watching his tutorials and checking out his thread on the topic, he explains in detail how and why it works, it was a huge help for me to understand it all. You can find more info on this here:

Thanks again Handkor! :slight_smile:

DotCam my good man, epic work you’ve done with this. i wonder, could i trouble you for a 4.4 compatible version? i’v played around with it on 4.5.1 and absolutely love it, my problem is, when i convert my project from 4.4 to 4.5.1 all my colors for my sky sphere get real messed up and i cannot reproduce it how i want it.

As far as licensing goes, Is there any fees, royalties, or agreements that we have to abide by if we want to use this in a commercial game? I ask because I want to use this on a project that will hopefully be completely or nearly complete in half a year and I don’t want to abuse you’re amazing contributions to the community.

There is absolutely no fees/royalties/agreements or anything else like that, it is completely free to use for anything.

One caveat is the Moon textures and the Milky Way night sky texture are downloaded from a website where they were labeled free to use in your project. I have not looked into it any further for commercial games, so to be safe I would make sure to replace these textures.

All other content was either from the free example games from the UE4 Launcher (Epic allows us to use these in commercial games) or were created by me, with Handkor providing some code as well (not yet released).

So there shouldn’t be any issues with this aside from those textures, but they can be replaced if you are using the sky blueprint as well.

To everyone else, I have been working at this as best I can, but have been going through a difficult time lately and haven’t been able to work on this as much as I would like. It is still in the works though, I hope to have an update very soon. Thanks for understanding! :slight_smile:

As far as a 4.4.3 version goes, it is very difficult to do (needs to be recreated entirely). There are features in version 4.6 that will be necessary for further development of the shader, the biggest one being 128 texture sampler’s instead of 16 in 4.6. Since so many of the samplers are used by the engine itself, currently I can only use 6 textures in 4.5.1 and before. So I will be moving this to version 4.6 in the coming update, since most of the project is already in 4.5.1 it won’t be as difficult to back-port the parts I add in, but the shader will not be updated for the reason I mentioned.

Thanks everyone!

Keep up the good work. Take all the time you need, we understand. =)

Just came here to say It’s a very good job I’ve saw here.
Migration to my project was super easy (right click on Ocean folder -> migrate), and in just a drag n drop, it was functionnal.

Thanks !

It stopped working for me in the 4.7 preview. Is that expected?

Hey Crafty,

Unfortunately it is expected at this time, the root cause of this is a known issue in 4.7. This is from the 4.7 Preview page:

Right now MaterialParameterCollections just don’t work in 4.7. :confused: To get around that limitation would mean moving all of the 50+ parameters from the collection to the 2 material graphs as instance parameters, adding more set params to the blueprint for the 2nd material, replacing every set parameter in the blueprint, and other misc fixes… It would be quicker to start over really.

I am hoping this will be resolved for Preview #2 coming soon. It’s really not worth it to convert all of these parameters if it’s going to be fixed in the next version, so for now I am going to wait it out. I’ll let you know if I hear any updates on this though!

Thanks :slight_smile:

Awesome Job DotCam! I hope the Team at Epic will get those 4.7 bugs dealt with quickly so that you can continue your work on this awesome project.

As well, thanks a lot for this contribution, it looks great and since water covers a bunch of the earth and we see it a lot, having more realistic water and simulation is important! :rolleyes:

Thanks :slight_smile:

Very impresive, Im waiting for the “native” implementation for bouyanci on your project