[Community Project] WIP Weather & Water Shader

Thanks for the help!
I found the “Draw Debug Points” option and the test point are visible when I play the game, so that is not the problem I think. Changing the mass doesn’t seem to do any difference. When I raise the Mesh Density and Lineair/Angular Fluid Damping, the ship doesn’t get trown in the air,but it falls over (every time the same side). The controls of the ship also don’t work anymore, but that probably something I did wrong.

I am not so experienced with the Unreal Engine yet, so maybe I have missed something that is obvious for you.:slight_smile:

Here are some screenshots of the settings:

Hope you are now able to see what the problem is, thanks a lot if you would try to.

Looking at your settings, the biggest I see is the “Test Point Radius” in the second image set to 50. For a large ship that is to small, for example the man-o-war ship in the examples is set to 570 (which appears to be the same ship you are using)

Here is an image showing the default BuoyancyForce setup for that ship (I highlighted the most important settings):

Try adjusting your blueprint settings to match my image above, that should make a big difference. Give it a try and let me know how it goes! :slight_smile:

Hi, I have a problem I can not compile the project, there is such an error in the logs.

The test point radius doesn’t seem to make a big difference. Raising the Fluid Linear/Angular Damping and Mesh Density makes it worse. The ship keeps falling over like :

It is very strange because the ship is very symmetric. But it does float and moves with up and down.

Thanks for helping and I hope you know the problem now.

Found the problem. On one side of the ship there were more cannons ( the weight of each was 0.01 kg, but apparently that made the difference). When you set it to your settings the buoyancy becomes better.

So for now the problem is solved. Thanks for the help and if there are other problems I will let you know.

thanks for your great effort to explain things :slight_smile:
no problem, as I have very few time to play with it as I have other project, but it is a great pleasure in free time:)

I added 6 test points - I saw them earlier but seems I missed the tooltip which states they are necessary - after using the settings you recommended, ship now doesnt sink.
I experienced also some turn overs, so my ship showed his back and debug points clearly showed that it seems lost its balance and turns over.
After checking the points, it was clear that they arent positioned correctly, some +X differences exist, so in time the ship turned.
Now the points are ok, ship is stable (too stable :slight_smile: ) and the ship seems very little responsible to waves - where I can tweak or only depends on mass and position of test points?
Even I set the waves higher, the ship buoyancy is still very stable.
Maybe the weight balance point is too low and ship is “too stable”?
I played with densitiy and damping values but will back when will have more time, but I still have to say, it looks phantastic and inspires me to continue my sea project :slight_smile:

when I have time I post some screens how my cruiser looks now :slight_smile:

Does anybody have some settings for stormy waves? I’ve been experimenting but haven’t found anything that looks good. Thanks.

Is it possible to only use the buoyancy in another project? If so how?
Thanks

For large stormy waves I would suggest increasing the “Length”, “Amplitude” and possibly the “Steepness” settings found in the Manager section of the Details panel. will adjust all of the Gerstner waves at once, to get an even better look you should open up the “Wave Set 1” drop-down box and adjust each wave’s settings to find the best look. Another way to get a stormy look is to adjust the “HeightMap Scale” and “HeightMap Displacement” settings in the HeightMap section of the Details panel.

When I start implementing the Beaufort scale (later week) I have created some “Presets” for each of the different levels in the scale. The system I have built in now goes from level 1 (calm) to level 16 (category 5 hurricane / super typhoon), the regular Beaufort scale goes from 1-12 only (see here for more info). It is not currently implemented, but will be very soon.

It is certainly possible to do so, however it will require knowledge of the system and it’s dependencies to do so.

Is there a specific project or water surface you want to implement? The Buoyancy system is currently tied to the OceanManager base class since it generates the waves, but any other system could be created from the parts in the OceanPlugin.

Let me know if you are looking for a different material shader, or a completely different system (such as WaveWorks) and I should be able to better answer the question.

Thanks!

And as a quick note, I will be pushing some changes to the Experimental branch of the on later today (won’t push to until it is in a more complete state). It is an accurate sun position algorithm that calculates the position of the sun in the sky for any time of the year, and from any location on earth.

I am going to write up some documentation on how to use it, I’m looking for volunteers to test it out with various world locations using Latitude (-90 to 90 deg) Longitude (-180 to 180 deg) and local time offset from UTC (+/- 12 hours). You can use any year from 0 to 4000 with a error tolerance of 1-2 degrees for dates furthest away from the year 2000 (which is year 0 internally, JD200).

I’m creating a quick SaveGame to add to the project to save the time/date between sessions, once that’s done I will push it to .

It has taken a lot longer than I had hoped to get operational, the math is more complex than the Gerstner formula… I have the moon position partially completed, and it will be pushed up to once the phases are added.

For content creators, I have a question:

What kind of values do you want exposed to drive things like leaf color due to seasons? Is a simple float that gives 0 at winter solstice and 1 at the summer solstice enough? The only problem I can see with that is it will be difficult to tell whether it is spring or fall since they will both be 0.5. If anyone has any ideas please let me know.

