Announcement

Collapse
No announcement yet.

[Community Project] WIP Weather & Ocean Water Shader

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by Ruztik View Post

    Please do kindly note that it was in fact working last evening. It was upon restarting the engine this morning that this issue has occurred. There have been no software updates etc. Just a shutdown and a reboot.

    Not sure what the cause is but I ave been pulling my hair out for hours ...
    Which Ocean type is selected at BP_Ocean? Ocean Ultra?
    Nilson Lima
    Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
    Art is a state of Spirit

    Join us at Discord: https://discord.gg/QJUb5Wk
    UE4 Marketplace:
    Cloudscape Seasons

    Comment


      Originally posted by NilsonLima View Post

      Which Ocean type is selected at BP_Ocean? Ocean Ultra?
      I currently have Ocean w/ SSR & Foam selected. I have tried them all but no change in results.

      Comment


        Originally posted by NilsonLima View Post

        Which Ocean type is selected at BP_Ocean? Ocean Ultra?
        Recompiled and it works now. Thanks again for taking the time to assist. Do have a good evening.

        Comment


          Hello, I have been looking around for a water asset that will work with Forward Rendering and MSAA. This looks like an extremely big project with numerous parts that I don't necessarily need. I attempted to export only the base ocean folder to my project, but it said that it was missing its parent, which is the Ocean Manager, which I confirmed does exist in the folder. Is there anything specific I should do? Additionally, if anyone has tips on the best way to use this so that it not only looks good in VR but also doesn't destroy performance, I would greatly appreciate any advice!

          Regards,
          Matt

          Comment


            Originally posted by meuliano View Post
            Hello, I have been looking around for a water asset that will work with Forward Rendering and MSAA. This looks like an extremely big project with numerous parts that I don't necessarily need. I attempted to export only the base ocean folder to my project, but it said that it was missing its parent, which is the Ocean Manager, which I confirmed does exist in the folder. Is there anything specific I should do? Additionally, if anyone has tips on the best way to use this so that it not only looks good in VR but also doesn't destroy performance, I would greatly appreciate any advice!

            Regards,
            Matt
            Matt,
            this Community Project is a C++ Plugin, all you need to do is to copy and paste the entire Ocean folder and you need to copy the entire Plugins folder inside your project folder. Your project need to be a C++ one. Once the copy and paste is finished, you right-click your project file (.uproject) and select "Generate Visual Studio project files" it will assemble your project including the plugin. Once you open your project double-clicking the .uproject file or via Launcher you will be asked to compile the plugin, which you will say yes.

            It takes some time to understand the project parts and setup. I would recommend to get the original project and start to strip the elements you think you dont need and see the results to understand better (since it will start working already).

            Several blueprints are based (derives from) classes in C++, so it is not possible in a easy way to make the whole project to work as blueprint only. The large gains using C++ directly in this project comes from the buoyancy, which is CPU bound, and will execute really fast, while a pure blueprint counterpart would not (unless nativization was used nowadays, but this didnt exist when the project started).

            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.
            Nilson Lima
            Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
            Art is a state of Spirit

            Join us at Discord: https://discord.gg/QJUb5Wk
            UE4 Marketplace:
            Cloudscape Seasons

            Comment


              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.
              Quinton Delpeche
              Founder - Gobbo Games | Designer - The Colony 2174 (Board Game) | Developer - Riders of Asgard

              Comment


                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.

                Comment


                  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á!
                  Nilson Lima
                  Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                  Art is a state of Spirit

                  Join us at Discord: https://discord.gg/QJUb5Wk
                  UE4 Marketplace:
                  Cloudscape Seasons

                  Comment


                    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.
                    UE4 Environment Community Project
                    Slack Channel

                    Comment


                      I feel like i want to cry. lol this is so amazing and i can't believe you gave us a copy of this.
                      Matt Walton: Programmer and owner for WireLiteSoft Games.

                      Comment


                        Hey could the waves maybe have boency for the character? so he floats up and down with the waves.
                        Matt Walton: Programmer and owner for WireLiteSoft Games.

                        Comment


                          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.
                          UE4 Environment Community Project
                          Slack Channel

                          Comment


                            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.

                            Comment


                              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.
                              Nilson Lima
                              Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                              Art is a state of Spirit

                              Join us at Discord: https://discord.gg/QJUb5Wk
                              UE4 Marketplace:
                              Cloudscape Seasons

                              Comment


                                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.
                                UE4 Environment Community Project
                                Slack Channel

                                Comment

                                Working...
                                X