Announcement

Collapse
No announcement yet.

[Community Project] FREE Ocean Water Shader

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #91
    Hi Nilson Lima!

    Click image for larger version  Name:	1.jpg Views:	1 Size:	89.5 KB ID:	1569698

    Quick question about the Ocean. I'm trying to remove water from the inside of my ship and I found on forums a few possible ways to do it.

    First way is by using a DepthFade node:

    https://wiki.unrealengine.com/Visual...ing_Depth_Fade

    Second is by using stencil:

    https://answers.unrealengine.com/que...-logic-pu.html
    https://answers.unrealengine.com/questions/575373/hiding-water-surface-inside-a-boat.html


    The third is by using DistanceToNearestSurface node:

    https://answers.unrealengine.com/questions/461081/mask-different-meshes-with-custom-stencil-logic-pu.html

    So, for now I tried using only DepthFade but it doesn't work for some reason. Basically the ocean material I am using (M_Ocean_Ultra) is pretty complex and I am not sure if I understand how to add some kind of new opacity rules without breaking the whole material.

    Therefore, just wanted to ask if you maybe have encountered this issue by any chance or you have some piece of advise how to find better and the simplest way to remove water from the ship?

    Any help would be appreciated.

    Best,
    Alexander Alikin
    Last edited by script526; 01-08-2019, 12:17 AM.

    Comment


      #92
      script526

      Depth Fade would do the trick, but won't work on all scenarios, meaning different tweaks for one material (ocean material) which you would need to activate depending where you are in the scene.

      DistanceToNearestSurface works fine for postprocess and underwater (since you can stack material instances at the postprocess with different objects to mask). For the ocean material, simple things like a boat when moving the camera far from it, will generate tiny numbers and the water will fill the interior again. It would work for an interior the the length of flooded area is not too big, otherwise you will see water appearing as artifact. Distance Fields by default is low resolution and you would need to setup each mesh with a better one for tweaking, meaning a lot of work.

      The best possible solution is with stencil, it would give less work in general and the result is the expected elsewhere, it is more difficult to set, so I will work on some changes in the project, and make a video showing how to use this solution. I think it is in the best interest for people how the solution is done, instead of giving it done in the code already, so people have the chance to learn in the process. I will do the same approach as the foam wakes, showing the issue and where to change in a step-by-step.
      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


        #93
        New year, new goals, to simplify and not having fixes dispersed into several videos (I will still make them, so people learn how to fix stuff) I will update this project into an specific branch which I will have full control, so start copying from it: https://github.com/UE4-OceanProject/...jectNilsonLima
        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


          #94
          @NilsonLima Learning is much better than using someone's solution without understanding how it works. So I look forward to check out your video. And by the way the video about setting up foam behind the moving boat is absolutely great. I like the way you consciously run into problems in order to show how to fix them.

          Comment


            #95
            Originally posted by script526 View Post
            @NilsonLima Learning is much better than using someone's solution without understanding how it works. So I look forward to check out your video. And by the way the video about setting up foam behind the moving boat is absolutely great. I like the way you consciously run into problems in order to show how to fix them.
            This is how I do to train my collaborators in projects. Explain the project, show the issues/flaws, show the related code, dig into the fix = best way of learning.
            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


              #96
              Originally posted by NilsonLima View Post
              New year, new goals, to simplify and not having fixes dispersed into several videos (I will still make them, so people learn how to fix stuff) I will update this project into an specific branch which I will have full control, so start copying from it: https://github.com/UE4-OceanProject/...jectNilsonLima
              Tank´s Nilson Lima, precisava muito !!!!

              Comment


                #97
                Originally posted by NilsonLima View Post

                This is how I do to train my collaborators in projects. Explain the project, show the issues/flaws, show the related code, dig into the fix = best way of learning.
                Nilson Lima, entrei no seu perfil, imaginando sua nacionalidade Brasileira, mas de Santo André, muita coincidência, Tambem Sou, Rs

                Comment


                  #98
                  Hey Nilson!

                  I've checked out your last video about masking water out of the objects.



                  Thank you very much for your help. I'll try two methods you explained and give you a feedback.

                  Comment


                    #99
                    Originally posted by script526 View Post
                    Hey Nilson!

                    I've checked out your last video about masking water out of the objects.



                    Thank you very much for your help. I'll try two methods you explained and give you a feedback.
                    I didn't have the changes on the Community Ocean done yet, because the material are more complex and also there is the underwater material to deal aswel. I want also to see if I will prepare a boat mesh specific for having this into the project or if I will modify the current boats/ships in order to have them all working. It just takes more time.
                    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


                      The Ocean Project is great, but there is an issue with the

                      - Ecliptic Longitude: The longitude location of the moon on the celestial sphere.
                      - Ecliptic Latitude: The latitude location of the moon on the celestial sphere.

                      We just need tighter approximations for it to actually result in an eclipse, which would be cool.

                      Comment


                        Originally posted by mrg7_ View Post
                        The Ocean Project is great, but there is an issue with the

                        - Ecliptic Longitude: The longitude location of the moon on the celestial sphere.
                        - Ecliptic Latitude: The latitude location of the moon on the celestial sphere.

                        We just need tighter approximations for it to actually result in an eclipse, which would be cool.
                        The code is found at the source code file: FRotator ATimeManager::CalculateMoonAngle() and FRotator ATimeManager::CalculateSunAngle() at TimeManager.cpp at the following folder "Plugins\OceanPlugin\Source\OceanPlugin\Private\Sky", so you can check those algorithms and if you have better ones which you can contribute to the project I will make the necessary adjustments to the source code.

                        The Sky was a contribution to the project made long ago (2014 to be precise, I was not even using Unreal at that time), since the project is really intended to be a Ocean Project. Everything else, boats, buoys, ships, fishes are all contributions.
                        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


                          There is a plan for my branch on this project and bellow is what it is going to happen over the next months:

                          - separate Ocean project into single plugin
                          - everything else in a secondary plugin (ie: Sky, fishflock, etc)
                          - plugin will be modified to allow it to be exposed to blueprint and instructions to compile it as if it was a Marketplace plugin will be added, along with Youtube video.
                          - sample project will be added with the plugin outside package to show how it works (see previous item)
                          - landscape modulation will check if texture is set correctly and try to change its attributes while in Editor once it is changed
                          - landscape modulation will work for World Composition
                          - masking water inside objects (with example meshes). You add that mesh(actor) into a list of meshes to mask
                          - masking underwater inside objects. You add that mesh(actor) into a list of meshes to mask
                          - masking objects underwater (with example meshes). You add that mesh(actor) into a list of meshes to mask
                          - several changes into caustics, since currently you can't remove caustics from inside objects like ships and boats
                          - improvement on underwater effects to better reflect vision from camera point of view against deep water and when looking up at sky direction.
                          - infinite ocean system will be remade with quadtree

                          The repository will receive updates per new feature added, so keep an eye in this post and Discord server for news.


                          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 i want to package the project using this great plugin but i get this error when starts,

                            Error: System.IO.DirectoryNotFoundException: Cant find.....
                            'C:\Program Files\Epic Games\UE_4.21\Engine\Plugins\Runtime\OceanPlugin\Intermediate\Build\Win64\UE4\Shipping\OceanPlugin\OceanPlugin.precompiled'

                            is there any way to fix it?

                            Comment


                              Originally posted by Larraz View Post
                              Hi i want to package the project using this great plugin but i get this error when starts,

                              Error: System.IO.DirectoryNotFoundException: Cant find.....
                              'C:\Program Files\Epic Games\UE_4.21\Engine\Plugins\Runtime\OceanPlugin\Intermediate\Build\Win64\UE4\Shipping\OceanPlugin\OceanPlugin.precompiled'

                              is there any way to fix it?
                              I just packaged it successfully in 4.21. Which is the release version you are trying to package? Which branch at GitHub you picked? If you didn't pick this one https://github.com/UE4-OceanProject/...jectNilsonLima please do.
                              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 just packaged it successfully in 4.21. Which is the release version you are trying to package? Which branch at GitHub you picked? If you didn't pick this one https://github.com/UE4-OceanProject/...jectNilsonLima please do.
                                Ohhh, i just try to compile myself using Visual Studio or UAT but i couldnt do it, thanks

                                Comment

                                Working...
                                X