[Community Project] WIP Weather & Water Shader

Good to hear :slight_smile: Thank you for looking into .
I tried making a blueprint with 4 default spheres, and 4 buoyancy points placed at each sphere.
I then add the ship to the blueprint object as a child (I don’t add it inside the actual blueprint) so that it will inherit transforms.
In setup, the 4 spheres are the only thing physical and buoyant.

I divided the ship, even the hull, into multiple pieces so it would auto-convex better. I’m using the maximum hulls of 24 with 32 verts; It’s now 79 pieces instead of a few.
With setup, I do appear to collide and while it still inherits the transforms from the buoyant spheres without being part of the physics simulation (to my knowledge).
I did however crash unfortunately while testing, not sure from what.


Per-poly however does not work at present, the collision seems to vanish the minute I make it a child of the blueprint spheres.
I still think there are assets that would be better as per-poly, such as the floor. You don’t see people making terrain’s convex xD
So I’m definitely interested in whatever you figure out . =3

Also, how weird should I get with ? Any love for aurora, hurricane eyes or fire tornadoes?

Edit:

watch?v=AuR5-n6yxjo

Looks !

EDIT
@DIFTOW The terrain generation code is currently in the branch for testing purposes. We obtained it through an open source project I found ():
cA9S8n7Pc3E

Feel free to check it out! just put in the code today, so I haven’t had a to test it, but I did test it on other projects. As you can see, there was collision between the 3rd person player and the procedural terrain. I believe we can use his code with different noise functions to generate a more -looking terrain (and perhaps even give some editable variables for level designers).

I believe he uses the approach written of in GPU Gems 3

Best,

Is that one using CPU generated noise? Having explored that road a bit, but relatively new to game development and the perils of floating point errors, if anyone knows a way to get identical(or even just somewhat close) numbers out of an HLSL GPU, and a C/C++ CPU, perlin/simplex/gradient noise generator, I will make something really amazing for project.

Edit: Additionally, I’ll pay $500 now($300 for a workable solution using precomputed noise), and try to make it worth your while later.

Just your luck, Im working on a GPU based approach to the above terrain generation for my own project, if I get anywhere with it, I will post some WIPs

I’ll still be making clouds, but if you find a noise algorithm that fits the bill, my offer stands.

