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

    I have improved the audio: (EDIT: Improved it on OceanExampleMap_01 only)

    - Created new asset for submerged ocean sound in Cubase, adapted from original ocean_water audio asset (built at 22050Hz - no need for any higher; mono; ogg size has thus reduced from 3344 to 566 for better performance)

    - Original ocean_water asset shortened (why was it 5 mins in the first place lol - down to ~2:30 and probably still longer than needed )

    - Audio Cues created for surface, submerged, and underwater bubbles (because we all like bubbles)

    - Bespoke attenuation volumes crafted for un-/submerged volumes, with respective audio assets attached

    - Third volume created for 4 bubble types which will play at randomised intervals and randomised pitch/volume - tested and refined (though perhaps a little too high pitched in places - please feedback. Randomised delay is between 2 and 6 seconds, on the basis that players won't spend long underwater. With correct documentation, any user can change this)

    - Crossfade articulated between surface volume (CUE_ocean_top) and subsurface volumes (CUE_bubbles; CUE_ocean_sub)

    - Audio Classes created and sound assets allocated: [Master (Ambience {Ambient_SFX}) (Music) (Dialogue) (SFX)] - will help file structure

    - Ocean sounds moved from their original file location (Content/ShipsAndExamples/Audio) to Content/Audio - recommend moving cannon firing SFX into Content/Audio/ and allocating to SFX Audio Class, unless you plan on a strictly modular design

    I’m not 100% happy with the crossfade between volumes and would prefer more overlap. However, if an animation is being added for entering/exiting the water then splash SFX would effectively mask the crossfade (splash could be 1-2 seconds easily, with its own fade out built in Cubase).

    Let me know where to drop files if you’d like them


    (video might be a little quiet!)


    Proposed:

    - Surface swimming effects (surface water being pushed and rippling: possibly 2-3 audio assets which can be layered and randomised in UE4)

    - Subsurface swimming effects (as above, but with LPF on the imported asset)

    - Splash SFX for entering water

    - Drip SFX for exiting water

    I am more interested in determining how to allocate correct wave SFX to rendered waves. I believe that it should be possible to convert the data that informs the way the wave crosses over the dynamic material into an output that can be used to trigger audio assets and effect audio volume/attributes.

    Example (assuming there’s a parameter for wave height, which I don’t think there is):

    Wave height = 0–0.2 -> no additional audio assets called; ambience only
    Wave height = 0.25↑ -> base layer called (probably white noise)
    Wave height = 0.5↑ -> additional layer called (actual wave (representation))
    Wave height = 0.75↑ -> cresting audio called [at whatever the tipping point actually is]
    Wave height = 0.7↓ -> spray audio called
    Wave height = 0.6↓ -> roll-off audio called (as wave breaks)
    Wave height = 0.4↓ -> wave dissipates audio called (end of wave break)
    Wave height <=0.2 -> no additional audio assets called; ambience only

    With blending, which may be best built inside Cubase through applied fade in/out, the wave life/death can be rendered seamlessly. All I need is to know how to extract the data! From there, I can use UE4 or Wwise to interpret it and apply it

    The next problem is then how to render these sounds in-game: as ribbons of sound following the waveform, or presented locally to the player (could be difficult in multiplayer). Either way, I am certain (hopeful) that correct audio panning can be achieved through this approach, meaning you can be standing sideways on to the waves and track them as they move left to right / right to left.

    Using a similar approach, it should (should) also be possible to render effectively the submerged audio assets underneath the bulging wave part of the material, by inverting the coords (or whatever reference is applied) used to define the surface wave audio functions. This would negate the need for rigid audio volumes that do not dynamically match the material's shifting shape.

    I would guess 18-22 audio assets overall (6 for waves; 4 bubbles; 2-6 player/character water movement; enter; exit; additional sprays and waves).

    If the person(s) who created the material in the first place can contact me – or anyone who has an inkling on how to achieve what I’m looking to do – that would be fantastic.
    Last edited by Valkyrie_Sound; 05-09-2015, 08:09 PM.
    LinkedIn | Insta | YouTube | SoundCloud | valkyrie-sound.com | Sound Design, Composition, Production
    Check it out!

    Comment


      Hey there concrete_buffalo and welcome to the forums

      I have zero knowledge about audio in UE4 (I consider audio to be the last step in game dev, unless it's an audio-based game), the ocean sfx I added was just so the scene doesn't feel that dull , it's definitely not "done", not by a long shot

      You are more than welcome to contribute of course! you can upload the files wherever it's easier for you (personally I use google drive or mediafire to upload stuff) and eventually me or the other guys (Komodoman, DotCam) will add it to github.

      Let me try to give some feedback and answer some of your questions.. (long post btw!)

      Originally posted by concrete_buffalo View Post
      - Created new asset for submerged ocean sound in Cubase, adapted from original ocean_water audio asset (built at 22050Hz - no need for any higher; mono; ogg size has thus reduced from 3344 to 566 for better performance)
      compression? nooo! my arch enemy!
      When it comes to audio, I'm a quality nut if it was up to me I would add uncompressed flac 7.1 support or some unnecessary thing like that.. haha but that could be just me
      Besides there is no performance to be gained by this, it's a single looping sound.

      Originally posted by concrete_buffalo View Post
      - Original ocean_water asset shortened (why was it 5 mins in the first place lol - down to ~2:30 and probably still longer than needed )
      I wanted to make the file start playing at a random time point when you start the map so it sounds "unique" every time but I don't know how to do that (or if it's even possible).
      If you ask me, 5 minutes was already too short my brain can already recognize sound patterns from hearing it this many times

      Originally posted by concrete_buffalo View Post
      - Ocean sounds moved from their original file location (Content/ShipsAndExamples/Audio) to Content/Audio - recommend moving cannon firing SFX into Content/Audio/ and allocating to SFX Audio Class, unless you plan on a strictly modular design
      I wanted to have all the "extras" such as ships, meshes, particles, sfx etc. into one separate folder in order to make the plugin more "clean" and easy to add to other projects, also more modular.

      Eventually there will probably be 4 main content folders, Ocean, Sky, Underwater, Extras etc. so you can easily copy/paste only the stuff your project needs.

      I'm not a huge fan in having Audio, Materials, Meshes, Blueprints (etc.) as main content folders because it doesn't always make sense.
      Cannon sfx should be at the relevant Cannon folder, right next to the cannon meshes and cannon materials for example (which means you then simply copy paste the cannons folder instead of files spread all over the place).

      But I suppose that's a personal preference I don't know, it feels much more organized and modular to me that way!

      Originally posted by concrete_buffalo View Post
      I am more interested in determining how to allocate correct wave SFX to rendered waves. I believe that it should be possible to convert the data that informs the way the wave crosses over the dynamic material into an output that can be used to trigger audio assets and effect audio volume/attributes.

      Example (assuming there’s a parameter for wave height, which I don’t think there is):
      I have already added a way to get the wave height at a specific point with blueprints, check the level blueprint which uses this method to toggle the underwater effects on/off.

      For example..
      You could make a bunch of test points that are following and spread around the player (or camera), and then you could play a sound depending on the wave height at each point.
      Also you could read some of the variables from the ocean manager (wave amplitude etc.) to determine if the ocean is generally calm or rough.

      I don't think any game has ever used something like that it would be cool to see what can be done with this method.

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


      Originally posted by Tin Le View Post
      My improved version of the TK-Master's branch:

      Hey Tin Le welcome to the forums as well

      Looks pretty cool! great job with the underwater post process and splashes
      Last edited by TK-Master; 05-10-2015, 12:58 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


        Hey TK-Master, thanks for replying

        Thanks for letting me wade in (pun intended) - it seems like a good project. I've literally just opened the blueprint for the ocean material, and I see captioned threads and areas for (what I hope will be) the parts I think I'll need I'm very new to UE4 so this is going to be a challenge, but I'm keen to do this. I don't think it's been done before either

        I'm kinda with you on compression and length, though it depends on the context. People aren't likely to be standing around listening to the ambient sounds, they're going to be background to other sound effects and visual action. Exploration games arguably have a greater need for longer sound files, but tbh if you have two or three 1 min loops and then sprinkle them with a bank of randomised sounds á la Skyrim's setup, it'll be difficult to tell unless you're actually listening out for repeats. It is personal though; in all my designs I like to have a sort of backdrop on which to layer the other sounds to create depth, which I know isn't for everyone lol No harm in having a long version and a short version in the same project though I guess!

        Yeah, your file structure makes more sense If I want to move a ship I can move the ship's folder - that's much easier! I'm still learning

        Originally posted by TK-Master View Post
        You could make a bunch of test points that are following and spread around the player (or camera), and then you could play a sound depending on the wave height at each point.
        Also you could read some of the variables from the ocean manager (wave amplitude etc.) to determine if the ocean is generally calm or rough.
        I'm not sure how to do this, but don't tell me (haha) I'd like to try to figure it out I have a vague idea, but as I'm still getting to grips with blueprints I'm not yet familiar with what nodes go where, do what, and are the best to select. I will get there, or come for help if I get stuck.

        Thanks to you and your team for opening the project up like this - I've not done proper modding since UDK and System Shock 2. It's nice to get back into it
        LinkedIn | Insta | YouTube | SoundCloud | valkyrie-sound.com | Sound Design, Composition, Production
        Check it out!

        Comment


          Originally posted by concrete_buffalo View Post
          I've literally just opened the blueprint for the ocean material, and I see captioned threads and areas for (what I hope will be) the parts I think I'll need
          The material? I don't think you will find something useful in the material.

          To get you started, this is how you can read the wave height at a specific point in world space.

          Click image for larger version

Name:	WaveHeight.jpg
Views:	1
Size:	86.1 KB
ID:	1076085

          You can use this in the character blueprint and run all the logic from there but it would probably be a good idea to make a separate OceanSoundManager blueprint to handle all that (for modularity purposes ).

          Have fun

          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


            Hullo folks! Awesome work on this project so far. I started with Handkors tutorials, so I'm using the project more as a "how did they do this" sort of thing and working from there... Trying to keep everything blueprint.

            But I noticed in TKs Dev Ocean Project your boats seem to have a similar problem to mine, in that when you're aboard them you can push them around from on deck. Which is a lot like pulling yourself up by your own bootstraps... I've been trying to find a way around this, and to prevent the player (or physics objects) from sliding around unrealistically in general (which is inconsistently a problem). But so far no dice. Was curious if you guys could offer any advice or anything.

            This is the sort of thing I'm having issues with: http://b-o-n-e-h-e-a-d.tumblr.com/po...operly-now-the
            Toward the end of the video.

            Thanks again for the work you guys have done, it's been a lot of fun to follow/stumble around with.

            Comment


              But I noticed in TKs Dev Ocean Project your boats seem to have a similar problem to mine, in that when you're aboard them you can push them around from on deck.
              Yeah.. even if I disable "Enable Physics Interaction" in the CharacterMovement component I can kinda still push the small ship around if I walk at the right spot (could be a bug).

              Unfortunately the CharacterMovement is not great for every game.. the only solution I can see right now is to code a custom CharacterMovement component.

              But the problem in my branch is not as obvious as in your video maybe try to increase the ship mass?

              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 think I have found a solution for the edge foam. Will update soon.

                Comment


                  Originally posted by TK-Master View Post
                  But the problem in my branch is not as obvious as in your video maybe try to increase the ship mass?
                  I did, and it doesn't really seem to make a difference in direct collisions. The problem is much more noticeable if you push against the ships movement. Get the boat going and while it's moving forward run into the front of the cabin it'll tank. Maybe my ship just has more opportunities to collide with the player...

                  What I was thinking might work is encasing the entire walkable surface in a trigger that when overlapped attaches the player to the boat (to combat the sliding I get occasionally - which is another thing that worries me: it needs to work consistently gameplay-wise). But the triggers movement seems to cause it to toggle on and off endlessly, and if I work around this I end up getting double transforms on the player instead.

                  Would be nice to find a work around somehow. Didn't plan on making a new character controller. I'll post if I figure anything out.

                  Comment


                    You can try attaching the player to the boat but that will probably not change anything (but you can try?)

                    What we need (I think) is an accurate way to tell the movement component "hey!! you are colliding with an immovable object at this angle.. stop trying to add velocity to the player!" but that's easier said than done

                    That functionality already exists in the CharacterMovement as far as I can tell but it's obviously not perfect (more like, it wasn't designed with ships in mind )
                    Last edited by TK-Master; 05-12-2015, 11:25 AM.

                    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
                      The material? I don't think you will find something useful in the material.
                      Haha I meant BP_ocean

                      I appreciate the starting point you gave, but there elements to it that I don't understand (). Rather than PM'ing you I thought I'd message on here, in case I'm not the only one looking at this...

                      Click image for larger version

Name:	WaveHeight.jpg
Views:	1
Size:	86.1 KB
ID:	1076085

                      Please tell me if I'm reading your starting point correctly:

                      1&2. Identifies BP_ocean and instructs UE4 that whatever we do applies to all BP_ocean instances; 3. checking if the object BP_ocean can be used; 4. casting the object BP_ocean to the Ocean Manager (is that right? if so, I'm assuming this is because Ocean Manager and BP_ocean are separate entities); 5. pull/get data about wave height from Ocean Manager at a specified point; 6. return the wave height value as a z coordinate.

                      Or, sort of in reverse: at the player's location, extract the z value for BP_ocean being operated by Ocean Manager.

                      I am specifying the player point by using Get Player Character --> Get Actor Location.

                      My thinking is that the next step(s) should be:

                      If z coord is < x then Play Sound #1.
                      If z coord is > x then Play Sound #2.
                      If z coord is > x+y then Play Sound #3...

                      At the moment, I'm trying to set this up to produce a text string value, just for testing, but it consistently returns 0.0 as the value during Play :/ Obviously, my logic or execution is wrong somewhere

                      However (lol) I have an additional question (because I'm like that ). Is the Get Wave Height Value function referring to the Amplitude parameter in the Ocean Manager's Global Wave Settings? Or is it referring to the z value, that I can see bobbing up and down in wireframe mode?

                      I can see possibilities for engaging the entire weather system based on wave amplitude, steepness, and wave speed. Modular users select 'Calm' or 'Tempest' and get consistent dynamic results for ocean behaviour, weather type, lighting, fog, wind, and sound. Not sure if this is planned or already a part of your concept (I haven't read all your posts, eep )
                      Last edited by Valkyrie_Sound; 05-13-2015, 10:02 AM.
                      LinkedIn | Insta | YouTube | SoundCloud | valkyrie-sound.com | Sound Design, Composition, Production
                      Check it out!

                      Comment


                        Originally posted by concrete_buffalo View Post
                        1&2. Identifies BP_ocean and instructs UE4 that whatever we do applies to all BP_ocean instances; 3. checking if the object BP_ocean can be used; 4. casting the object BP_ocean to the Ocean Manager (is that right? if so, I'm assuming this is because Ocean Manager and BP_ocean are separate entities); 5. pull/get data about wave height from Ocean Manager at a specified point; 6. return the wave height value as a z coordinate.
                        GetAllActorsOfClass returns an array with all the actors (of the specified class) that currently exists in the level.
                        Since there should only be one BP_Ocean in the level, we use the Get(0) node which returns the first element of that array. Then we have to check if it's actually valid just in case there is actually no BP_Ocean in the level (you will get an accessed null error otherwise)

                        We have to cast it to BP_Ocean type because the array that GetAllActorsOfClass returns is the base "Actor" class (which means we can't access any of the specific parameters or functions that the OceanManager class has).
                        Then we call the GetWaveHeightValue function which does some math to determine what is the Z height of the wave at that world location (you can use DrawDebugSphere node to visualize the returned value).

                        Originally posted by concrete_buffalo View Post
                        At the moment, I'm trying to set this up to produce a text string value, just for testing, but it consistently returns 0.0 as the value during Play :/ Obviously, my logic or execution is wrong somewhere
                        The Z of the GetWaveHeightValue returns 0? that's weird.. try to determine which part doesn't work (for example does the GetActorLocation return the proper player coordinates?)
                        I'm assuming you already know you have to plug some event (like the tick event, or a button event) to execute the nodes

                        Originally posted by concrete_buffalo View Post
                        However (lol) I have an additional question (because I'm like that ). Is the Get Wave Height Value function referring to the Amplitude parameter in the Ocean Manager's Global Wave Settings? Or is it referring to the z value, that I can see bobbing up and down in wireframe mode?
                        It's referring to the Z value of the ocean plane that you can see bobbing up and down but the intensity of the waves are based on the Amplitude parameter so if the Amplitude is zero (calm ocean) it will return just the base height of the ocean.
                        Last edited by TK-Master; 05-13-2015, 10:40 AM.

                        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 Revaravus View Post
                          when you're aboard them you can push them around from on deck. Which is a lot like pulling yourself up by your own bootstraps...
                          I had a similar issue using VAOcean and I messed with pretty much everything in-engine I could find but the issue persisted. Just walking into a particular spot could launch the boat.

                          My solution of sorts was disabling the pawn's collision with the boat itself and creating an invisible pawn colliding static plane that continuously moved it's position to follow the boat's last updated position. Not perfect but it worked, from there you could work further with it, maybe have a static non-rendered version of the boat as a pawn collision 'ghost' following the boat. Sadly this disables the pawn's direct interaction with the boat mesh but it's something.

                          Sorry if this doesn't help, it was done under VAOcean's buoyancy system which might work differently, but the way you described it it seemed like the same issue.
                          Currently developing a sailing-age custom ship dueling game!

                          Comment


                            That might work. I don't need the player to interact with the boat directly anyway. I'll give it a whirl and see what happens.
                            Edit: Worked absolutely perfectly. Minor minor clipping issue, but that's easily fixed by moving the collision ghost forward a few centimeters. Thanks a ton.
                            Last edited by Revaravus; 05-13-2015, 11:33 PM.

                            Comment


                              Hello !

                              Great plugin with cool effect and usability, congratulation to all.

                              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 ?

                              Here is a screen of my pb :

                              Click image for larger version

Name:	buyancy.jpg
Views:	1
Size:	367.5 KB
ID:	1076357

                              Thanks !

                              Comment


                                Originally posted by Tin Le View Post
                                My improved version of the TK-Master's branch:


                                Hey Tin,

                                These post process materials are awesome. Will you be sharing them for the OceanProject?

                                Comment

                                Working...
                                X