Announcement

Collapse
No announcement yet.

[Community Project] FREE Ocean Water Shader

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

    I think I'm starting to get closer to what I wanted in terms of fog. Check this out.

    Click image for larger version

Name:	fog0.JPG
Views:	137
Size:	61.4 KB
ID:	1666448Click image for larger version

Name:	fog1.JPG
Views:	137
Size:	68.0 KB
ID:	1666449

    Comment


      Sorry guys it was night time and it seemed fine to me, but in the morning I realised that it's way too dark.

      Comment


        Originally posted by script526 View Post
        Sorry guys it was night time and it seemed fine to me, but in the morning I realized that it's way too dark.
        You will probably need to drive the colors in the material with a Material Parameter Collection and update this material parameter collection with a blueprint which will check the hour or the sun position. Since you can do a Dot product from the sun light vector with a vector (0,0,1) it will give you a range of -1 to 1 value which you can use with a color curve, so at each point from the curve (-1 to 1) you can specify a color and retrieve the color for it. The same approach is found in BP_SkySphere present in the engine to determine the sky color, so you can do the same to drive the fog color with 1 curve, fog density with another curve and other things you think is dependent on the Sun position.
        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


          Yeah, I'll give it a shot when I fix the 'ship-related' and lighting issues.

          Comment


            Hi there people,

            Ive been playing around with gerstner waves for a while now and im trying to make the waves flow in towards the shoreline in different directions. The idea is i have a flow map baked in to vertex colours on the mesh and i use this colour information to drive the direction of the waves. However, even after smoothing the vertex colours out quite a bit the points where two directions blend together completely breaks apart and just becomes a bunch of displaced noise.

            Anyone have experience with approaching this so that the different directions blend smoothly?

            Cheers!

            Comment


              Hello Everyone,

              The transparency of the ocean is not working in VR mode. Depending on where you look in VR, sometimes you see the ocean transparency but most of the time you do not. I am currently using Instanced Stereo mode with regular deferred shading. Just wanted to see if anyone can replicate this issue with the ocean in VR and provide some possible solutions to try out?

              Thank you,

              Kevin

              UPDATE:

              I fixed the issue. I noticed that the water blast particle effect from the Unreal Marketplace "Paragon Twinblast" assets caused the ocean transparency to work in VR when played (but after particle effect completion, the water loses transparency again). So, I narrowed down the exact effect within the water blast particle effect called "Masked", deleted all other effects around it (e.g. water droplets, etc.), set the opacity of "Masked" to 0, and play the effect in front of my player every 0.05 seconds.

              This solution somehow causes Unreal Engine to update the transparency of the ocean in VR. The effect has to be played in the view of the player. It's a super hack but it works for now. Hope this helps someone using the ocean plugin in VR.

              Finally, it seems that you also need to disabled SSR inside your BP_Ocean in order for this to work.
              Last edited by XGibbousX; 10-01-2019, 10:53 PM.

              Comment


                XGibbousX This probably is related to translucency sorting order. At the current state Unreal does not know how to put a translucency material on top of another material in a scene if you don't tell the order starting from the camera position. All objects, including particle effects (which mostly are made in a translucent or alpha composite material), are set with a field called Translucency Sorting Order = 0. To avoid that people using particle effects against the ocean (ocean behind particles) I have set the mesh planes for the ocean to have the sort order = -1 (at my repositoty branch at least).

                You didn't mention if you are playing the effect while underwater or outside with ocean as background, so this info and a picture or video would greatly help understand your issue.
                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 everyone,

                  I apologize if this has been addressed (many) times before.

                  I had a question regarding world composition. I'm working on a project that level streams in an island built in World Creator in a tiled, 3x3 grid pattern.

                  Last time I worked with OceanProject, it would only edge detect a single heightmap (if I'm not mistaken).

                  Can it, or are their plans to, have it react to multiple landscapes?

                  TIA.

                  Comment


                    FlashFreak I have made a video for some people letting they know where the necessary changes in the code would be necessary, but I am not sure if anyone tried that yet. Since I am building another Ocean system I am having my own issues there and I don't have the time necessary to invest in this project at least for now.
                    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 NilsonLima, I saw this happen to you on one of your tutorial videos)

                      For those of you having issues compiling the man-o-war blueprint:

                      When you open a level in the editor, it creates a game world for the spawned actors that you see in the view port. If you modify one of those actor's blueprint significantly, it DESTROYS the actor, and recreates it. This normally would not be an issue except for the thumbnail system:

                      void FClassActorThumbnailScene::ClearStaleActors()

                      This loops through the CURRENT actors and destroys them.

                      HOWEVER when you destroy the man-o-war, "Event Destroyed" fires in blueprints....
                      And inside of that we:
                      SPAWN ANOTHER man-o-war

                      adding it to the list that ClearStaleActors() is referencing. This causes an infinite loop of new actors being created then destroyed ect ect.

                      Simply remove the spawn node from the "Event Destroyed"!!!!!!!!!!!!!!!!! (This needs to actually be moved to gamemode or player controller)
                      Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap
                      Plugins:
                      ComputeShader CPU->GPU->CPU || Universal TimePlugin || Universal SkyPlugin
                      Other tools/functions:
                      Universal GetNetwork/LocalRole

                      Comment


                        Hi EvoPulseGaming ,

                        I don't remember this particular part of code, but I am going to check it out and make the fixes you suggested, thanks!
                        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


                          Another user put up a issue on github for it, and linked to your youtube video where it froze on you. I'm submitting a fix for it in the repo as we speak
                          Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap
                          Plugins:
                          ComputeShader CPU->GPU->CPU || Universal TimePlugin || Universal SkyPlugin
                          Other tools/functions:
                          Universal GetNetwork/LocalRole

                          Comment


                            Hi! I tried to make my own boat based on fishing boat from island map. There are couple of questions.. I created some test points but they didn't appear in viewport so I can't configure them correctly (screenshot). And another question, why fishing boat has no test points at all and so how can it float without them? Thanks)
                            Click image for larger version

