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 Nsomnia View Post
    Shaders to your engine shader directory maybe. Ensure you have an underwater post process volume set to bendable asset m underwater inst 2 and bp underwater exists in your scene and copy the logic to check if player camera is below water height from the project any level bp.
    I'm looking for this logic right now. It appears that the map doesn't have a blueprint, but it does have a header file. I was able to get the underwater postprocess working, but it is always on.

    Comment


      So the blue post process is working, but it is always on (even above water) when I set the material reference for my post process to M_Underwater_PP_Inst2. All the variables are being set properly except for the "underwater detection method" in the level blueprint (I checked with printstring nodes). The water distortion effects are not working (But the camera wet effect is).

      Any ideas what my problem is?
      Last edited by twalk1776; 03-18-2017, 09:27 PM.

      Comment


        Originally posted by jonathan light


        This was done in unreal engine 4
        Alright look, can someone at Epic send me Ryan's mug or pat him on the head and take a hair or something? I require it for cloning purposes.
        George Rolfe.
        Technical Coordinator at Orbit Solutions Pty Ltd.

        Comment


          Could this not use a system similar to Assassin's Creed Black Flag where the ocean mesh is deformed by the ship hull? It would just be an extra lookup in the ocean shader, and probably could be done by just creating an orthographic camera and marking certain meshes as hulls and this ortho cam would snap to the closest grid cells, and wouldn't need to be super high res. Then you can just replace the wave vertex offsets with the depthmap you create from the hulls when there's actually a depth value somewhere.

          I may consider doing some research into this myself, because for big ships it's going to be way more cost efficient and less prone to mishaps. Could simply make a "hull deform" mesh which is just the bottom part of the ship until it doesn't get any wider, and using some basic maths you can offset the ocean waves below the hull. Would be optimised enough I think, seen as it would only be needed on the closer ocean, and it would play well I think. Could also just make the renderpass use stencil stuff, actually, something I want to look into also because most games do it using a simple stencil test, and it works for the most part quite well if you threshold the clipmask with the depth buffer and some clamping.

          Comment


            Originally posted by Legend286 View Post
            Could this not use a system similar to Assassin's Creed Black Flag where the ocean mesh is deformed by the ship hull? It would just be an extra lookup in the ocean shader, and probably could be done by just creating an orthographic camera and marking certain meshes as hulls and this ortho cam would snap to the closest grid cells, and wouldn't need to be super high res. Then you can just replace the wave vertex offsets with the depthmap you create from the hulls when there's actually a depth value somewhere.

            I may consider doing some research into this myself, because for big ships it's going to be way more cost efficient and less prone to mishaps. Could simply make a "hull deform" mesh which is just the bottom part of the ship until it doesn't get any wider, and using some basic maths you can offset the ocean waves below the hull. Would be optimised enough I think, seen as it would only be needed on the closer ocean, and it would play well I think. Could also just make the renderpass use stencil stuff, actually, something I want to look into also because most games do it using a simple stencil test, and it works for the most part quite well if you threshold the clipmask with the depth buffer and some clamping.
            Couldn't this be achieved by using distance fields?

            Comment


              Originally posted by Legend286 View Post
              Could this not use a system similar to Assassin's Creed Black Flag where the ocean mesh is deformed by the ship hull? It would just be an extra lookup in the ocean shader, and probably could be done by just creating an orthographic camera and marking certain meshes as hulls and this ortho cam would snap to the closest grid cells, and wouldn't need to be super high res. Then you can just replace the wave vertex offsets with the depthmap you create from the hulls when there's actually a depth value somewhere.

              I may consider doing some research into this myself, because for big ships it's going to be way more cost efficient and less prone to mishaps. Could simply make a "hull deform" mesh which is just the bottom part of the ship until it doesn't get any wider, and using some basic maths you can offset the ocean waves below the hull. Would be optimised enough I think, seen as it would only be needed on the closer ocean, and it would play well I think. Could also just make the renderpass use stencil stuff, actually, something I want to look into also because most games do it using a simple stencil test, and it works for the most part quite well if you threshold the clipmask with the depth buffer and some clamping.
              I've been looking into the stencil route, and unfortunately it seems like the underwater post-processing monopolizes the stencil channels. Any "CustomDepth Stencil Value" over 0 (the channel that's being used for the non-ocean side) will cause the underwater PP to be displayed on your mesh. You'd have to come up with a different technique for the underwater PP, and the one being used in the project seems to be the least expensive way of doing it.

              As a side-effect of this I've found if you turn on custom depth in a mesh's rendering options, set the stencil value to 0, and turn off "render in main pass", you turn the mesh into a sort of "lens" that doesn't render the ocean or underwater PP if you're looking through it. This works really well for small boats, where the camera is typically above the hull. What I'd really like to do is figure out how to invert the effect, I'm not sure if it's possible, but then I'm very new to shaders and rendering.

              If you do come up with a method to deform the ocean mesh I'm sure a lot of us would be very interested, so please post back here if you get it working.

              Comment


                Is there any news on the marketplace release of this? I'm on the 3rd project now in that last 2 months that really needs/needed a decent ocean shader. I would gladly pay $100+ for a production friendly solution, because the problems with the community version require considerably higher tech art skills than what I have.
                Last edited by Fisher007; 03-26-2017, 11:14 AM.
                Portfolio

                Comment


                  you could use the unreal example ocean in tutorials.

                  Comment


                    That's what I'm using at the moment, but even after modifications it just isn't on the same quality level. Also it doesn't have buoyancy unfortunately.
                    Portfolio

                    Comment


                      Well I have no problems at all by using the link earlier in this thread with the latest unreal.

                      Comment


                        Do you know when we might see improved water effects like these from the recent gdc talk?



                        Skip 42 minutes in to see the final result!

                        Comment


                          I am currently trying out an iFFT approach for an Ocean Shader running on the GPU. The CPU is used to get the data in order to calculate buoyancy for some objects.
                          There are still many things missing (e.g. really dynamic crest foam based on the slope of a wave in the last few frames).
                          You can see first results here:

                          #1


                          #2


                          The ship isn't mine and taken from this GitHub project (nice model btw). And yeah, there are no animations.

                          Comment


                            Originally posted by Afritus View Post
                            I am currently trying out an iFFT approach for an Ocean Shader running on the GPU.
                            That looks really nice! What are your plans for the project? The marketplace could definitely use more ocean shaders

                            Comment


                              Originally posted by OptionalSteve View Post
                              That looks really nice! What are your plans for the project? The marketplace could definitely use more ocean shaders
                              Thank you. I don't really have any plans for this project and the shader is far from being finished. I don't think that I will publish it on the marketplace anytime soon :/

                              Comment


                                Hi guys! I am a scientist of KM3NeT and we are building an underwater neutrino telescope. I made a virtual reality experience using the ocean project with the aim to show our detector to young students and I want to share it with you. This is the first game I did with UE4 so isn't perfect.
                                By the way thank you so much for this fantastic project!.
                                here the link
                                https://www.youtube.com/watch?v=zgKrfUu4fcQ

                                hope you like it
                                cheers
                                Carlos

                                Comment

                                Working...
                                X