Announcement

Collapse
No announcement yet.

[Community Project] WIP Weather & Ocean Water Shader

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by Dihydrogenmonoxide43 View Post
    Hey, this may be irrelevant, since I haven't seen anyone post this problem, but in case anyone is having it...
    Since I updated to 4.18, my dynamic time of day wasn't moving at the time scale I set. If you are having this problem, you need to open TimeManager.cpp, and on line 185, multiply the value there by TimeScaleMultiplier, so it looks like this: InternalTime += FTimespan::FromSeconds(deltaTime) * TimeScaleMultiplier;
    It was just missing that for some reason, but after that, it works.
    This was already committed, into the 4.18 version on github in December, however there are other issues present as well, such as using daylight saving time rapidly running the clock on the sun, and also, if you set a known lat/long time/day to a known eclipse, the sun/moon wont overlap.

    Weather Update: Real time visualization of weather simulator data!
    Click image for larger version  Name:	WeatherDebugging.jpg Views:	1 Size:	358.9 KB ID:	1433386
    Click image for larger version

Name:	WeatherDebugging2.jpg
Views:	34
Size:	397.9 KB
ID:	1433388
    Last edited by EvoPulseGaming; 02-23-2018, 01:45 AM.

    Leave a comment:


  • replied
    Hey, this may be irrelevant, since I haven't seen anyone post this problem, but in case anyone is having it...
    Since I updated to 4.18, my dynamic time of day wasn't moving at the time scale I set. If you are having this problem, you need to open TimeManager.cpp, and on line 185, multiply the value there by TimeScaleMultiplier, so it looks like this: InternalTime += FTimespan::FromSeconds(deltaTime) * TimeScaleMultiplier;
    It was just missing that for some reason, but after that, it works.

    Leave a comment:


  • replied

    Originally posted by Connormcfarland View Post
    This may sound dumb, but i am trying to sail the ships/breake the dock rope, and no keys are working, and also the fish do not swim when placed into the world so is there a type of nav mesh or something? sorry, havent found any tutorials on this, but i am absolutely LOVING this man!
    Add the FishManagerBP to your scene, open fish manager and in the default settings, at the top, you can select multiple classes of those fish, and how many of them. You have to use FishManagerBp to do this, as the fish wont do anything, or will crash the editor (Another user and I both experience crashes)

    As for the boats, I know for a fact the Man-O-War is drivable, and the cannons work. You could easily copy the blueprint nodes from that and put them into the smaller boat.
    (Open the project setttings and check the inputs, or open the Man-O-War BP and check them there. I believe they are defined separately in each bp

    Also to play with the physics rope, just grab with your left mouse button and "swing" and release. Have fun watching two boats ping pong like crazy

    Also, the breakable rope, same thing, but if you "swing" hard enough, the boat will break free... but when you swing it that hard, it flys into space....

    Leave a comment:


  • replied
    Hey Connormcfarland,

    The ships are there just for the beauty, the dock rope I guess never worked and there was a map previously showing the fish swiming and it depends on a class inside the Ocean C++ plugin called FishManager. There is no tutorial, but it is recommended for new users to look the thread posts for hints on how to do some things. You got also to take a look in the several maps, and at the BP_Ocean blueprint check all the Ocean shaders available which in the list are sorted by increased complexity (sometimes also beauty) which translates into cost.

    The plugin is there for anyone to use and change as much as necessary to fit his needs.

    Leave a comment:


  • replied
    This may sound dumb, but i am trying to sail the ships/breake the dock rope, and no keys are working, and also the fish do not swim when placed into the world so is there a type of nav mesh or something? sorry, havent found any tutorials on this, but i am absolutely LOVING this man!

    Leave a comment:


  • replied
    Originally posted by NilsonLima View Post

    This is what I could get from masking the postprocess to a sphere, which can easily adapted to a box mask, thou for complex shapes you will still need to go for a Distance Field solution, which unfortunetely takes more time.

    The video contains a small level, wich the ocean and an island, the dome inside the ocean and I am showing a glass material for the dome and the changes needed into the Postprocessing material for the mask and some hints on how to expand the concept.

    The video: https://youtu.be/FUxQAv5FIuM

    Anyone making useful stuff for this project, I invite you all to "share" once in a while, makes sense since this project takes a long time to accomplish and its been given for FREE.

    Cheers!
    +1, I'm pretty sure by the looks of the 300 forks, that many have made improvements, but never updated the fork or ran a pull request...

    btw the weather simulator runs .2 second loops now! If I can get it to .1 or even .05 I would be content! (Hopefully I can share the bp exposed version of this tied in with the OceanProject on my github in about a week)

    I've opened a slack channel for those interesting in building this project together:
    https://join.slack.com/t/oceanandwea...DMyZjIwMzZiNmE
    Last edited by EvoPulseGaming; 02-19-2018, 07:10 PM.

    Leave a comment:


  • replied
    Originally posted by Freddiieehh View Post

    Been googling/youtubing around for couple of hours now and doesn't understand anything nor feel like I'm getting anywhere lol.
    Ima just take a break for now and deal with it another time, and/or just make a thread about it cuz if I were to start edit and playing around with the post process material I would most likely just ruin something. Like you said I will most likely never find the complete solution, which just makes everything even more confusing, being able to tell what would help me and what wouldn't lol.
    But yeah, for now Ima just take a break from it before my blonde head explodes.
    Thank you anyways for the help so far (Y)
    This is what I could get from masking the postprocess to a sphere, which can easily adapted to a box mask, thou for complex shapes you will still need to go for a Distance Field solution, which unfortunetely takes more time.

    The video contains a small level, wich the ocean and an island, the dome inside the ocean and I am showing a glass material for the dome and the changes needed into the Postprocessing material for the mask and some hints on how to expand the concept.

    The video:

    Anyone making useful stuff for this project, I invite you all to "share" once in a while, makes sense since this project takes a long time to accomplish and its been given for FREE.

    Cheers!
    Last edited by NilsonLima; 02-20-2018, 07:17 AM.

    Leave a comment:


  • replied
    This was for the thread regarding NeOcean:

    Maybe a job in chicanery, yes.

    Really wanted a BP solution, ended up at GumRoad buying NeOcean. Jonathan was gushing about the latest update. It came with zero documentation, and looked worse than the videos by far, no matter how much I wasted my time.

    Jonathon is happy to share that next version NeOcean is going from it's current all Blueprints - to be a C++ and Blueprints hybrid, again. Sound familiar?

    I asked for a refund, since he told me on Facebook there was a trial and would be treated "special" for buying from Gumroad, I figured there would be no problem.

    First, he tells me there's no refund.
    Then he tells me he can't refund, because of my payment method.
    Then he tells me he had told me to wait, for the new website, before I bought (implying it was my fault?)
    Then, after making him aware of one, he was acting like a crook, and two, my bank would deal with him, and three, I would share this info with the community....

    ...then, he suddenly, was able to refund my money. I think. I haven't seen confirmation yet.

    If you are thinking of giving this kid a job, idk "bright" is the relevant word I'd be using while discussing your available candidates.

    Leave a comment:


  • replied
    Originally posted by frostic View Post
    Hey could the waves maybe have boency for the character? so he floats up and down with the waves.

    It is easily do-able, there are coded "test points" that are attached to the object for the buoyancy code to use to generate the effect. I have not had time to even look in that direction yet, so if the test points are done in bp or c++, i'm not sure.

    I foresee a small issue that you would have to over come, and that is the fact I believe the buoyancy code runs under the assumption that the object should always face up, so while a boat will work, a human character that can lie horizontally flat will turn upright, because the code does not understand you are swimming/floating.

    I would try making the test points near the horizontal and vertical center of the character the dominate points, and then add a weaker test point to the head and feet (and hands?) but expect the need to play with the weight settings and placement of the test points.

    Last edited by EvoPulseGaming; 02-19-2018, 12:52 AM.

    Leave a comment:


  • replied
    Hey could the waves maybe have boency for the character? so he floats up and down with the waves.

    Leave a comment:


  • replied
    I feel like i want to cry. lol this is so amazing and i can't believe you gave us a copy of this.

    Leave a comment:


  • replied
    Originally posted by eobet View Post

    It's very unfortunate that it's not prepared for blueprints, forward rendering and VR.

    Hopefully some day, someone will update it for that purpose! Now I must go shopping for something that works.
    I am implementing a semi- scientifically correct dynamic weather system in bp only, converting everything back to bp

    Edit: Scratch all this.... For performance reasons I will have to move all the heavy code to c++, and expose the controlling logic to bp. While a .7 second c++ loop, vs a 2 second bp loop is not bad, since this needs to run real time every second, this wont work. Also considering the major speed improvements I made (2 sec per loop) to get this to run this fast in blueprints can also be transfered to c++, so hopefully I can get this to run .2 seconds per 1 second of simulation, so there is room for everything else.

    using .2 of a second for a fully dynamic and scientifically semi-acurate weather system is not a bad deal.

    Edit: c++ code now runs .35 ~ .38 sec loops

    Edit!!! now at .2 sec loops!!!:
    Click image for larger version  Name:	 Views:	1 Size:	61.4 KB ID:	1431333 < - - - - - Yes, thats 100 seconds of weather simulation done in 20!

    Edit : .18 seconds per 1 second of weather simulation, i'm starting to lean into micro optimizations, so its time to move on! (5 year old computer anyways, should perform great!)


    Pics or it didn't happen:

    Click image for larger version  Name:	 Views:	1 Size:	229.6 KB ID:	1430060 Click image for larger version  Name:	 Views:	1 Size:	293.4 KB ID:	1430063Click image for larger version  Name:	 Views:	1 Size:	337.9 KB ID:	1430061Click image for larger version  Name:	 Views:	1 Size:	200.2 KB ID:	1430062

    As you can tell its loop/math/array heavy, but there were MANY optimizations I made to do this in bp.
    • Math expression nodes are your friend for heavy math in BP
    • Array variables that were accessed more than 2x per loop were given a variable (saved a few million get/set iterations!)
    • Since we are using a 3D->FlatArray, everything is coded with "Array Indexes" aka pointers, the original code, calculated the array column index EVERY SINGLE TIME a get or set to the array was done, I removed all of them and setup "precomputed" indexes that only ran 1x per loop, vs hundreds per loop
    • Code that didn't do anything was removed (really... there were a few spots that NEVER hit a break-point)
    • Variables in loops that were set with a value from an array, and used only once... removed (1 get is cheaper than get/set/get)
    • Removed 8+ loops:
    • 3 of the 4 major loops used a xloop -> yloop -> zloop setup, but I realized, the calculated "array index" ended up being sequential, so I used a single loop in place.
    • The 4th major loop does this as well, but has moments where it calls (x-1, y, z), in which case there is a "torridial" function that wraps the columns and rows (can't have negative indexes!) so there is limited optimizing here...
    • There were values calculated and then a conditional that would set the value again, those were reversed, as we should check n set before blindly calculating... 1x check n set vs 1x set, check, and maybe set again)
    • Direct references were used everywhere, to reduce overhead of copies

      Each major loop totals to about 5200, so about 28,000 loops in total per ONE "second" of simulation

      When all is said and done, the end user shall not have to worry about anything, but setting the time/day/lat/long. Which is already used by the ocean project time manager... everything else will be in a nested blueprint, so there is no clutter when working with the main blueprint.


      Just added a picture of the updated Step1, notice the use of math expressions, the removal of two loops,and how much cleaner this looks (Not to mention the editor no longer lags for a few seconds over trivial changes like it used to when inside this function)

      Click image for larger version  Name:	 Views:	2 Size:	398.3 KB ID:	1430066vs

    Attached Files
    Last edited by EvoPulseGaming; 02-20-2018, 02:09 AM.

    Leave a comment:


  • replied
    Originally posted by eobet View Post

    I am in the exact same situation as meuliano (I just want a water surface, and perhaps subtraction volumes, but no physics or underwater), and I'm also completely new to Unreal Engine.

    I can't complain, since this is one of the few free things for Unreal Engine, and it looks very high quality, but it's very unfortunate that it's not prepared for blueprints, forward rendering and VR.

    Hopefully some day, someone will update it for that purpose! Now I must go shopping for something that works.
    Did you have a look at the free asset Water Planes from Epic at Marketplace/Learn Tab? Those are quite nice, but they dont have super waves...

    In order for any material to work with forward rendering you need to do two steps:

    - inside the material, mark at Translucency section, Lighting Mode=Surface ForwardShading
    - change the project settings at Engine->Rendering section, Forward Renderer, mark Forward Shading (See below)

    Once you mark the option for Forward Rendering all your shaders will be compiled and takes a lot of time, so do not worry, let it do it.

    After all is finished you can plug your VR gear and voilá!

    Leave a comment:


  • replied
    Originally posted by NilsonLima View Post
    Your project need to be a C++ one.

    As for the type of water you need with Forward Rendering and MSAA, with some little changes in the various water materials we have inside the project you can use it with Forward Rendering and as for MSAA I didn't try myself changing the Project settings, be my guest. My current line of work is focused on the deferred render.
    I am in the exact same situation as meuliano (I just want a water surface, and perhaps subtraction volumes, but no physics or underwater), and I'm also completely new to Unreal Engine.

    I can't complain, since this is one of the few free things for Unreal Engine, and it looks very high quality, but it's very unfortunate that it's not prepared for blueprints, forward rendering and VR.

    Hopefully some day, someone will update it for that purpose! Now I must go shopping for something that works.

    Leave a comment:


  • replied
    This is Epic ... sorry couldn't resist. This worked out of the box and I only had to track down one little project setting to successfully migrate this to my project. I now have it this beautiful ocean lapping around the shores of my 64km2 map that is surrounded by Ultra Dynamic Sky and filled by Procedural Landscape Ecosystem.

    The only change I had to make was adding a "Switch Has Authority" to 'BP_Underwater' in order to not get errors on my dedicated server when displaying the camera drip effects.

    I love this plugin and would like to thank everyone in the community who has contributed to make this plugin awesome.
    Last edited by qdelpeche; 02-15-2018, 10:15 AM.

    Leave a comment:

Working...
X