Doesnt anyone notice that for really large objects, you need to set them to rediculously low mass to have decent underwater buoyancy? (Without going into detail graphing how caclulates delta, force and gravityZ/-gravityZ is to calculate buoyancy (unless anyones interested in graphs about those relationships, I was going to do it if I needed them)

I have a 8000 units long, 1500 wide and 1900 tall and its calculated mass is around 150,000-200,000 kg but unless I set the mass to 300 (three hundred) kg it does really wonky things trying to set the buoyancy between -1,0 and 1.

Edit: I should note its a skeltal mesh with 1 bone placed the length of the object and skinned to all 12 tris.

Anyone? :slight_smile:

I have re-added the math and function in to print the time of day based on where the sun/moon is, its just an extension of BP_Skydome (its hte last function called) would that help?

That should do it yes, I have tried casting to BP_Skydome from another BP but could not get the variables, even after changing them to Editable/Public. Thanks!

Sorry for the delay, but to use the river tool you just drag it into your scene. You should see the arrow movement gizmo a one end of the river spline, to add a new spline segment you need to select the point on the opposite end, and then Alt+LeftMouse Drag that point out. You can then move or rotate it as needed (scale does nothing). Just keep using Alt+Drag out for each point you need.

If you want to keep up to date I would recommend using the App for Windows. From the website, Fork the repo to your personal account and then use ā€œClone in desktopā€, which will create a local copy of the project for you to run. Before opening your copy of the project the, open up the app and hit Sync with the branch selected to update to the latest release. will overwrite any changes made to the ā€œbaseā€ files provided (if that file is updated), so be warned that it may cause issues.

Otherwise just hit Download Zip and extract the files to your hard drive, just double click on the OceanDemo.uproject file to open it up. :slight_smile:

No I have not tested it at all, but I don’t see any reason why it wouldn’t work. It is a complex material though (600+ instructions) so it might cause performance issues when used with VXGI.

Cool thanks for the info, if you are interested in contributing to the project shoot me a PM with your user name (and skype so we can chat :D). We can set up an experimental branch to test out some ideas, since I am in the process of overhauling the Skydome it would be a great time to try it out and properly integrate it. Let me know! :slight_smile:

Multiplayer is the use, but you could also create a new buoyancy system using blueprints now that you can get the wave height at any location. We’re still testing out some ideas for the terrain system, there is more content that has not been added at point. More info on soon.

So long as it is a realistic weather effect, as weird as you want! :stuck_out_tongue: Things like waterspouts, tornado’s, and etc would be really cool, but aren’t required. But feel free to create anything you’d like!

I’m looking into right now, and I do see a similar effect. Need to do a bit more testing, but will get back to you.

I must have missed the first time around apologies for that. The simplest way is to go into the Skydome blueprint, then find the ā€œSunHeightā€ variable and set it’s visibility to Public (with the little green/yellow eye icon) and save/compile the blueprint. With that set you should be able to access it in another class by casting to BP_Skydome. :slight_smile:

No worries, thanks for taking the time. I tried that but will check again!

Zeroy is what bp_skydome is built off of https://.unrealengine.com/showthread.php?1613-Tutorial-Quick-Time-of-Day-Setup with an hour comparing the two (dotcams cleaned it up a lot) you can re-add the writeTimeWHatever function and and use something with that. I have it done, but havnt had time to sift through my dozens of test projects for game to find out where i did that.

Thanks, I got the Sun height variable via a Cast TO BP_SkyDome, not sure what I was doing wrong before!!

If you want the bp_skydome that prints out the ToD to the log with a print string node let me know I do have it, I can just be a little slow sometimes (sorry no time for fish!) You basically take currentminute though and divide it by 60 to get minutes and then divide 1440 by minutes or something like that. My math isn’t strong of the top of my head, thats where visual scripting is nice.

Got the sub rigged up in Maya finally.

Should be no more problems now I can start developing for real. Note to Blender users: Its fine for static meshes. But you need maya for anything skeletal, simple fact of UE4 right now and will save you weeks (or longer, luckilly we didnt get too far). Still have to set 9000x1500x1700 sub to 300kg (calculated as about 289,000kg) for it to work with buoyancy test points of -1,0,1 and radius 10 but it works. Intrested to see how is going to use the specific gravity of water to do buoyancy. The only buoyancy scripts I’ve used before cuts it into slices and applies force accordingly. http://forum.unity3d.com/threads/buoyancy-script.72974/ dont know if that helps, its what I used over in Unity (albeit heavily modified)

Thanks again. Printing might be useful but for me it was more a matter of being able to trigger various thing depending on ToD. Like those birds circling from UE4Lanscape demo, best to have them gone at night and so on … Now I can do that!

problems packaging the plugin

First of all, thanks for the excellent work on project. I LOVE it. It is perfect for my island map project.

Ever since was converted to a plugin, I am not able to get to work after building my project.

I am using the latest version of the plugin and UE 4.7.3

Everything works great in the editor. I can package the project without an error but when I try and run the exe after packaging I get error that the plugin cannot be found.

I have read all I can find on the about . My plugin is in the plugins folder within my project folder. \Unreal Projects\IOTA\Plugins\OceanPlugin\OceanPlugin.uplugin

I have tried suggestions (at least the ones I can understand). Some of the comments suggest rebuilding the plugin project (I think) but I don’t understand how I can do that with plugin as it does not seem to have all the files I would need to rebuild source in visual studio (or I just don’t understand how to do it i.e. how do I get a .sln file for ?). FYI I have also tried rebuilding the UE4 engine via etc.

Also, I was able to build and use shader just fine before it was converted to a plugin. It is quite likely that I am just missing some simple step. I have no experience with VS beyond just following the step by step instructions for rebuilding project via .

I am fairly new to game development and need simple/basic instructions on how to make plugin work. Please forgive my inexperience with all . Any help would be greatly appreciated.

Thanks very much!

I don’t know if the current code does but the forces are applied with AddImpulse instead of AddForce to ignore the mass of the object.

I just read the technique from the unity forum and it’s dividing the volume up automatically and testing all those points along the volume, is more accurate. Keep in mind that they are also doing buoyancy against the water level and thus a flat plane without wave calculations.

My approach is to manually place the points along the volume to simply calculate Force/Torque vectors at those points. It’s a big simplification that is meant to greatly reduce the amount of calculations per object. When I first implemented I had no idea on performance. Center of mass is always assumed to be the objects center/pivot. As for specific gravity and buoyancy, I simply use the buoyancy factor to multiply the force at a point. Factor of 1 will apply the full force of the points volume (cubic, not spherical) upward and a factor of -1 sinks with the force of gravity as if there is no water. 0 is neutral and that point will not apply any force. Mass/density distribution is not implemented and is instead faked by these manual points.

Because there are too few points it’s possible that the objects are a bit unstable. Adding a bool to autogenerate the points/voxels might not be a bad idea for more complicated objects since it appears that the gerstner wave calculation is not too heavy on the CPU and testing 3x3x3 grid of point could be doable.

And there is another optimization that should be brought to the buoyancy calculation, if the point is far enough away from the water surface (greater than amplitude), then the wave calculation should be skipped. Only points near the surface need to care and only when the waves are significantly large.

Anybody who knows a bit about physics and buoyancy that knows a better simulation approach please chime in.

Thats interesting. So my 200,000kg object will sink with -1 on all the test points the same as if I override my mass to 300kg?

I’d love to improve the buoyancy in anyway possible, I can code in C++, just slowly cause I’m not familiar with the Unreal API yet at all, any any testing I’m spending 11-15 hours a day working on submersibles and surface ships exclusively and extremely accuratly/realistically, nothing land based, plus my studios partner putting in probably about the same amount of hours.

I have maybe a half dozen to a dozen different c# buoyancy scripts that I can pastebin just the parts that actually calculate where, why, how and when to apply force.

Edit: I didn’t realize all 3 of us are Canadian. Too bad you and arnt Edmontonians!

@,
You guys should check out my branch of the plugin, I actually have added just yesterday a second buoyancy component that uses a more physically-based approach to buoyancy, it’s what I use :slight_smile: