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 Gurvy View Post
    I have a problem with buoyancy object. I try to use your BP_buoActor in my level. I've placed the ocean BP, setup it, and when I put the Actor on it, with 4 points collision and the average same parameters like in your test scene, and something strange happens, the actor just elevate to a certain point, and reverse itself, then seems to buoyance at this point... What am I doing wrong ?
    If you are using the master branch then make sure your ocean plane is at 0 Z, if you need to move the ocean plane then use the TK branch for now, it's a bit more updated.

    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 dougb View Post
      Hey Tin,

      These post process materials are awesome. Will you be sharing them for the OceanProject?
      It's actually very simple.

      Note: I currently don't have the ocean project right now but my rain setup is very similar

      Rain/ Water drops:


      Underwater Distortion/Heat:


      You can see them in action right here:

      Rain:


      Heat:


      Those effects above will be used in my commercial project.

      P/S: I tend to avoid using Scene Color because it disables any kind of DoF.
      Last edited by Tin Le; 05-15-2015, 12:01 AM.

      Comment


        Another question, with Tk branch.

        I need to have two ocean in the same level, one for calm water, and another for a torrent, with different parameters. But actually when I place my seconde ocean and setup it, it modifie the result of the first ocean too... Is there any possibility to use 2 oceans in the same level ?

        Thanks !

        Comment


          It's ok i found a solution to have multiple ocean in the same level

          Comment


            Tin Le - those effects look awesome. Thanks for sharing your water drop effect

            TK-Master - This is going to be a summary of my action as I work along, so sorry if it's too long. As a newbie to BPs I'm as much interested as learning how to use them, rather than just learning what I can do with them - seeing how other people arrive at their conclusions has been more helpful than what they were actually trying to achieve. For me, anyway

            As you'll no doubt easily see, the BP in the screenshot below nets me a true/false printout, depending on the value of the z axis (>300). This (or some other value) will be a trigger for the sound.

            Click image for larger version

Name:	BP1.jpg
Views:	1
Size:	120.3 KB
ID:	1076425

            However, z's peak value isn't static. Standing at the spawnpoint on the jetty, I get a high of about 352 and a low of around -352. At the end of the jetty, by the galleon (cool word), I get about 130 and -130 respectively. Stepping off the jetty at the galleon end, and hitting the sea floor I get about 100 and -100 which alters through buoyancy...

            I thought that might be because the player z position was effecting the reference for the wave height, but after testing that out by using only the player's x position to define their location I can see that's not it either.

            I also get a wave height value even if I'm not actually over the wave mesh:

            Click image for larger version