Name:	testpointarray.jpg
Views:	115
Size:	214.6 KB
ID:	1680683

                            Comment


                              RocketBan About your questions:

                              - for the test points: if you created the blueprint yourself, when you make vector variables there is an option called Show 3D Widget which appears as soon you have chosen the Vector as type. You need that option checked.
                              - for the fishing boat: I think I have commented in a video I made about foam wakes how it is done. If you open the boat blueprints, you will see that several objects are part of the blueprint which have several usages, like where is the point where the torque force is applied, where the test points are anchored, where the foam wakes are spawn, etc. About your question, without looking at the blueprint atm, I can assure the test points are attached to a box which is part of the mesh hierarchy, so if the buoyancy force is applied to the box it will lift the boat mesh aswel. This is particularly useful if the mesh doesn't have a obvious shape on where to put the buoyancy points, so putting them into a box also helps with prototyping when you don't have the final meshes done already.
                              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
                                RocketBan About your questions:

                                - for the test points: if you created the blueprint yourself, when you make vector variables there is an option called Show 3D Widget which appears as soon you have chosen the Vector as type. You need that option checked.
                                - for the fishing boat: I think I have commented in a video I made about foam wakes how it is done. If you open the boat blueprints, you will see that several objects are part of the blueprint which have several usages, like where is the point where the torque force is applied, where the test points are anchored, where the foam wakes are spawn, etc. About your question, without looking at the blueprint atm, I can assure the test points are attached to a box which is part of the mesh hierarchy, so if the buoyancy force is applied to the box it will lift the boat mesh aswel. This is particularly useful if the mesh doesn't have a obvious shape on where to put the buoyancy points, so putting them into a box also helps with prototyping when you don't have the final meshes done already.
                                Thanks a lot) It works. But my boat is shaking now on water surface. I tried to make box collision, apply buoyancy force to it and attach static mesh to this collision (like in ManOfWar). But now it is not floating at all(

                                Comment

                                Working...
                                X