Announcement

Collapse
No announcement yet.

[Community Project] FREE Ocean Water Shader

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

    One more question, how underwater effect works?, how can a configure to do the underwater blue effect?

    Comment


      You can watch this video for a start and understand the whole underwater settings and materials. After that you can just go inside the material and change the color as you please. There are several videos at my Youtube channel in a playlist about this asset, there are tons of information there.

      Nilson Lima
      Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
      Join us at Discord: https://discord.gg/uFFSEXY

      UE4 Marketplace: Cloudscape Seasons
      supporting: Community FREE Ocean plugin

      Comment


        Hello Nilson,

        first I would like to thank you for your work and your dedication for this community project. It has really grown into something amazing, you and all the other contributors can be proud!

        I recently started to use the Ocean Project and I was not able to solve a problem I have encountered, I hope you or somebody else who has experience with the Ocean Project can help me solve this:

        The problem I have is that translucent and additive materials do not get rendered between the water surface and the terrain. Please find below an image where I have displayed my problem and also show the material setups for this test.

        I have pinpointed the cause for this down to the "BP_Ocean", meaning if I set "BP_Ocean" to "Invisible" or "Hidden in Game", the materials render as expexted.

        I would be glad if you could explain to me the necessary steps so that translucent and additive materials get rendered, when under water.

        Thanks for your time and all the best to you!

        Comment


          Originally posted by swagentrotz View Post
          Hello Nilson,

          first I would like to thank you for your work and your dedication for this community project. It has really grown into something amazing, you and all the other contributors can be proud!

          I recently started to use the Ocean Project and I was not able to solve a problem I have encountered, I hope you or somebody else who has experience with the Ocean Project can help me solve this:

          The problem I have is that translucent and additive materials do not get rendered between the water surface and the terrain. Please find below an image where I have displayed my problem and also show the material setups for this test.

          I have pinpointed the cause for this down to the "BP_Ocean", meaning if I set "BP_Ocean" to "Invisible" or "Hidden in Game", the materials render as expexted.

          I would be glad if you could explain to me the necessary steps so that translucent and additive materials get rendered, when under water.

          Thanks for your time and all the best to you!
          You need to set the value for Translucency Sort Priority at the Rendering section of you mesh (the instance, not the mesh at the content browser) to have a value higher than the value in use by the ocean plane (which is currently zero). It will work for you to see the a material with translucency features to completely be rendered on top of any other translucent material. The additive material behaves like a translucency material, so the solution works for both. If you ever want to mask the material at the surface, then you will need to use stencil, but in this case stencil with lower values has priority at rendering. The stencil way is explained in the video few posts above I have use to explain how to mask the water from inside the boat.
          Nilson Lima
          Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
          Join us at Discord: https://discord.gg/uFFSEXY

          UE4 Marketplace: Cloudscape Seasons
          supporting: Community FREE Ocean plugin

          Comment


            Thanks for your quick response. Unfortunately changing the translucency sort priority did not fix my problem.

            I dug a little deeper and I think the reason why translucent and additive materials are not rendered underwater (on top of the fog) is the stencil setup of the "M_Underwater_PP" material, used in "PP_Global". Your stencil video regarding masking the surface (for boats and stuff) did not help me unfortunately, as my problem is not to "cut out" something, but render a translucent or additive material on top of the underwater fog.

            Comment


              Originally posted by swagentrotz View Post
              Thanks for your quick response. Unfortunately changing the translucency sort priority did not fix my problem.

              I dug a little deeper and I think the reason why translucent and additive materials are not rendered underwater (on top of the fog) is the stencil setup of the "M_Underwater_PP" material, used in "PP_Global". Your stencil video regarding masking the surface (for boats and stuff) did not help me unfortunately, as my problem is not to "cut out" something, but render a translucent or additive material on top of the underwater fog.
              I just did some experiments and make this small video. Note that one of the results where you kill completely whats behind the material, you will need to write the depth on your own inside the material to give the look you are wanting.

              Nilson Lima
              Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
              Join us at Discord: https://discord.gg/uFFSEXY

              UE4 Marketplace: Cloudscape Seasons
              supporting: Community FREE Ocean plugin

              Comment


                Hi Nilson. Thanks for your video. I think you are right regarding the additive materials, I think they look fine, it's more the translucent materials that I would like to get working when rendered on top of the underwater fog. Here a few examples where translucency would be required:
                • Underwater Dust / Plankton Particles
                • Underwater Air Bubble Particles
                • Fake God Ray Meshes (for underwater caves for example)
                I have attached a screenshot where you can see how a translucent material with enabled "Allow Custom Depth Writes" in the Material and "Custom Depth Stencil Value = 1" in the mesh instance looks like.

                I thought about adding all the fog stuff from "M_Underwater_PP" to the material of my mesh, but as the material domain of "M_Underwater_PP" is "Post Process" and because it uses exclusive nodes for that material domain, I can not replicate everything I would need for my material with the domain "Surface".

                In the second image I made a mockup in photoshop to show you what I would like to achieve in the engine.

                Comment


                  Originally posted by swagentrotz View Post
                  Hi Nilson. Thanks for your video. I think you are right regarding the additive materials, I think they look fine, it's more the translucent materials that I would like to get working when rendered on top of the underwater fog. Here a few examples where translucency would be required:
                  • Underwater Dust / Plankton Particles
                  • Underwater Air Bubble Particles
                  • Fake God Ray Meshes (for underwater caves for example)
                  I have attached a screenshot where you can see how a translucent material with enabled "Allow Custom Depth Writes" in the Material and "Custom Depth Stencil Value = 1" in the mesh instance looks like.

                  I thought about adding all the fog stuff from "M_Underwater_PP" to the material of my mesh, but as the material domain of "M_Underwater_PP" is "Post Process" and because it uses exclusive nodes for that material domain, I can not replicate everything I would need for my material with the domain "Surface".

                  In the second image I made a mockup in photoshop to show you what I would like to achieve in the engine.
                  I will try some experiments and will let you know.
                  Nilson Lima
                  Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                  Join us at Discord: https://discord.gg/uFFSEXY

                  UE4 Marketplace: Cloudscape Seasons
                  supporting: Community FREE Ocean plugin

                  Comment


                    Originally posted by NilsonLima View Post

                    I will try some experiments and will let you know.
                    Thank you! Looking forward to your potential solution.

                    Comment


                      Hello,
                      I checked out previous pages and the old closed thread, I met with the "Lake" problem, how to create lakes instead of infinite ocean. I modified the C++ source a little bit to switch off infinite component so I got a sphere plane scaleable. After it the resize of plane works well but unfortunately near waves were broken. I tried set the parameters but there are many and I dont know its fixable even with tweaking. Well, I tried the Reactive Dynamic Water asset too and though it looks good for lakes, it has very simple buoyancy and I need some boats on my lake and Ocean shader does it better with buoyancy points. Though I dont know for now which is more complicated to find out why Ocean shader waves break after rescale or adding better buoyancy to the another asset. If you have any idea how can I fix the waves without infinite component pls let me know, thx
                      Click image for larger version

