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 TK-Master View Post
    So I started experimenting with the 4.8 preview.. I added an option in the ocean BP to enable the new SSR feature (screen space reflections).

    This is how it currently looks like:

    No SSR:
    >> Image Optimized Out <<
    (click for original size)

    SSR:
    >> Image Optimized Out <<
    (click for original size)

    I have to say, reflections look pretty noisy, they change really absurdly depending on the camera angle(well that's the nature of screen space I guess) and you have to use Temporal AA instead of FXAA.
    I guess we will not have realistic water in UE4 any time soon.. sigh.. Epic.. y u no like water.. *crying face*
    Did you have to change any of the materials to get it to work, or did that work out of the box?

    Comment


      The material worked out of the box for me (well excluding the SSR ofc, that had to be enabled).

      Which version of the editor are you using? preview? master? (linux?)

      4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
      WIP Interactive Water Shader, WIP 2D Water Sim
      WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

      Comment


        Originally posted by TK-Master View Post
        The material worked out of the box for me (well excluding the SSR ofc, that had to be enabled).

        Which version of the editor are you using? preview? master? (linux?)
        I am using epics 4.8 on linux, there is an issue with the material. I can use about a max of 12 texture samples, I think thats what its called, because it automatically use UTexture instead of the Shared Sampler because of the limitations on OpenGL. Looking at the commit they did for 4.6 and can't see why it does not work on OpenGL. It only works on D3D, PS4, and XBoxOne. I tried looking into Array Textures but I do not know/understand on how to implement it in UE4. Hoping to get a solution that will work on all the platforms so there would not have to be any issues or special mats, but that may be whats needed.

        Comment


          Yeah openGL is limited to 13 samples according to the 4.6 release notes.
          There are ways to reduce texture sample count so it shouldn't be a problem I will try to optimize it a bit for the 4.8 plugin release.
          Right now it's not optimized at all when it comes to texture samples.

          I think there is also a switch node so we could have different nodes depending on directx, openGL etc. we will see.

          4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
          WIP Interactive Water Shader, WIP 2D Water Sim
          WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

          Comment


            @TK-Master - I'm using your branch as a base for a new level for my VR audiobook player, and one thing I found out after a lot of hair pulling late last night is that if you drop the near clip plane down to something that's more suitable for VR, like 0.15 (instead of 10), it causes this really nasty problem with the Ocean. If you turn off Gerstner waves it goes away.

            I'm not familiar enough with the materials to do it myself, but I was thinking one way to work around this would be to blend out the Gerstner waves after a certain distance. If there's another way to fix it I'd love to hear it, too.
            Storyteller - An immersive VR audiobook player

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

            Comment


              Weird.. looks like the near clip plane is making that problem come back again.

              It is caused due to a workaround that we have to use to fix the transparency sorting problem.. look for the part in the M_Ocean material commented as "Far Distance Fix(?)" and lower the value from 200000 to 15000 or so, you might start seeing wrongly sorted waves at distance though.

              In the future I think it should be a good idea to have a set of parameters to fade waves and normals at distance to another set of displacement. That should also help with the repeating pattern that you can see when using a large ocean plane.

              4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
              WIP Interactive Water Shader, WIP 2D Water Sim
              WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

              Comment


                Generally having the near clip plane down that low results in bad banding to terrain and static meshes anyway, so it's probably best to have the clip plane at 1 and keep the Gerstner waves.

                Comment


                  I followed this thread since the beginning and it's nice to see so much progress, but I have two questions.

                  Would it be possible to get a branch which only has the essential things in it? No ships or fishes just the ocean and sky/weather, even though they look nice ^^
                  Otherwise I'm going to do it myself, but I can't tell how far everything is entangled with each other, so I thought it would be a good idea to ask. (I do have to admit that I haven't looked at the new stuff yet. I'm still using the old build with everything being BPs instead of code)
                  Second, am I under the right impression that TK's branch is the most up to date one or am I wrong?

                  Anyways, thanks to everyone who puts effort into this, you are doing a great job

                  Greetings,
                  Dakraid

                  Comment


                    Content stuff are pretty modular already, you can just delete all the content folders (such as ships and fish) and just keep the Ocean and Sky folders.
                    The example maps might not work if you do that but you can easily clean up a map (the UnderwaterFish map in my branch is already pretty empty for example, just need to delete the fish manager).

                    And yes, the TK branch is the most up to date currently (you can always check the github commit log dates when in doubt).

                    4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
                    WIP Interactive Water Shader, WIP 2D Water Sim
                    WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

                    Comment


                      Originally posted by TK-Master View Post
                      Content stuff are pretty modular already, you can just delete all the content folders (such as ships and fish) and just keep the Ocean and Sky folders.
                      The example maps might not work if you do that but you can easily clean up a map (the UnderwaterFish map in my branch is already pretty empty for example, just need to delete the fish manager).

                      And yes, the TK branch is the most up to date currently (you can always check the github commit log dates when in doubt).
                      Thank you! Can't wait to play with the new stuff

                      Comment


                        Hi there,

                        I just downloaded this and been playing with it for a few minutes however, question appeared. Once I'm importing a static mesh (boat) where should I start from to get it floating on the water properly?
                        Artstation
                        Join the support channel
                        Gumroad Store

                        Comment


                          MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForStaticInitializationOceanPlugin(void)" (?EmptyLinkFunctionForStaticInitializationOceanPlugin@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ)
                          MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: D:\CatsLife\Binaries\Win64\CatsLife.exe : fatal error LNK1120: 1 unresolved externals

                          I get that when I try to Package the project Win64 with the Ocean Plugin.

                          Update: If I disable the Plugin my project Packages just fine.
                          Last edited by Darkkitten; 05-25-2015, 05:37 PM. Reason: Update Info

                          Comment


                            Originally posted by Maximum-Dev View Post
                            Hi there,

                            I just downloaded this and been playing with it for a few minutes however, question appeared. Once I'm importing a static mesh (boat) where should I start from to get it floating on the water properly?
                            Place an instance of BP_Boat into the level, then replace the static mesh and adjust the buoyancy parameters.

                            Originally posted by Darkkitten View Post
                            MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForStaticInitializationOceanPlugin(void)" (?EmptyLinkFunctionForStaticInitializationOceanPlugin@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ)
                            MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: D:\CatsLife\Binaries\Win64\CatsLife.exe : fatal error LNK1120: 1 unresolved externals

                            I get that when I try to Package the project Win64 with the Ocean Plugin.

                            Update: If I disable the Plugin my project Packages just fine.
                            To package plugins your project needs to have a source folder.
                            The easier way to do that is to open the project then go to File > Add Code to Project... and create an empty class.

                            You might also need to have visual studio installed.

                            4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
                            WIP Interactive Water Shader, WIP 2D Water Sim
                            WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

                            Comment


                              i do have Source for my project..

                              Comment


                                @TK-Master:
                                You wrote, that the SSR are noise. Have you set their quality up to 100? It's 50 by default. Settings are in the post process volume of the scene.
                                That usually improves their look, although i'd really like to see some "real" water shaders...or translucent shaders in general that support things like....shadows...or any kind of depth-based information. The current implementation looks like OpenGL from the 90s.
                                With that in mind, your results look pretty amazing in regards to what little possibilities you had to achieve them!

                                Comment

                                Working...
                                X