hello !
first of all, thanks for the wonderful work that you guys are doing. I wish to ask something about buoyancy. To be specific, it is possible to apply the same static mesh’s buoyancy to a character pawn? i wish to use that instead of a physics volume, so the character follows the waves movement when he is swimming.

thanks!

That’s a good question, I can’t see any reason it wouldn’t work as a concept, but might be difficult without modifying the base system. It is a really good idea as it would solve the problems with the default character swimming setup, and as you say eliminates the physics volume (for some reason you can’t add a physics volume to a blueprint).

If you want to try it out, simply add a “Buoyancy Force” component to the character and try out various settings to get him floating properly, a couple important ones would be increasing the linear damping and decreasing the mesh density. Probably will need 4 test points, one for each shoulder and each upper thigh. Biggest is he stands upright, so the testpoints will be 90 degrees off of the surface, and you only want to use the buoyancy while in water. Might need to create a specialized version of the BuoyancyForce class for characters to get around that…

Hmm, maybe it is a bit more difficult. Let me know if you have any success, I will try and play around with it once I get the new build up on . Thanks for the idea!

Hi , thanks for the reply!

what I have noticed is that, rather than a “buoyancy force”, by adding just a “buoyancy component” to the character blueprint, the pawn does what i said earlier, it follows the 's wave motion when it stays in water. The problem in is that i can not get him floating properly in the Z axis. I can not set how much the pawn is in the water and how much is outside, changing any of the relevant parameters (like density) does nothing, the character will always be half in water and half outside water.

@FraZack: I will have to play around with it a bit, currently working to get the new build ready, but will test it out asap!

Regarding the latest build for the SkyDome:

  • I am 98% of the way through getting the Moon position calculations working, so I thought I would try and release both at once.
  • The conversions from a TimeDate struct to Julian Day (and the other way around) is producing results slightly off for years further away from the year 2000 (+ and -), so I may have to clamp it to a smaller date range until I can get a more accurate formula implemented. I have tried 5 different equations and they all work fine for years close to 2000, but start to fall apart at larger/smaller dates.
  • The blueprint is a mess! I have a bit of BP-OCD where I can’t stand crossing wires etc, it’s not horrible but is bad by my standard.
  • The C++ version is not working, is all implemented in BP’s

I will try and have it out shortly, just finishing up the moon position calculations.

: are there plans to update for 4.9? I tried and it gave a few errors. I could spend a bit of time modifying some of the C++ plugin, but didn’t want to go down that road if there was already work in progress.

Thanks

Thanks for reminding me! I downloaded the promoted branch about a month ago and there was a line of code for the PhysX interaction that needs to be edited (pretty sure it was due to a deprecated function). I will download it now and repair the build before uploading, but since 4.9 is not yet released I will push it to the Experimental branch on , then to closer to release.

Will let you know when it goes up! Thanks

EDIT:

Quick update, moon is now rotating along it’s orbit as it should, only problem is it’s doing one full rotation every hour and a half… Almost there!

The math involved in calculating orbits is a bit insane, so expect the blueprints to be semi-unreadable if you have never looked into positional astronomy :stuck_out_tongue:

Ok guys, I just pushed some changes to the 4.8 branch on , it includes the new WIP skydome with real-world positioning for the Sun and Moon, and a calendar system currently. Weather & Lunar phases will be coming soon.

Let me know if you have any issues with it, it’s still WIP so it won’t be perfect, but it works! I will spend my day tomorrow creating some proper documentation, but I included many links to reference papers inside the blueprint functions. If you find any errors, please let me know!

I will push a new branch for 4.9 shortly, just need to fix up some code.

EDIT: Looking into the 4.9 build some more, there is a function that was moved for PhysX (P2UVector) from PhysicsPublic to PhysXPublic, but including the new header gives 3 new errors that I am unable to fix as they reference generated code files.

I have submitted an AnswerHub report, will update with more info asap.

I get reflection issues when using in my project.

I have the plugin in the project folder, temporal aa is enabled, both the sky and the sea are set up, I’ve got reflection captures and have rebuilt the lighting.
I can get the look I want inside the when starting from a blank scene, but using the exact same steps gets me nowhere after migrating to another project.

Sorry for being so nooby, any tips&tricks for migrating these assets? :confused:
BTW, job, thanks!!!

p.s. currently on 4.8.3.

Hey I have a few questions. I’d like to use for an level I’d like to build but there is something that I am not sure how to replicate effect below. The water is seperated by glass and you can see into the water through such as a helmet or window. Is there some way you can direct me on how to achieve effect as it would look really cool if you see the outside in the underwater level (takes place inside building/ship). Brilliant project so far, that’s just the only thing keeping me from creating the level. :slight_smile:

(youtube link for reference: watch?v=bNqg9gCckOk)

My most sincere congratulations for everything you do and what you will do again forward, I feel now fantastic new version