[Community Project] WIP Weather & Water Shader

I only came across that code when trying to compile the game with my own custom code in C++. If you just want to use the plugin and arnt coding you shouldnt even have visual studio open or compiling anything with unrealbuildtool.

//not an expert

If you are using the TK or branch (ha! see what I did there?) then there should already be a Source folder, in which case to get a .sln file all you need to do is right click the .uproject file and click ā€œGenerate Visual Studio project filesā€.
But there is nothing wrong with ā€œAdd Code to Projectā€ :stuck_out_tongue: you only need to use that method when there is no Source folder though.

To get multiple planes working you would have to modify the material to use regular parameters instead of the collection parameters, then edit the BP accordingly (that on itself would probably take hours).

But let me save you the trouble right now and tell you that you will not achieve the results you are looking for by doing that :stuck_out_tongue:
Not only the buoyancy will not work right but also the planes will not blend together properly if they have different parameters… not to mention the performance will go down significantly since there will be multiple gerstner wave cluster calculations.

If you are making a single player game then I would try changing the wave direction in the manager over time, depending on the player’s location.

If you are making multiplayer… you could try modifying each wave set’s ā€œrotationā€ parameter to make the waves more ā€œchaoticā€ and move into multiple directions to hopefully make it look less obvious, I have no idea how well that would work though so don’t blame me if you waste your time :wink:

In a perfect world we would want a mix of FFT, gerstner waves and some kind of flow map so we can transition/fade the waves near the shore while keeping everything as mathematical as possible so we can calculate buoyancy on the CPU.
But that is pretty challenging to say the least, if even possible :stuck_out_tongue:

No idea… it’s not easy to tell what is going on from an error log :stuck_out_tongue: we need more info.
What are you trying to do exactly? package the game? compile the code? what steps are you taking exactly?

Hey ! glad to hear you are feeling better :slight_smile:

I have added some classes to the sailing sim. that I’m making, which is why i had to add some code and go into VS. but the error dose not show up in VS.
I only get the error when i try to launch the project. but it dont rly do anything except torn some lights on and off and so on.
And if you don’t mind me asking, how did you solve it? i saw that you posted the same error a while back.
:slight_smile:

I’m in the process of building a sim. for sailboats. and when i launch the project i get error.
So i tried going back to the branch to se if that could be launched but i get the same error there (as posted above) :s
I have tried different ways but the all lead to the same error.
The most basic way was to download the project, unzip. launch with unreal and then try to launch it on the PC.

When that didn’t work i tried to add code to project to rebuild the project in VS then run it and launch it when the editor shows up, but the same error.

Btw if I for example create a blank template project and launch it i don’t get error.

PS. Thanks for replies :slight_smile:

I finally had a to check out project after much time reading through the thread and watching the videos/screenshots and I must say that it is a great project!! There were a couple of issues I noticed that I wanted to feedback…

  1. Each time a chunk of terrain gets generated, there is a brief pause. I expect it is caused by a CPU spike but didn’t have time to debug …I will take a closer look evening and get back to you.
  2. The shark is great however just like my grandfather, his teeth didn’t appear to be in his mouth and he at one point started flying above the (Granddad wishes he could fly above the )

I’m actually quite keen on getting involved with and will see if there’s anything cool I can add to project. Great work guys!! :slight_smile:

I really dont remember. I was just trying to make a struct out of TK’s buoyancy location and density values. The error only showed up in VS for me cause I had the wrong syntax, then fixed it, built it, Was fine and launched the project with changes no problem. So I dunno thats related to unrealbuildtool and your code. I’d guess its an in your code somewhere. Remove parts of your code peice by peice till you find the problem… thats basic debugging it sucks buts its one way to figure it out.

Ok! thanks i have tried that tho. i even tryed with just the branch and a fresh installed Unreal Engine but it still wont launch. :S sitting on windows 7 and Unreal 4.7.5, 4.7.3, i also tried 4.6.1 but i still get the same resault.

