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

    Originally posted by Coniunctio View Post
    upgrade to version 4.12 please
    Version for 4.12 has been out for a couple months nearly.
    Tek LLC a personal Candaian Company running BlenderTek & UnrealTek is currently looking for help to bring back submarine simulator gaming with a new genre of sub sims: Cold War! (1945-1991) Operation: Trident SubSim Dev Diary Thread - Donations

    Comment


      Hey,

      first: Nice Project. I hope you can help me. i placed the ocean into my level and i want to change the position and it doesnt work. i changed position but the ocean is still on the same position. i want to set the resolution scale and the positon into my level (i want the water into my swimming pool in my level). also i want that the waves are not so strong and the water is red. so my questions:

      1. how to change the position of Ocean BP ?? (Water)
      2. How to change the color of water ??
      3. how to change the waves (not so high/strong)

      Im using unreal 4.11.2

      thanks for help and sorry for my language i`m german

      regards

      Comment


        The project has now been updated for ver 4.12

        Special thanks to LeFxGuy for helping out with recompiling the shaders for 4.12, and for the FlockFish fix!

        The 4.12preview branch will be removed shortly as a new branch was added for 4.12 (it is now the default branch):
        https://github.com/UE4-OceanProject/OceanProject

        A new update will be merged in for the SkyDome update very soon, 4.12 got released earlier than I expected...

        Thanks!
        Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

        Comment


          A quick note for those moving to version 4.12, Planar Reflections are enabled by default. There are some issues with them that I want to point out:
          - The reflection is applied to any surface with less than 20 degree slope at 400 units above, or below the ocean level. This includes Opaque and fully rough materials (DanielW will be fixing this in an upcoming release).
          - The reflections do not take surface displacement into account, meaning the panning normal maps are the only thing affecting the reflections. With a high enough distortion value, it looks just fine from most angles, but it can cause reflection of an object behind a wave to reflect in front of the wave with the camera at surface level.
          - Planar reflections are slower than SSR

          There are more that I haven't covered here, please see this thread for more info on the limitations currently.


          If you want to disable Planar Reflections and use SSR instead, please do the following:
          1) Open the BP_Ocean blueprint from the Ocean folder and in the Components tab right click on the PlanarReflection Component and select delete. Rebuild the blueprint.
          2) Open the M_Ocean_Ultra material in the Ocean\Materials\M_Ocean_Versions folder, then in the details panel on the left enable the checkbox named "Screen Space Reflections" from the Translucency tab.
          3) Compile the material and you are now back to SSR only.

          Thanks
          Last edited by DotCam; 06-03-2016, 05:05 PM.
          Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

          Comment


            Hey guys, I've been trying to reduce the opacity of the ocean ultra shader on the shore, I've tried all opacity settings but they seem to do no good. Tried editing the material but can't figure out how UE works on translucent materials. So I have a couple of stuff to ask you.

            1 - Does anyone knows how to reduce translucency on the shore? I never seen an ocean that is so translucent as in the island map. I don't want to change the scene depth parameter as that changes the water color on shallow areas.

            2 - Also I still get the black spots in the water. I thought planar reflections would solve that and well...it did solve a lot of things...but the ocean still have some dark spots that I can't get rid off.

            3 - Also as many before me I can't seem to tweak the wave settings to achieve the look I am looking for, there are WAY too many waves, it's like every 2-3 seconds huge wave in the face. they should be slightly bigger but way less frequent, the only setting that seems to reduce the frequency of the waves in the wave cluster length and while that sort of works, there is still too many...overusing that setting causes tiny but really powerful almost tsunami-like waves that throws the player pawn into the sky and all boats get really funky.

            4 - Perhaps related to 2 and 1, the waves are translucent, it's a bit weird I can see right through them specially on foamy areas along with some black spots as well. Tried increasing the tesselation but that seems to break up the mesh leaving white (missing) spots on the ocean surface.

            I've tried both planar reflections and SSR and the issue seems to be the same, even with the default settings.

            can somebody confirm this issues or is it just me? I'll keep trying to fix them if they exist, might be that I am doing something wrong in that case please enlighten me I've read this thread from back to back and still can't find a solution.

            I've been comparing this to gta V water and while I think that technically our water is better (more realistic, better movement) the gta water looks better for some reason been trying to figure out why.

            EDIT: Added image

            Attached Files
            Last edited by DavidNSilva; 06-04-2016, 07:42 AM.

            Comment


              Weird edge

              Hi,

              This is my first post - I usually do not have the time to post here, unfortunately.

              First off, this is a great water shader! Everyone here (especially the authors) has done a really great job! - I tried to create my own for months but I failed with extremely bad results.

              I do not know if this has been discussed already. But I just upgraded this Ocean shader to 4.12 and I have noticed some strange behaviors with planar reflections that I do not seem to be able to get rid of..

              Here is a picture of the problem:
              Click image for larger version

Name:	0f4dd1fcbafca84388b4f49cbe79f507.png
Views:	1
Size:	954.3 KB
ID:	1107678

              I seem to be able to get rid of it by disabling the skydome(object) - However that is not really a good solution...


              The same type of behaviour appears in the example scenes.

              I tried to change to SSR instead - That works great, but I really want to test out the planar reflections

              Also the edge appears after a certain distance:
              Click image for larger version

Name:	9208f99dfec0abb86225e0312df64e60.png
Views:	1
Size:	903.9 KB
ID:	1107680

              The strange water starts off at (0,0,0) and my custom water (with the correct color settings etc) is enabled outside after the edge:

              With the skydome enabled (the strange water appears):


              With the skydome disabled (my custom water is enabled and I get the result I want)


              I am using a custom day/night cycle (not the one that is provided in the example) - But since I mentioned somewhere above (hopefully) that this also appears in the sample scenes, it can therefore not be anything in my scene.

              Since I am doing other things I haven't had the time to go deeper into this shader and see what is happening and how the Blueprints works etc.. So that is why I am reaching out here first. Maybe this is all just one setting on my end and that there is a really easy fix - I honestly do not know.

              I have tried recreating all the reflections using a capture object

              Also, the planar reflection object does not inherit the same behaviour:


              *Therefore there must be something with the water? - But what do I know..

              The effect persists even if I use "move water with camera":


              I did edit some of the shader properties in the 4.11 version, but since the upgrade I haven't touched it.

              If I come up with a solution I will post it here (Or perhaps I have just messed up something somewhere and therefore I could be the only one who has this problem..?)

              Best regards,
              Squad

              I came up with a SOLUTION:

              Apparently the water was scaled to (x,y,z): 1.25,1.25,1.25

              I scaled it back to 1,1,1 and now I have no issues whatsoever, anywhere - That feels great but.. - I also feel stupid.
              Attached Files
              Last edited by Squad32; 06-04-2016, 12:09 PM.

              Comment


                Originally posted by DavidNSilva View Post
                Hey guys, I've been trying to reduce the opacity of the ocean ultra shader on the shore, I've tried all opacity settings but they seem to do no good. Tried editing the material but can't figure out how UE works on translucent materials. So I have a couple of stuff to ask you.

                1 - Does anyone knows how to reduce translucency on the shore? I never seen an ocean that is so translucent as in the island map. I don't want to change the scene depth parameter as that changes the water color on shallow areas.
                It's set up for tropical water by default, I live in the pacific northwest so I know what you mean, the water can look much different depending where you are in the world.

                To change it you will need to do 2 things:
                1) Adjust the shallow water color to be more blue, around here the ocean is dark blue on the surface and dark greenish-blue underwater. Adjust it to your preference.
                2) set the "Scene color custom depth" setting to around 500 to 1000, this will move the depth at which the water is fully translucent closer to shore.

                Only adjusting the scene custom depth will not give you optimal results, let me know if this still won't work for you, the shader can be modified further.

                2 - Also I still get the black spots in the water. I thought planar reflections would solve that and well...it did solve a lot of things...but the ocean still have some dark spots that I can't get rid off.
                It looks like that is being caused by the foam texture itself. I'll look into this some more and see if I can find a fix.

                3 - Also as many before me I can't seem to tweak the wave settings to achieve the look I am looking for, there are WAY too many waves, it's like every 2-3 seconds huge wave in the face. they should be slightly bigger but way less frequent, the only setting that seems to reduce the frequency of the waves in the wave cluster length and while that sort of works, there is still too many...overusing that setting causes tiny but really powerful almost tsunami-like waves that throws the player pawn into the sky and all boats get really funky.
                You're correct, the waves are controlled by the OceanManager settings such as amplitude, length etc. Try these settings:
                In "Wave Clusters" -> "0"
                - Length = 4500
                - Amplitude = 200
                - Steepness = 1
                Then change the Foam Wave Caps
                - Foam Caps Height to 200

                If this still is too much, you can manually adjust each of the 8 waves that are generated by clicking the + sign on "Wave Sets Offsets Override", which will create a new struct containing the default values for each wave. Try setting 2-4 of these to higher values, and the other 4-6 to lower (or even 0 for a couple of them) and you should get a better spread.

                4 - Perhaps related to 2 and 1, the waves are translucent, it's a bit weird I can see right through them specially on foamy areas along with some black spots as well. Tried increasing the tesselation but that seems to break up the mesh leaving white (missing) spots on the ocean surface.

                I've tried both planar reflections and SSR and the issue seems to be the same, even with the default settings.
                The tessellation issue has been fixed on my internal build, which will be released in the coming days. To get it to work you need to alter the materials quite a bit, and tessellation does look much better. I will push that update later this morning, the rest of the update is still a couple days from release.

                can somebody confirm this issues or is it just me? I'll keep trying to fix them if they exist, might be that I am doing something wrong in that case please enlighten me I've read this thread from back to back and still can't find a solution.

                I've been comparing this to gta V water and while I think that technically our water is better (more realistic, better movement) the gta water looks better for some reason been trying to figure out why.

                EDIT: Added image
                GTA V uses the Tessendorf formula's for their ocean (which is a combination of FFT and gerster waves), while this project is currently only gerstner. It's possible to get really close to the GTA V look by (highly) customizing the materials, but at this time is not really possible to duplicate. FFT is very complex and requires a lot of code, but is something we are investigating.

                Thanks!
                Last edited by DotCam; 06-04-2016, 12:37 PM.
                Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                Comment


                  Originally posted by Squad32 View Post
                  ....
                  I came up with a SOLUTION:

                  Apparently the water was scaled to (x,y,z): 1.25,1.25,1.25

                  I scaled it back to 1,1,1 and now I have no issues whatsoever, anywhere - That feels great but.. - I also feel stupid.
                  That fixed the whole issue? That's great but at the same time means something is wrong, it should scale properly since it's world position based. I'll look into it and see what's up.

                  Not sure by the images, but the Post Process included with the demo project has Gaussian DOF turned on, which is set to show up at a certain distance (in the demo level the world origin is not 0,0,0 currently). In my project I disable DOF usually, not a big fan of it, but by default it will create a sudden barrier where the water looks fine then all of a sudden is entirely blurry. If you have the PP_Global in your scene, try disabling the GaussianDOF setting just in case that is contributing to the problem.

                  Thanks for the images, I'll see if I can find out why that's happening.
                  Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                  Comment


                    Originally posted by DotCam View Post
                    It's set up for tropical water by default, I live in the pacific northwest so I know what you mean, the water can look much different depending where you are in the world.

                    To change it you will need to do 2 things:
                    1) Adjust the shallow water color to be more blue, around here the ocean is dark blue on the surface and dark greenish-blue underwater. Adjust it to your preference.
                    2) set the "Scene color custom depth" setting to around 500 to 1000, this will move the depth at which the water is fully translucent closer to shore.

                    Only adjusting the scene custom depth will not give you optimal results, let me know if this still won't work for you, the shader can be modified further.
                    Great to have a reply from you DotCam!

                    That sort of worked, I wish I could keep the green tone with more opacity but I think I can manage it. thanks!


                    Originally posted by DotCam View Post
                    It looks like that is being caused by the foam texture itself. I'll look into this some more and see if I can find a fix.

                    The foam is disabled on that screenshot, but it also happens when it has default settings right from github.


                    Originally posted by DotCam View Post
                    You're correct, the waves are controlled by the OceanManager settings such as amplitude, length etc. Try these settings:
                    In "Wave Clusters" -> "0"
                    - Length = 4500
                    - Amplitude = 200
                    - Steepness = 1
                    Then change the Foam Wave Caps
                    - Foam Caps Height to 200

                    If this still is too much, you can manually adjust each of the 8 waves that are generated by clicking the + sign on "Wave Sets Offsets Override", which will create a new struct containing the default values for each wave. Try setting 2-4 of these to higher values, and the other 4-6 to lower (or even 0 for a couple of them) and you should get a better spread.
                    I tried that before, the problem is....I get less waves but with less amplitude. I can't seem to get medium waves with less frequency. Either I have a lot of waves or very little but no amplitude.
                    Is this a gerstner wave limitation?

                    I wanted something like this https://www.youtube.com/watch?v=envvGKwlNd4

                    Maybe with a little more amplitude but about that frequency. I think it would be a bit annoying for the player to be constantly hit by a wave, but little waves are no fun :P

                    I'll keep messing around with those values.

                    Comment


                      Fun fact that I missed from the 4.12 changelog:

                      New: Heightfields are now represented in the global distance field, which is useful for fading out water normals near shores.

                      \o/
                      Trent Polack (@mittense)
                      Personal Site | Development Blog | Joy Machine

                      Comment


                        quick question from .. page 1 .. followup ?
                        The river thing was mentioned, and, i was wondering what ever came about for that? I have been waiting for someone to come up with a BP-driven river spline tool "forever". lol
                        Kitedemo has one, kinda, and, without the documentation on it, kinda left pressing random buttons and seeing what happens (plus the water is terrible for "general use")
                        Founder and CEO of Angry Penguin Studio, LLC
                        Dallas, TX USA
                        https://www.facebook.com/AngryPenguinStudios

                        Comment


                          Originally posted by Angrytoilet View Post
                          quick question from .. page 1 .. followup ?
                          The river thing was mentioned, and, i was wondering what ever came about for that? I have been waiting for someone to come up with a BP-driven river spline tool "forever". lol
                          Kitedemo has one, kinda, and, without the documentation on it, kinda left pressing random buttons and seeing what happens (plus the water is terrible for "general use")
                          I would love to see that too!

                          Comment


                            Would anyone have an objection to me packaging this is in a bundle, sort of a kick start to a multiplayer game? It would be free and open source and I would give full credit to you guys for all of your hard work of course.

                            The bundle would include a virtual Linux server and other free assets, to give developers a head start on a large multiplayer open world, that could easily be scaled and deployed to a more powerful server when it was ready for production. It would also provide some more scripts to make it easier to manage the server, and cook the project and deploy it to it. I always felt like an ocean should be included in the engine, like with Cryengine. I really like what you've done with the player blueprint as well.

                            How it would work basically, is users would create a new empty project in UE4, then copy a script into the new project folder, execute it, and it would integrate the Ocean Plugin and other content (foliage, materials, etc.) automatically, and then build a virtual Linux server using VirtualBox, so when the scripts are complete, they would have a fully functional multiplayer game with all of the bells and whistles. I may eventually be able to have it integrate with existing projects.

                            I'm doing this for myself really. I'm one of those guys that has started hundreds of projects and never finished one. But I thought others may find it useful.

                            Comment


                              Hi Quintela, Angrytoilet, I believe there's a BP spline river system in this pack:
                              https://www.unrealengine.com/marketp...ature-pack-vol

                              Along with a lot else, obviously. I don't have the pack personally and not sure if it suits your purposes but it does exist.

                              This being my first post in this thread I should take this chance to thank DotCam, TK-Master and all other contributors for releasing the ocean project to the community.
                              On the forum, Kev will do.

                              Comment


                                There's a spline-BP river in the Kite Demo assets. It takes a bit of fiddling to make it look right but it works and is free.
                                Storyteller - An immersive VR audiobook player

                                Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

                                Comment

                                Working...
                                X