Name:	lakenear.jpg
Views:	11
Size:	156.6 KB
ID:	1581970Click image for larger version

Name:	lakefar.jpg
Views:	11
Size:	162.8 KB
ID:	1581968

                      Attached Files

                      Comment


                        Originally posted by Maja2008dragon View Post
                        Hello,
                        I checked out previous pages and the old closed thread, I met with the "Lake" problem, how to create lakes instead of infinite ocean. I modified the C++ source a little bit to switch off infinite component so I got a sphere plane scaleable. After it the resize of plane works well but unfortunately near waves were broken. I tried set the parameters but there are many and I dont know its fixable even with tweaking. Well, I tried the Reactive Dynamic Water asset too and though it looks good for lakes, it has very simple buoyancy and I need some boats on my lake and Ocean shader does it better with buoyancy points. Though I dont know for now which is more complicated to find out why Ocean shader waves break after rescale or adding better buoyancy to the another asset. If you have any idea how can I fix the waves without infinite component pls let me know, thx
                        I have made this video some time ago and there I mess with the parameters that you use to make the water calm as a lake if you need to.

                        Nilson Lima
                        Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                        Join us at Discord: https://discord.gg/uFFSEXY

                        UE4 Marketplace: Cloudscape Seasons
                        supporting: Community FREE Ocean plugin

                        Comment


                          Originally posted by NilsonLima View Post

                          I have made this video some time ago and there I mess with the parameters that you use to make the water calm as a lake if you need to.

                          Thanks but the wave calmness is just my 2nd problem
                          With infinite component ON, the lake "floods" my entire landscape, I would like small lakes on certain locations. (an area what a plane cuts to landscape). My landscape is mixed from various ones, and I have a desert lowland, which is completely filled with ocean with infinite component.
                          But seems the correct waves requires infinite component tick where it rescales and relocates the plane.
                          Why I dont use another asset for lake? Simply, because its the best, plus I didnt find similar properly working solution for buoyancy for objects more than a sphere or box.

                          Comment


                            Okay I think with plane scale 1.0 Im getting waves without problem with infinity component OFF. Though its too big, but manageable with some landscape sculpting. (Scales smaller than 1.0 seems break the waves.)
                            Thanks for the wave tweak video, I continue now with that.
                            Buoyancy works wonderfully. I added a canoe to my lake with 8 test points and its very nice.
                            (Except water inside boat... Btw any idea how to get water out from boats inside? )

                            Comment


                              Originally posted by Maja2008dragon View Post
                              Okay I think with plane scale 1.0 Im getting waves without problem with infinity component OFF. Though its too big, but manageable with some landscape sculpting. (Scales smaller than 1.0 seems break the waves.)
                              Thanks for the wave tweak video, I continue now with that.
                              Buoyancy works wonderfully. I added a canoe to my lake with 8 test points and its very nice.
                              (Except water inside boat... Btw any idea how to get water out from boats inside? )
                              You gotta get good amount of vertices at that whole plane to make the waves good enough. Since you have a landscape done, you can make one shape which is fit for the water placement, it doesn't need to be a circle, thou it is easier to do one.

                              The water out of the boat I am working on it, but it is not easy and right now I am with hands full from doing other stuff. But it is on the plan.
                              Nilson Lima
                              Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                              Join us at Discord: https://discord.gg/uFFSEXY

                              UE4 Marketplace: Cloudscape Seasons
                              supporting: Community FREE Ocean plugin

                              Comment


                                Unfortunately if I change ocean top plane to any other mesh, Im getting large holes...
                                Scaling the plane still gives weird results like triangular waves... (though as I tweaked them to smaller waves not just disturbing, but they are still there)

                                Click image for larger version

Name:	holes.jpg
Views:	30
Size:	207.9 KB
ID:	1582321Click image for larger version

Name:	trianglewave.jpg
Views:	29
Size:	226.6 KB
ID:	1582322

                                Comment

                                Working...
                                X