Could have anything to do with which version of Unreal or whitch version of VS I’m using?
Btw i read that the error LNK2019 can be a resault of missing lib files , unimported header files or declared but not defined vars/functions?

Edit:
Not sure why but i switched from the branch to TK’s dev branch and now its working.

Haha, thanks for the laugh,

I need to re-import the shark model, I accidentally rotated him on import, and (for some reason?) did not rotate his teeth along with him. The fish have code to prevent them from flying out of the water, but only if the trace line they draw hits something. BP_Ocean doesn’t trigger hit, so I need to probably make a float value for water height and just use that vs the endpoint of the line trace. The procedural terrain is laggy at the moment, just implemented it from another open source project I found online that recently has been updated for better performance. I would enjoy any help you’re willing to provide!

Cheers,

I was able to get ray trace hits on BP_Ocean I cant rembmer exactly how though.

**Update: **I will be uploading the ā€œshipsā€ update sometime tomorrow (or Sunday if something unexpected happens :p), there are still some network jittering problems but there is no point in delaying the update any further.

I will also update the wiki (from ) when I have time with detailed information about buoyancy settings, how the per-poly collision ship is done etc.


I laughed way too hard at :smiley:

Have you checked the Min/Z configs in the fish manager?

You can add a thin box collision to the mesh then set the collision and trace channels appropriately so that it only block trace but does not actually collide with anything.

But I don’t think that would be the best method, you could easily get the world location Z of the BP_Ocean.

So something unexpected happened? :smiley:
Im really looking forward to great update TK!

The ā€œShipsā€ update is been uploaded as we speak :wink:

Please be patient as it is over 600Mb :stuck_out_tongue: I’m uploading it into 4 parts so you can easily see the changed files (and code) in the change log.

Wait for all the parts to be uploaded before downloading or things might be broken.

woohoo!

The ā€œShipsā€ update has finally been uploaded!

Download TK’s-Dev Branch

Github changelog

is a **huge **update… I had to spend literally hours to upload it and write the change list :stuck_out_tongue:

The Change List:

Code commit:

-Removed the old buoyancy movement component.

-Added new buoyancy force component.
It can be attached to any component so you can potentially have multiple
buoyant objects in one blueprint if you need to.
Also added support for skeletal meshes and per-bone density override!

-Added custom player controller.
It includes custom function for entering/leaving a ship.

Also added custom console commands for easy debugging!

drawbuoyancypoints
enablebuoyancy
nogerstner
nogerstnershader

Commit part2:

-Added BaseDepthFadeSoftness, SceneDepthSoftness & FoamDepthSoftness
parameters to bp.

-Added OceanExampleMap_02 with cubemap skylight reflections.

-Updated BP_BuoyantActor to include the new buoyancy force component and
its parameters.

-Fixed M_Clouds material to not show when underwater.

Commit part3:

part includes slightly modified assets from Epic (mostly particles
from the elemental demo, cave demo etc.)

Commit part4:

The final and interesting part of update!

-Added replication where necessary to support multiplayer (partially
still WIP).

-Added example assets: wooden barrels, crate, cannon, icebergs,
flag/sails (with apex cloth) & warship HMS Victory.

-Added sound fx: fire, cannon shots & ambient.

-Added simple UI (UMG), with health bar, ship speedometer (knots) etc.
Also added simple chatbox widget (you can chat in multiplayer!).

-Added custom (third person/true first person mix) character blueprint
with multiplayer, death, respawn, and buoyancy support!
It includes my () custom made physics asset with properly
configured bone constraints so that we can have ragdolls with more
realistic movement (definitely check out the suicide command to go into
ragdoll mode!).

-Added simple drivable boat blueprint with (multiplayer support).
You can easily swap the boat mesh to your own, adjust buoyancy points,
and you are good to go!

