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 MagicBlueFrog View Post

    I strongly suspect it is not a problem with the normal multiplayer but the fact that I am trying to use a network game as a local split screen game. Do you think it would be difficult for me to repurpose the project into a local multiplayer (I'm assuming this would fix the reflection problem) and do you have a pointer for where to start with that? Can I just delete all the network references?
    The steps I provided above are common to any project since the multiplayer is a built-in feature inside the Engine. The only changes we do with blueprints is to set if they are replicated through network or not, and if so which variables should be replicated. The variables could be anything inside.

    I have followed the steps above and the replication is fine for the waves and the reflections are ok too. The issue you are experiencing is really because the split screen is not a feature which allows the built-in multiplayer to work, since for it to work you need to network distinct process running in order to have an exchange of replicated values. So one single process can't handle multiplayer from the core, but as two process which matches the real situation in real world it works perfectly!

    Later I will post a small video showing the steps above in action, get back in 1 hour that the video should be up!

    The link is bellow:




    Last edited by NilsonLima; 05-03-2018, 09:22 AM.
    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
      The only changes we do with blueprints is to set if they are replicated through network or not, and if so which variables should be replicated. The variables could be anything inside. The issue you are experiencing is really because the split screen is not a feature which allows the built-in multiplayer to work, since for it to work you need to network distinct process running in order to have an exchange of replicated values. So one single process can't handle multiplayer from the core, but as two process which matches the real situation in real world it works perfectly!
      Thanks for the video. It is a little hard to hear, especially when the waves come in (but I could mostly follow).

      But it is not really what I want. I really want a single process for a local split screen (not cool anymore?). I checked all the relevant Blueprints and the only one that had replication set was the skydome. Unsetting replication for that didn't help. I also checked all the C++ and none of them had replication explicitly (though the engine probably takes care of that in the background). I think the main issue is in the materials for the ocean shader since they all have references to camera position and direction, so assuming only one camera. There is also the InfiniteSystemComponent which follows Player 0, but setting follow mode to "stationary" just makes the waves very small and doesn't fix my split screen problem. I think in order to make it split screen compatible I need to edit the materials and make them not depend on the camera position, but I am not very familiar with materials and their functions, so the more I try to hack it the worse it looks and doesn't seem to get rid of the camera dependence. I wonder if I could create two materials and make one invisible to the other player or something like that... but I don't know how to make that work.

      Comment


        Originally posted by MagicBlueFrog View Post

        Thanks for the video. It is a little hard to hear, especially when the waves come in (but I could mostly follow).

        But it is not really what I want. I really want a single process for a local split screen (not cool anymore?). I checked all the relevant Blueprints and the only one that had replication set was the skydome. Unsetting replication for that didn't help. I also checked all the C++ and none of them had replication explicitly (though the engine probably takes care of that in the background). I think the main issue is in the materials for the ocean shader since they all have references to camera position and direction, so assuming only one camera. There is also the InfiniteSystemComponent which follows Player 0, but setting follow mode to "stationary" just makes the waves very small and doesn't fix my split screen problem. I think in order to make it split screen compatible I need to edit the materials and make them not depend on the camera position, but I am not very familiar with materials and their functions, so the more I try to hack it the worse it looks and doesn't seem to get rid of the camera dependence. I wonder if I could create two materials and make one invisible to the other player or something like that... but I don't know how to make that work.
        Replication is only related to different processes, it won't work for a singtle process, so no change regarding that will make that work. Your issue on having the solution running on single process with a split screen will require a deep analysis. Is it the only thing messed up the reflections?

        The infinite Ocean to work really need a single camera reference, because the Infinite Ocean is an ilusion. It is just a plane very large which is moved with the camera giving a fake infinite ocean feeling.
        Last edited by NilsonLima; 05-04-2018, 02:02 PM.
        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
          Your issue on having the solution running on single process with a split screen will require a deep analysis. Is it the only thing messed up the reflections?
          The infinite Ocean to work really need a single camera reference, because the Infinite Ocean is an ilusion. It is just a plane very large which is moved with the camera giving a fake infinite ocean feeling.
          No, other things get messed up for the second player too, like the shading and color, especially if the first player looks up at the sky. I will keep playing with it and see if I can get something to work and will let you know if I have any success. It will be difficult though, since I only understand about 30% of what's happening in the materials and roughly 0% (give or take) of why it's done that way.

          Comment


            Originally posted by MagicBlueFrog View Post

            No, other things get messed up for the second player too, like the shading and color, especially if the first player looks up at the sky. I will keep playing with it and see if I can get something to work and will let you know if I have any success. It will be difficult though, since I only understand about 30% of what's happening in the materials and roughly 0% (give or take) of why it's done that way.
            The shading and color might be caused by SkyLight placed in the scene. In order for you to test if it is the root cause, you just disable it in the level and play again. In multiplayer (the built-in one like in the video) we just call the recapture method, so both server and client are updated same way, this is important, because the SkyLight is the indirect light in the scene and if you have the main directional light moving the indirect light must update accordingly.

            I never used the split screen feature, so I will really need some time to look and understand whats going on. If it uses the built-in multiplayer in a special way, then there must be a way to fix everything. Actually it is hard to find someone with a good idea for split screen usage, so many assets probably are not made with that usage in mind Im afraid.

            Anyway all is part of the learning process, but in my opinion you are going to stuff a bit complex right now... it is really important to understand how materials works in the engine, since it is the base for everything else.
            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
              The shading and color might be caused by SkyLight placed in the scene. In order for you to test if it is the root cause, you just disable it in the level and play again.
              Yes, you are right! Thanks! It partially works now. If I set the sunlight to stationary instead of moveable then it gets rid of the strange shading/lighting I was seeing. I still cannot use the "Ultra" ocean shader or any of them that use SSR without getting strange effects in split screen, so now I use the one with Gerstner waves, Foam and Cubemap and it looks pretty good. Not as good as Ultra, but definitely better than the ocean I had before. And I guess I will have a hard time including any of the weather or time of day effects if I want to later, but for now it is a big improvement already.

              Cheers!

              Comment


                Originally posted by MagicBlueFrog View Post

                Yes, you are right! Thanks! It partially works now. If I set the sunlight to stationary instead of moveable then it gets rid of the strange shading/lighting I was seeing. I still cannot use the "Ultra" ocean shader or any of them that use SSR without getting strange effects in split screen, so now I use the one with Gerstner waves, Foam and Cubemap and it looks pretty good. Not as good as Ultra, but definitely better than the ocean I had before. And I guess I will have a hard time including any of the weather or time of day effects if I want to later, but for now it is a big improvement already.

                Cheers!
                The Sun is a DirectionalLight component, your main direct light, which to simulate a time pass would need to be Moveable. The indirect light is provided by another component called SkyLight, which usually will be set the same and your Sun (if Moveable, then SkyLight is also Moveable, and so on). You could have the SkyLight set as Stationaty while the Sun is Moveable but it might not work OK in night time, since the SkyLight will inject too many light into the scene, unless this is desirable.

                I will see if I can check the issue with the reflections today with split screen and get back to you.
                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


                  MagicBlueFrog I have identified the issue with the Infinite Ocean system inside the C++ plugin, which is only taking the camera from player 0 to move the ocean plane, so what you see in the portion of the screen for player 1 is the ocean plane moving with the perspective of player 0, all the remain of the code do it right, meaning the waves are ok, but as the reflections are the feature most affected by the angles and position, it has visually a higher impact on player 1 portion of the screen. So, basically I will change the code to look for the correct camera from the correct player to finally use it in the Infinite Ocean system. Give me few more time to change the code, test and release it.
                  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
                    MagicBlueFrog I have identified the issue with the Infinite Ocean system inside the C++ plugin, which is only taking the camera from player 0 to move the ocean plane... So, basically I will change the code to look for the correct camera from the correct player to finally use it in the Infinite Ocean system. Give me few more time to change the code, test and release it.
                    Awesome, thanks!
                    The other thing I have been playing with is making a finite ocean because I do not want the Ocean to interfere with other lakes and rivers, etc. in my level and I just need a finite sea rather than an ocean. All I did was duplicate the BP_Ocean and called it BP_FiniteOcean and deleted the InfiniteSystemComponent and the BillboardComponent ("Icon") and replaced it with a simple SceneComponent (because I don't really understand why it is there unless it is to turn the whole ocean together with the player who observes it...?). This indeed gives me a finite Ocean which doesn't follow the player around, but the Screen Space Reflections and Planar Reflections still follow Player 0's camera. I don't know if a finite ocean system would interest other users, but if they don't use split screen then the Ultra shader would still work for them using this set up, whether or not you manage to get the reflections working, so it would probably be simple to add to the package.

                    Comment


                      Originally posted by MagicBlueFrog View Post

                      Awesome, thanks!
                      The other thing I have been playing with is making a finite ocean because I do not want the Ocean to interfere with other lakes and rivers, etc. in my level and I just need a finite sea rather than an ocean. All I did was duplicate the BP_Ocean and called it BP_FiniteOcean and deleted the InfiniteSystemComponent and the BillboardComponent ("Icon") and replaced it with a simple SceneComponent (because I don't really understand why it is there unless it is to turn the whole ocean together with the player who observes it...?). This indeed gives me a finite Ocean which doesn't follow the player around, but the Screen Space Reflections and Planar Reflections still follow Player 0's camera. I don't know if a finite ocean system would interest other users, but if they don't use split screen then the Ultra shader would still work for them using this set up, whether or not you manage to get the reflections working, so it would probably be simple to add to the package.
                      I was messing with the code and it looks like the Infinite Ocean system is partially guilty only... the reflections might be a general bug on the split screen feature, which to be sure I will need to look on the engine source code. Im looking at this aswell now that I have realized this, so it will take way more time than expected.

                      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


                        MagicBlueFrog I have just finalized the checking and it is an engine bug when dealing with reflections with split screen. I have just created a new project (4.17, 4.18 and 4.19) with 3rd person template, added Water Planes asset into it and left the TranslucentWater_Example map as default, added a 2nd PlayerStart and assigned both players with auto for player 0 and 1 respectivelly, created a game mode class including in the OnBegin event a CreatePlayer, set override for game mode with the new one created, and set split screen vertical.

                        When executed, while moving the player 0, the reflections on the water get messed on player 1. In this translucent water, there is no Planar Reflections, there is no plugin, therefore no InfiniteOcean system, just the plain free Epic's Water Planes.

                        On Monday morning I will submit a bug report, since this issue is detected in the latest 3 engine versions, it might be even older. Once I get the Jira number I will post it here, so others can vote for it to receive more attention from developers.
                        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


                          Hey all, been a while! Hope you are all doing well.

                          I've been gone for the better part of a year and once again I am very grateful to the entire community for keeping this project alive. Looks like we just hit 2500 posts in this 63 page long thread... I never thought that would happen when I first posted it, you guys are awesome!

                          A couple people I would like to mention by name:

                          Zoc - (known as TheZoc on Github) messaged me 8 months ago and graciously offered to take over management on Github while I was gone. I literally couldn't have done this without you, thank you so much for everything you have done! You made my time away a lot easier knowing the project would be kept up to date. Thank you man. Seriously thank you so much, you have no idea how much that meant to me, so again, thank you!!!

                          NilsonLima - I have not had time to read back through all I missed, but it is abundantly clear you have been assisting people on this thread for some time now. I can't thank you enough for taking the time to do this, from what I have read you seem to be very knowledgeable about this project, and have helped a lot of people fix their issues. If there is anything I can do for you (I'd gladly add you as a Github admin or contributor if you are interested) please let me know!

                          There are so many more of you it would take forever to individually go through, but please know that I see you, and thank you for everything.


                          Ok, now down to business.

                          I've been digging through the project again over the past couple of days looking at what needs improvement, and have decided it is time to de-bloat and remove old and unused content, and improve readability before going any further. Couple examples; the Ocean Ultra shader is an absolute mess of wires and undocumented nodes, nearly all blueprints have no comments or variable descriptors, etc, etc. The download size is also quite large, I'm going to see what we can do about that.

                          Many people seem to be having issues moving the content to another project, which is my fault. There isn't much documentation and the blueprints don't fall back on defaults as gracefully as they should, this is another area I will be working on over the coming days. I want to get the project to a state where is is a solid foundation to work from before adding more features.

                          If anybody has any contributions they would like to add, please either leave a post here, or feel free to PM me if you prefer.

                          Thanks guys!
                          Last edited by DotCam; 05-11-2018, 10:57 AM.
                          Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                          Comment


                            DotCam Its been a pleasure man, good you are back, so grateful for this work that also have opened my eyes for Unreal as the first time I saw this running so beautyfully... for me is paying kindness with kindness not that I got close to that I would like to have admin status on github if possible (<Email removed by Mod>), so I can post changes on every new engine release, since this been a constant and people usually not familiar on how to fix C++ code when API breaks apart.

                            I do agree the materials need some cleanup, maybe some parts separate into material functions to better get reused on other ocean types for lower performance scenarios.

                            I will contribute with the free options Im developing in my FFT Ocean, so I think it will be nice both oceans offering same status, so it will be like a matter of taste in the end.
                            Last edited by DotCam; 05-08-2018, 05:08 PM. Reason: Removed email address (so you don't get spam mail!) :)
                            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 would like to have admin status on github if possible
                              I sent you a PM

                              Originally posted by NilsonLima View Post
                              I will contribute with the free options Im developing in my FFT Ocean, so I think it will be nice both oceans offering same status, so it will be like a matter of taste in the end.
                              Oh wow I didn't realize you were making an FFT Ocean, that's awesome! Looking forward too it, I will be a day one buyer, and I know a lot of other people will buy it too!

                              We could maybe find a way for people who buy it to use it seamlessly with this project (instead of the Gerstner waves) if you want. That was what we planned to do when TK-Master had started working on one a while back, he too was planning to put his on the marketplace, but hasn't worked on it since last fall. Can't wait to see what you come up with!
                              Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                              Comment


                                Hi everybody,

                                Click image for larger version

Name:	image_35299.jpg
Views:	10
Size:	78.7 KB
ID:	1473880

                                is anybody else having problems with the "wake" material too? I think since updating to UE4.17 (or maybe 4.16) the wake is almost invisible. I've played a bit around with it and I think it has to do something with the wake material's translucency, but so far I wasn't able to determine what's really causing it's invisibility.

                                Maybe somebody else here already found a solution?

                                Comment

                                Working...
                                X