Name:	PLAY1.jpg
Views:	1
Size:	154.9 KB
ID:	1076426

            My current thinking is to cast a ray down from the player, in a similar manner to the way I was going to test out making footsteps for the wood and beach surfaces. This can then collide with anything that's not Ocean_BP and stop the wave sound! [EDIT: I haven't included a filter for this yet.]

            If I understand raycasting correctly, I will also be able to get a more natural shoreline sound effect by allowing the raycast to pass through the Ocean_BP, hitting the beach mesh and, depending on the distance between the two in z, trigger a gentler lapping sound, with attenuation on the more distant waves causing them to fade into the background. This will necessitate an overlap between the Ocean_BP mesh and other meshes, but should allow for better aural realisation of fluid contacts (e.g. a raft's edges or, with some small xy denomination, the galleons and other larger objects who intersect the water vertically in relation to the player). [EDIT: This is an idea for later...]

            This BP provides values of around 700-odd positive and negative consistently throughout the map:

            Click image for larger version

Name:	BP4.jpg
Views:	1
Size:	150.6 KB
ID:	1076431

            Posting this now, and will test the sounds in a moment - putting the finishing touches on some football armour in preparation for a Mad Max theme party this weekend

            [EDIT: I still get a waveheight reading when I'm not on top of the Ocean_BP (without filtering for objects), which puzzles me. What could it be referencing, and what part of my BP is causing this? :/]
            Attached Files
            Last edited by Valkyrie_Sound; 05-15-2015, 11:17 AM.
            LinkedIn | Insta | YouTube | SoundCloud | valkyrie-sound.com | Sound Design, Composition, Production
            Check it out!

            Comment


              Originally posted by concrete_buffalo View Post
              However, z's peak value isn't static. Standing at the spawnpoint on the jetty, I get a high of about 352 and a low of around -352. At the end of the jetty, by the galleon (cool word), I get about 130 and -130 respectively. Stepping off the jetty at the galleon end, and hitting the sea floor I get about 100 and -100 which alters through buoyancy...

              I thought that might be because the player z position was effecting the reference for the wave height, but after testing that out by using only the player's x position to define their location I can see that's not it either.
              That is the behavior of our current gerstner wave implementation. Some spots of the ocean will end up having multiple waves overlapping which causes the amplitude to multiply (or end up with spots with not many waves overlapping.. whichever it is I'm not sure).
              It's not really a random ocean, even if it might look at it .. the same waves will go over the same spot over and over again.

              I can see how this can be a bit of a problem but the player will be moving all the time anyway plus you should have multiple test points around the player.. so if for example your threshold for playing a sound is 300 then eventually the player will be at a spot where the wave goes over 300.

              Originally posted by concrete_buffalo View Post
              I also get a wave height value even if I'm not actually over the wave mesh
              Don't let it confuse you, the mesh is only a visual representation of the ocean you will get a wave height value everywhere. Also buoyancy works everywhere currently.

              If you want to detect if you are on land or detect depth then you can do a trace.
              Last edited by TK-Master; 05-15-2015, 02:01 PM.

              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


                Anyone know a tutorial or how to make this ocean swimable?
                Interested in having someone review your game? want to do an interview on it?

                This check out this website.

                Working on a game as well.

                Comment


                  You can add a physics volume in the level then enable the Water Volume variable.

                  I believe both the master and TK branch already have swimable volume in the example map, the thirdperson char in the TK branch also has correct character swim control (all missing is some swim animations )

                  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


                    I was wondering if it is possible to use depthfade to flatten the water under small vessels like rafts and canoes? or maybe there is another way to do that?

                    Comment


                      With depth fade no.. there are other ways but you will probably have to mathematically define the shape and location of the flat area.

                      However since there is no array support or for-loops in the material editor (seriously guys, start bugging Epic about that ) it means you are limited to a pre-defined number of "flat locations" that can work simultaneously (which you would have to manually pass into the material instance via parameters).

                      If we are talking about a single raft which could be easily defined as a rectangle then it can be done though.

                      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


                        Me again

                        Small problem - I'm creating an infinite loop. I'm not sure how to control the whileloop. The UE4 documentation suggest using an iterator but I don't see that node

                        This is still a bit bare bones:




                        Also, as this is really a general query about blueprints and not specifically linked to the project, let me know if it's best to ask outside of this thread - I don't want to pester you when there are others out there who will, I'm sure, also have suggestions
                        LinkedIn | Insta | YouTube | SoundCloud | valkyrie-sound.com | Sound Design, Composition, Production
                        Check it out!

                        Comment


                          The attachments you posted are not working for me

                          If it's not specifically linked to the project, feel free to send me a PM or make a thread in the blueprint section of the forum

                          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


                            Hello and awesome work
                            I was wondering if there is a way to make the ocean plane be affected by a "nav mesh bound volume" to enable the use of AI/bots?
                            Unless there is another way to move, say a boat around to specific coordinates/waypoints, have tried "set location" hooked up to a timeline and a lerp but it makes my pawn jump and act unnatural and it jump around at the target location.

                            Comment


                              I don't know if this is some windows visual c++ compiler vs clang on linux thing but I get this error trying to compile the master branch.

                              [254/711] Compile Module.TranslationEditor.cpp
                              In file included from /mnt/store/Unreal Projects/OceanProject_4.8/Plugins/OceanPlugin/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/UE4Editor/Development/OceanPlugin/OceanPluginPrivatePCH.h:4:
                              In file included from /mnt/store/Unreal Projects/OceanProject_4.8/Plugins/OceanPlugin/Source/OceanPlugin/Private/OceanPluginPrivatePCH.h:13:
                              In file included from ../../../../Unreal Projects/OceanProject_4.8/Plugins/OceanPlugin/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/UE4Editor/Inc/OceanPlugin/OceanPluginClasses.h:16:
                              ../../../../Unreal Projects/OceanProject_4.8/Plugins/OceanPlugin/Source/OceanPlugin/Classes/Fish/FlockFish.h:139:25: error: implicit conversion of NULL constant to 'float' [-Werror,-Wnull-conversion]
                              float CustomZSeekMin = NULL;
                              ~ ^~~~
                              0.0
                              ../../../../Unreal Projects/OceanProject_4.8/Plugins/OceanPlugin/Source/OceanPlugin/Classes/Fish/FlockFish.h:143:25: error: implicit conversion of NULL constant to 'float' [-Werror,-Wnull-conversion]
                              float CustomZSeekMax = NULL;
                              ~ ^~~~
                              0.0
                              2 errors generated.
                              From what I can see, CustomZSeekMax is not supposed to be a pointer so I don't understand why you would use NULL there instead of 0.0 or some other constant.

                              Comment


                                Originally posted by Salamanderrake View Post
                                I don't know if this is some windows visual c++ compiler vs clang on linux thing but I get this error trying to compile the master branch.


                                From what I can see, CustomZSeekMax is not supposed to be a pointer so I don't understand why you would use NULL there instead of 0.0 or some other constant.
                                Thats odd becuase im getting this:

                                error C2039: 'Actor' : is not a member of 'FDestructibleChunkInfo' D:\Projects\Perforce_Projects\CityScape\Plugins\OceanPlugin\Source\OceanPlugin\Private\BuoyantDestructible.cpp
                                I looked into it and it looks like Actor was removed in the FDestructibleChunkInfo. Anyone have any ideas on any other ways to grab the Rigid Dynamic?
                                Last edited by MrFata; 05-20-2015, 06:11 AM.

                                Comment

                                Working...
                                X