-Added advanced warship blueprint with physics + per-poly collision
(more info on that should be added to the wiki soon).
It has health and sinking on death, also you can add cannons to it and
fire them all at once.
You can have a multiplayer naval battle with !

-Added cannon blueprint with damage parameters which can be fired by a
player individually or be connected and fired by a drivable ship.

-Added cannon ball projectile which can have different hit particle
depending on what material it hit.
Wood can catch on fire, ice will break to little pieces, metal will
explode etc.

-Added StressTest map with warship battle to be used as benchmark.

-Updated OceanExampleMap_01 to include example boats, ships, cannons,
buoyant objects & destructible icebergs.


Screens:

http://www.mediafire.com/convkey/a140/o6dwjayil5zfwqhzg.jpg?size_id=5
(Click for original size)

http://www.mediafire.com/convkey/5300/7y5cfgp30ha7ijbzg.jpg?size_id=5
(Click for original size)

http://www.mediafire.com/convkey/5b47/bx3ww7f3c6qvsbgzg.jpg?size_id=5
(Click for original size)

http://www.mediafire.com/convkey/def7/7vgok4uz7cckeovzg.jpg?size_id=5
(Click for original size)

http://www.mediafire.com/convkey/0ebf/wbhpb04d004j03vzg.jpg?size_id=5
(Click for original size)

http://www.mediafire.com/convkey/5cfe/d5gc87lzfwrgz68zg.jpg?size_id=5
(Click for original size)

http://www.mediafire.com/convkey/f9fe/5ltibttntt55kxdzg.jpg?size_id=5
(Click for original size)

Experimental OceanExampleMap_02 with cubemap skylight reflections.
http://www.mediafire.com/convkey/661e/er6r2xx4qdff6ofzg.jpg?size_id=5
(Click for original size)

Really TK! Just been playing with it now - the shader looks really excellent now.


Hey guys. So I’m having an with the Day Night cycle again. I’m trying to set it up so I can have certain things happen when its night time and different things happen in the day time like playing music.
I’ve set the bool to take the current minute and if it is within the specified range, define that as day time. I divide the current minute by 60 to get the approximate hour so 480 = 8am and 950= is almost 4:50pm which is when the sun rises and sets.

For whatever reason when the bool is true, it thinks its night time so I had to swap the music in order to get it to work properly. I don’t understand it.

Couldn’t you have used a ā€œNOT Booleanā€ instead?

iS going to be for sale and usable in commercial projects? looks amazing

Hey guys just wanted to let you know that I will probably pause working on the project until the final 4.8 release (which could take over a month?), since I will be focusing on my other projects :stuck_out_tongue:
Rest assured though that when 4.8 comes out, the plugin will be updated as soon as possible… not only for compatibility but to also take advantage of the new 4.8 features (such as screen space reflections).

Also I have plans to add:

-An infinite plane system with configurable detail distance and LOD, which should also help with the performance a bit.
-An example map with stormy, rough/big waves.
-Foam.

My improved version of the 's branch:

I didn’t know there was such a thing. That would most likely fix the. Thanks :slight_smile:

Hey,

is looking great. I stumbled across a little while looking into KhenaB’s WIP. I’m new to UE4, but am interested in contributing to the project (and community) with my audio knowledge. I’m specifically interested in audio design for water - the visuals look fantastic, but the sound will help to make it *feel *real, right? :stuck_out_tongue:

My suggestion right now is to apply a low pass filter for when submerged by mapping an audio volume across the underwater area. There is (presumably) a way to achieve through Blueprints, but, you know… Occam’s Razor.

EDIT: Now I’ve gone into the map I can see that you have included a filter. It wasn’t noticeable as it doesn’t follow the contour of the shore, so it’s not noticeable until you’re half a mile out at sea :stuck_out_tongue: I would suggest intensifying the filter to make the difference in audio much more explicit. I appreciate is more of a personal taste, but I think it’ll really give a sense of being *immersed *in the water if the audio dulls considerably :wink:

EDIT 2: See my next post for more detail…