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

    Hello everyone,

    Can anyone help?

    1. I am trying to use the Ultra_Dynamic_Sky with this project (primarily for the clouds).

    I understand that when I replaced the BP_Skydome with Ultra, I lost the UpdateSun function, and my SSS light vector parameter.

    For us non-C++ people, where exactly in the Ultra BP do I put that function?

    And does the function need to be tailored from that found in the BP_Skydome because of other coding in the plug-in?

    If someone could tell me how to migrate over only the clouds from Ultra into this project, that would be another solution.

    I want to keep that nice Black Flag SSS in the top of the waves you have achieved, but with the Ultra clouds.

    2. The nice waves create a problem previously pointed out, at the shoreline. I would like to implement TK-Master's hightmap modulation function to keep waves from intruding too far...don't know where to integrate that function either.

    I was wondering if the hightmap along with probes placed along the beach, could be used to activate a swash/backwash shoreline blueprint that could be combined with this project. The waves already look great ... some braking foam waves, swash that creates wet sand, and this would be almost perfect.

    Did anyone notice that Bethesda used interactive "lake" water (no waves) for the Atlantic Ocean in Fallout 4?

    Thanks in advance, and a special thanks to all you Canadians, I guess Canada wins the Gold for writing water shaders.

    Comment


      Originally posted by CrashA51 View Post
      Hello everyone,

      Can anyone help?

      1. I am trying to use the Ultra_Dynamic_Sky with this project (primarily for the clouds).

      I understand that when I replaced the BP_Skydome with Ultra, I lost the UpdateSun function, and my SSS light vector parameter.

      For us non-C++ people, where exactly in the Ultra BP do I put that function?

      And does the function need to be tailored from that found in the BP_Skydome because of other coding in the plug-in?

      If someone could tell me how to migrate over only the clouds from Ultra into this project, that would be another solution.

      I want to keep that nice Black Flag SSS in the top of the waves you have achieved, but with the Ultra clouds.

      2. The nice waves create a problem previously pointed out, at the shoreline. I would like to implement TK-Master's hightmap modulation function to keep waves from intruding too far...don't know where to integrate that function either.

      I was wondering if the hightmap along with probes placed along the beach, could be used to activate a swash/backwash shoreline blueprint that could be combined with this project. The waves already look great ... some braking foam waves, swash that creates wet sand, and this would be almost perfect.

      Did anyone notice that Bethesda used interactive "lake" water (no waves) for the Atlantic Ocean in Fallout 4?

      Thanks in advance, and a special thanks to all you Canadians, I guess Canada wins the Gold for writing water shaders.

      On top of all the other things im trying to integrate and port is the cloud and shadows from ultra dynamic. I havnt gotten any further than prodding the blueprionts but will post if I find more info. Its not a plug an play no doubt about it.

      Yes us canadians seem to be all about the water...
      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


        What about 4.11? 4.11's render time improvement (intel embree) is critical for architectural visulations. I know 4.11 is preview version but maybe temporarily something can be done. So i need this beautiful ocean in my version 4.11 project.
        Here is my basic tutorials for SketchUp to Unreal.

        SketchUp to Unreal Engine Tutorials

        Comment


          Originally posted by goergingo View Post
          What about 4.11? 4.11's render time improvement (intel embree) is critical for architectural visulations. I know 4.11 is preview version but maybe temporarily something can be done. So i need this beautiful ocean in my version 4.11 project.
          It should compile on 4.11p5 not that I've tried.
          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


            ****, you guys are clever.

            Any update on the transition from below/above water? (That thin line where for example the water covers only half your screen.)

            Comment


              Does anyone have a decent underwater fog at this point? I don't care if the transition isn't perfect.
              Storyteller - An immersive VR audiobook player

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

              Comment


                Originally posted by Gmi View Post
                ****, you guys are clever.

                Any update on the transition from below/above water? (That thin line where for example the water covers only half your screen.)
                I'm looking at the guy whos doing the diving suit project to try to solve this some really great ideas in that thread.

                Originally posted by n00854180t View Post
                Does anyone have a decent underwater fog at this point? I don't care if the transition isn't perfect.
                I have it built in my mind where it essentially gets darker the lower you go, remind me in a week and I'll post it if I have it done, another one of the things I have on the go for my project. Basically all you need to do though is setup a PP volume around your currently controlled pawn and if above water set bIsEnabled to false and visa versa and also set up the PP settings based on whatever variables (depth for example)
                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 guys, I have some time to spare this week so hopefully I will finish the underwater stuff and upload to github.
                  I'm actually kinda glad I did not share the version I talked about before because I have found a much better method to do the masking (which does not involve any crazy gerstner calculations in the post process material).

                  The solution is to use the stencil buffer to mask the upside and underside of the ocean plane (that does require an extra depth plane though).
                  How the heck did I not think about the stencil buffer before?! it's a simple solution and was right there in front of my face this whole time

                  It works like this:

                  Red = upside, green = underside

                  The problem with this method (because there always has to be a problem..) is that tessellation causes some cracks and pixelation to show in the stencil buffer, the solution is to use a pre-tessellated plane and sample multiple neighbor pixels from the stencil buffer to get a cleaner result.

                  Originally posted by CrashA51 View Post
                  ... I am trying to use the Ultra_Dynamic_Sky with this project (primarily for the clouds).

                  I understand that when I replaced the BP_Skydome with Ultra, I lost the UpdateSun function, and my SSS light vector parameter.
                  For us non-C++ people, where exactly in the Ultra BP do I put that function?

                  ... The nice waves create a problem previously pointed out, at the shoreline. I would like to implement TK-Master's hightmap modulation function to keep waves from intruding too far...don't know where to integrate that function either.....

                  Thanks in advance, and a special thanks to all you Canadians, I guess Canada wins the Gold for writing water shaders.
                  Wait am I the only non-Canadian in this thread? haha (I'm from Greece)

                  The light vector for the SSS is updated from BP_Sky (take a look inside the UpdateSun function, second comment box) there is no C++ involved, you should be able to copy that part into Ultra Dynamic Sky bp.
                  The reason it is not updated from BP_Ocean is because it won't update in editor when you change the time of day.

                  The heightmap modulation function that I posted is implemented in the materials (M_Ocean_SSR, M_Ocean_Depth etc.) I believe I posted some instructions

                  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
                    Hey guys, I have some time to spare this week so hopefully I will finish the underwater stuff and upload to github.
                    I'm actually kinda glad I did not share the version I talked about before because I have found a much better method to do the masking (which does not involve any crazy gerstner calculations in the post process material).

                    The solution is to use the stencil buffer to mask the upside and underside of the ocean plane (that does require an extra depth plane though).
                    How the heck did I not think about the stencil buffer before?! it's a simple solution and was right there in front of my face this whole time

                    It works like this:

                    Red = upside, green = underside

                    The problem with this method (because there always has to be a problem..) is that tessellation causes some cracks and pixelation to show in the stencil buffer, the solution is to use a pre-tessellated plane and sample multiple neighbor pixels from the stencil buffer to get a cleaner result.



                    Wait am I the only non-Canadian in this thread? haha (I'm from Greece)

                    The light vector for the SSS is updated from BP_Sky (take a look inside the UpdateSun function, second comment box) there is no C++ involved, you should be able to copy that part into Ultra Dynamic Sky bp.
                    The reason it is not updated from BP_Ocean is because it won't update in editor when you change the time of day.

                    The heightmap modulation function that I posted is implemented in the materials (M_Ocean_SSR, M_Ocean_Depth etc.) I believe I posted some instructions
                    Just leave me 8 months to catch up. Masking my submarines interiors so that I didnt have to do tricks with the interiors was my first step in C++/Advanced Materials using the divnig suit game thread.
                    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


                      You could probably use the same method to mask the inside of a submarine by reading the stencil buffer in the ocean material and use it to set the opacity to 0.
                      I have not tried accessing the stencil buffer from a translucent material though.

                      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


                        https://docs.unrealengine.com/latest...ation&x=16&y=7

                        I've got a long ways to go. Not muh documentation.

                        Got the stencil buffer index deal figured out though. Now if I can just figure out how to draw the geometry and occlude it magic not yet known to my skills, have to look at some hlsl code for reading te stencil index.
                        Of course I've thought about just turning the ocean bIsActive = false when below decks and = true when above decks or looking through the periscope. Thats what all the previous sub sim games did but I have big plans.



                        Being that the sceneDepth node only assigns values for opaque objects I wouldnt even know where to start.
                        Materials is one ting I never ended up learning. Focused on BP's so that when C++ time came (now) I'd have a small idea of the API
                        Last edited by Nsomnia; 02-21-2016, 05:40 PM.
                        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


                          I would try having 2 meshes, one for the inside wall of the sub and one for the exterior.. then you will set different stencil ids to each and apply one sided opaque materials to them.

                          That should in theory take care of occlusion when viewed from the outside.

                          To access the stencil buffer in material you use the SceneTexture node and choose custom stencil from the dropdown.
                          Here's a nice answerhub link

                          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


                            Would there be any chance to use this plugin, just as content - without the plugin, once you are done with customizations?
                            LEGENDS of EPICA [Twitter] [Facebook] [YouTube] [Vimeo]

                            Comment


                              That looks awesome TK-Master!
                              Storyteller - An immersive VR audiobook player

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

                              Comment


                                Originally posted by unit23 View Post
                                Would there be any chance to use this plugin, just as content - without the plugin, once you are done with customizations?
                                Can you elaborate?
                                Without the plugin the infinite plane system won't work in editor and the buoyancy component will have to be re-written in blueprints (it will be a lot slower though).

                                If you just want the ocean for visuals and don't care about buoyancy then you could migrate the materials.

                                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

                                Working...
                                X