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

    Hey sorry for not posting here in a while, I had way less free time to work on this than I would like to have

    I was doing some larger scale tests and I found a problem with the transparency (I'm guessing you are already aware of this DotCam? )
    Basically, the further the water plane, the noisier it gets until it get's completely transparent.

    I made an island with world machine to test how the ocean could look like on a larger scale and the issue is very distracting.

    (zoom to see it better)

    At first I thought it had to do with the scale of the water plane but it seems to be a problem with the way the second plane is used (I'm assuming that is to fix the transparency sorting problem?).
    Hopefully we can find a better way to fix these transparency issues!

    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 TorQueMoD View Post
      Ahh that would be why swapping out the mesh entirely didn't do anything because its still just a sphere but the material is set elsewhere so I couldn't see the change. Is there some reason you chose to set the material inside the construction script rather than simply inside the Components? Maybe it would be possible to expose the material to the editor in the future so people can change it more easily?

      Thanks for the help!
      The main reason it uses a DynamicMaterialInstance to apply the material is that I had planned to add in a system to orient the material (or possibly the mesh) towards the surface since we only ever see one side of the moon. Beyond that I had more plans for lunar cycles etc, but I think I will be changing the approach coming up.

      Sorry about that.


      Originally posted by TK-Master View Post
      Hey sorry for not posting here in a while, I had way less free time to work on this than I would like to have
      Hey Man! Yeah same here, made some good progress this week though!

      I was doing some larger scale tests and I found a problem with the transparency (I'm guessing you are already aware of this DotCam? )
      I have absolutely no idea what you are talking about...
      *hides*

      Basically, the further the water plane, the noisier it gets until it get's completely transparent.

      I made an island with world machine to test how the ocean could look like on a larger scale and the issue is very distracting.

      (zoom to see it better)

      At first I thought it had to do with the scale of the water plane but it seems to be a problem with the way the second plane is used (I'm assuming that is to fix the transparency sorting problem?).
      Hopefully we can find a better way to fix these transparency issues!
      Correct! It is always the transparency getting in the way. In order for it to look good at the surface, by that I mean not look like this:
      Click image for larger version

Name:	TranslucencyDispacementIssue.PNG
Views:	1
Size:	377.8 KB
ID:	1066938

      I need to do the custom sorting using the second plane mesh/material here:
      Click image for larger version

Name:	DistanceBlend.PNG
Views:	1
Size:	104.0 KB
ID:	1066939

      To prevent the horrible artifacting that occurs when a translucent surface tries to render a wave behind the first, wave behind the second, etc, etc, until it becomes either totally black or invisible it needs the depth calculations. The fix works great at eye level, not so great from a distance.

      To fix this all we need to do is switch the scalar value I have circled above to 0.9 (edited - I put the wrong number in... should be 0.9 not 1.0) when the camera moves high enough to no longer be impacted by the banding artifact. Most likely this will need to be done in a blueprint since it is not an issue of distance from pixel, it's more the camera's height that needs to be monitored. I have yet to fix this but it is "on the list" so to speak, it might end up being something the end user decides how to proceed with, but I totally agree it needs to be fixed.

      Btw I have been tearing up the material the past few days, it is much simpler now, with more complex wave movement to boot! I will post up some larger screenshots a bit later, was going to do it now but I just noticed a glaring issue... Here is a preview though (foam is disabled, working on the look of the water but it will be improved as well, alternate displacement waves on low, 8 Gerstner waves instead of 16 so mat has fewer instructions) take note of the SSS courtesy of TK-Master as well!

      Click image for larger version

Name:	progress.PNG
Views:	1
Size:	768.6 KB
ID:	1066945

      EDIT: just want to note specular/reflections still need work, it will look better than this in the release!
      Last edited by DotCam; 02-24-2015, 05:59 PM.
      Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

      Comment


        Originally posted by DotCam View Post
        Btw I have been tearing up the material the past few days, it is much simpler now, with more complex wave movement to boot! I will post up some larger screenshots a bit later, was going to do it now but I just noticed a glaring issue... Here is a preview though (foam is disabled, working on the look of the water but it will be improved as well, alternate displacement waves on low, 8 Gerstner waves instead of 16 so mat has fewer instructions) take note of the SSS courtesy of TK-Master as well!
        Oh nice can't wait to see how it will look like when it's ready!

        Originally posted by DotCam View Post
        I have absolutely no idea what you are talking about...
        *hides*
        XD haha

        Originally posted by DotCam View Post
        To fix this all we need to do is switch the scalar value I have circled above to 1 when the camera moves high enough to no longer be impacted by the banding artifact. Most likely this will need to be done in a blueprint since it is not an issue of distance from pixel, it's more the camera's height that needs to be monitored. I have yet to fix this but it is "on the list" so to speak, it might end up being something the end user decides how to proceed with, but I totally agree it needs to be fixed.
        Sadly, I don't think this is going to work that great (at least from what I have tried) I guess we still have to wait for Epic to implement forward shading (fingers crossed for 4.8!) or the transparency problem will be there one way or another.
        Temporal AA seems to take care some of that noise but the blurring that comes with it makes my eyes hurt, I would prefer to be able to use FXAA

        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
          Sadly, I don't think this is going to work that great (at least from what I have tried) I guess we still have to wait for Epic to implement forward shading (fingers crossed for 4.8!) or the transparency problem will be there one way or another.
          Temporal AA seems to take care some of that noise but the blurring that comes with it makes my eyes hurt, I would prefer to be able to use FXAA
          Whoops sorry I got mixed up... if you lower the value to 0.9 you can zoom out pretty much until you can no longer see it:

          Click image for larger version

Name:	DispFixDist.PNG
Views:	1
Size:	55.8 KB
ID:	1066949

          It was disappearing at a much closer distance with 0.997, but again this is not an ideal fix (although it does work alright). Try that out and see if it helps. How big is that landscape?

          I think a lot of what is making your eyes hurt is the horrible tiling of the ocean you can see in your image (my fault). I've been able to reduce that considerably though with the new random displacement mixed in.

          4.8 already has some great improvements but I am not sure we will see a forward shading pass implemented... But that reminds me, I have been meaning to update the source to see whats changed in the past couple of weeks, I'll check it out again later.
          Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

          Comment


            Okay I was wrong, the scale of the water plane does matter too.. it matters a lot! .. it looks way better at 1.0 scale at distance, so I guess I will add a larger mesh, maybe play a bit with LOD and see how that goes

            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
              Okay I was wrong, the scale of the water plane does matter too.. it matters a lot! .. it looks way better at 1.0 scale at distance, so I guess I will add a larger mesh, maybe play a bit with LOD and see how that goes
              Yes ^^ LOD is the answer... It's just a real pain to set up with this material.

              Just as a note, that mesh is already scaled 10x by the blueprint, but it is all world space so shouldn't matter. I dunno why scaling does that, possibly tessellation artifacts I guess, not really sure though.

              Some kind of LOD is the last thing I am going to work on before uploading a new version, the mesh I include is way too small

              For those interested I updated the trello board with completed items & bugs, that should give a fairly good idea on what's coming
              Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

              Comment


                I want to add. I moved to UE4 for my Cold War Submarine Simulator game from Unity and I have to say.

                What you guys have achieved, as a community, in a few months. Versus what the Unity community has acheived on their community ocean project..... it just cant be compared. You guys are ROCKING AND ROLLING.

                I will be adding onto this project as soon as I get my project underway as we switch engines and practice our C++.
                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


                  Originally posted by Nsomnia View Post
                  I want to add. I moved to UE4 for my Cold War Submarine Simulator game from Unity and I have to say.

                  What you guys have achieved, as a community, in a few months. Versus what the Unity community has acheived on their community ocean project..... it just cant be compared. You guys are ROCKING AND ROLLING.

                  I will be adding onto this project as soon as I get my project underway as we switch engines and practice our C++.
                  Hey Nsomnia, welcome to the forums!

                  Well thank you, glad you like it! It is missing quite a bit of base functionality still, but I'm working on getting those fixed up. Any and all help is more than welcome so feel free to make any changes you see fit and we can work on getting them integrated into the main package. There are a lot of changes coming in the next version of this, but if there is any feature you want to have added, or even just doing things differently please let me know!

                  That sounds like a really interesting project you're working on, can't wait to see it in engine! You can post any screenshots here as well if you'd like, always nice to see how this is used in other projects.

                  Let me know if you need any info, it is not very well documented at the moment (another thing I need to fix... ). Have fun!
                  Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                  Comment


                    I can't believe I am just finding out about this. This is something that will help me immensely. Thank you all so very much. How would one go about getting the underwater post processing effects working? I am running the 0.2 buoyancy demo. I have created a post processing volume and tried both the M_Underwater_PP and M_Underwater_PP_Inst as the volumes bendable. I am a code monkey (not very skilled in the art side of things) so I may just be doing something wrong (or not doing something).

                    Comment


                      Hey DotCam,

                      Our team is going to meet next week with our sponsor to discuss our team contributing code and models. We found out that we in fact do own our code and models, so here's a guarantee from me confirming that we will in fact be giving you fish code and models! We just want to make sure that our sponsor is aware before we publish, and our academic advisors have wanted us to hold off talking with our sponsor until we release our prototype, which we will be doing this Thursday (hopefully haha!). Anyway, just wanted to give you an update! Can't wait for your next release.

                      Also, have you considered submitting this community project for a Dev grant? Our team is going to submit our prototype, big thanks to epic for that! I'll ask our advisors if we can post the prototype of our game here for play-testing. All feedback is good

                      Comment


                        I think Titon water by sundog studios is a good source of ideas. They were what we were going to use in Unity but its a 500$ asset, its used by the Navy and such. It has rotar wash, prop wash, bow waves, wake waves, kelvin waves (wikipedia it), infinite ocean and a basic underwater system but no weather system apart from wind speed and heading and its all written in c++, closed source unfortunately.

                        They also have a decal system they call it where things like oil slicks or kelp can be instantiated on the surface when needed for example I could say if my boat is damaged it would instantiate "oil_slick.tga" blended over the ocean shader.

                        It should be noted, the Unity Community Ocean Project has been going on for years... since 2011 or so, and like I said you guys have already matched it and in some areas surpassed it.
                        Last edited by Nsomnia; 02-24-2015, 03:22 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


                          Originally posted by JohnnyBeans78 View Post
                          I can't believe I am just finding out about this. This is something that will help me immensely. Thank you all so very much. How would one go about getting the underwater post processing effects working? I am running the 0.2 buoyancy demo. I have created a post processing volume and tried both the M_Underwater_PP and M_Underwater_PP_Inst as the volumes bendable. I am a code monkey (not very skilled in the art side of things) so I may just be doing something wrong (or not doing something).
                          Hey Johnny,

                          The 0.2 version does not have the Underwater PP volume by default, and that PP material was a quick test at the time. If you want to set it up and give it a try you will need to create a PP Volume that goes from the ocean surface down to the bottom, and then make these changes in the Details panel:
                          - In the "Post Process Volume" tab at the bottom, make sure "Unbound" is off, and set the "Priority" to 1, and then the "Blend Radius" to around 50
                          - In the "Blendables" tab add a new element and select the Material Instance version (M_Underwater_PP_Inst) so you can easily modify the values such as color etc (can't remember how many values are in that version, might not have very many)

                          Hope that helps! New one will be out shortly


                          Originally posted by Komodoman View Post
                          Hey DotCam,

                          Our team is going to meet next week with our sponsor to discuss our team contributing code and models. We found out that we in fact do own our code and models, so here's a guarantee from me confirming that we will in fact be giving you fish code and models! We just want to make sure that our sponsor is aware before we publish, and our academic advisors have wanted us to hold off talking with our sponsor until we release our prototype, which we will be doing this Thursday (hopefully haha!). Anyway, just wanted to give you an update! Can't wait for your next release.

                          Also, have you considered submitting this community project for a Dev grant? Our team is going to submit our prototype, big thanks to epic for that! I'll ask our advisors if we can post the prototype of our game here for play-testing. All feedback is good
                          Hey that's awesome news man! Thanks for the update. Hope the prototype goes well!

                          As far as the dev grants, I had not even thought about it for this project. I am not sure what to say at the moment, it could be beneficial at some point to purchase assets or something like that, but it doesn't feel right to me. I want this to be from the community for the community as much as possible. There have been many people willing to help out (like you! thank you for that ), and I want to keep it all open source which might not be possible with licencing code of some kind etc, when money is involved it complicates everything...

                          Thanks for mentioning it though, and I will give it some more thought. I will leave it open as a possibility in the future i if it is needed.


                          Originally posted by Nsomnia View Post
                          I think Titon water by sundog studios is a good source of ideas. They were what we were going to use in Unity but its a 500$ asset, its used by the Navy and such. It has rotar wash, prop wash, bow waves, wake waves, kelvin waves (wikipedia it), infinite ocean and a basic underwater system but no weather system apart from wind speed and heading and its all written in c++, closed source unfortunately.

                          They also have a decal system they call it where things like oil slicks or kelp can be instantiated on the surface when needed for example I could say if my boat is damaged it would instantiate "oil_slick.tga" blended over the ocean shader.

                          It should be noted, the Unity Community Ocean Project has been going on for years... since 2011 or so, and like I said you guys have already matched it and in some areas surpassed it.
                          Ah ok thanks for mentioning which one it was. I actually looked over their project (and downloaded the standalone demo to try out) as I was researching other projects a while back. I am pretty sure they use the Tessendorf FFT model for creating the waves from what I have seen, which is something I want to add in the future as a long term goal.

                          Most of those features will get implemented in this project at some point, I don't know whether Kelvin waves will make the cut, but who knows. Once this next release is out (any day now) I will be working more on the code side to add in more interaction, this one upcoming is mainly appearance related fixes and a few more base features.

                          One thing I wont add to the project though is a price. It may not end up with as many features as the paid systems, but hopefully it is still a good starting point for those wanting an ocean in their project, and will always be free.

                          --------------------------

                          One last note here, since version 4.7 was just fully released I am wondering which you guys prefer for the download. Are many of you planning to upgrade or already use 4.7? Or are most of you still using (and will use) 4.6.1?

                          I will provide a link for both versions, I'm just wondering what your preferences are going forward.

                          Thanks everyone!
                          Last edited by DotCam; 02-24-2015, 04:52 PM.
                          Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                          Comment


                            I've been primarily 4.7 for over a month now - due to it's excellent VR dev workflow (VR preview mode). So definitely a vote for 4.7 for me

                            Comment


                              4.7 please!
                              --
                              Joshua
                              Multimedia Artist, Druid Gameworks
                              www.joshuaezzell.com
                              www.druidgameworks.com

                              Comment


                                I just updated my project to 4.7 and a bunch of stuff is broken. At this point I think I will remake the OceanManager in pure blueprint and use the new blueprint components to make buoyancy components. Will lead to easier integration with no C++.

                                Comment

                                Working...
                                X