Announcement

Collapse
No announcement yet.

WaveWorks Infinite Ocean Planes

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

  • WaveWorks Infinite Ocean Planes

    I figured I would post this here as well. I have implemented the integration that allows for using the WaveWorks Quadtree generator to create infinite oceans. This is still very much a Work in Progress, it can still be a little crash happy when trying to set it up, but after that it runs quite fine. Could still be optimized some more. There are a few caveats to using it:

    - Does not work with Static Lighting, causes discoloration and other artifacts, so make sure to turn off precomputed lighting in the World Settings, and run a Light Build at least once.

    - Shadows casted onto the water surface look very abnormal in the editor, but appear fine in game.

    - Only works with opaque materials at the moment, dont even know what will happen with a translucent material.

    - Only flat tessellation, trying to use PN Triangles will result in incorrect behavior

    - Only supported on SM5 at the moment.

    Take a look at the sample project provided on how to set it up, but basically you:

    1. Create a new WaveWorks asset and configure

    2. Create a new material, use the WaveWorks node to set the Normals and Displacement (Only Flat Tessellation is supported - But it does not really use flat tessellation either, it has its own tessellation and crack fixing code). Dont feed anything in Tessellation Multiplier, it has its own calculation for that.

    3. Create a new Blueprint Actor and add a WaveWorksComponent, then assign the material from above, this should then create the quad tree. <-- This is where it can crash. If it does, just restart and try again.

    4. Drop the actor into the scene, doesn't matter where, it is infinite in all directions, to adjust the height, adjust the Sea Level variable in the WaveWorksComponent.



    Next on the plans are:

    - Implement Alloc/Free patch for controlling which patches are visible, good for hiding water that is permanently covered by terrain.
    - Implement a single patch feature so you can have small areas of water, would be just a configurable plane.
    - Bouyancy and displacement readback
    - OGL and DX10 support (Using geo-morphing instead of tessellation for DX10)

    If anyone has any features they would like to see, let me know.

    I would like to give a big thanks and a shout out here aswell to Temaran for his work on the RenderDoc plugin for UE4, this saved me some hassles on figuring out some unknown variables needed for the integration. If your doing shader development of any kind, you should go grab it here: https://wiki.unrealengine.com/RenderDoc_plugin
    NVIDIA GameWorks merged branch (v4.9.2) (v4.12.5) (v4.13 p2)
    Feel free to Donate if you wish to support me

  • #2
    Gorgeous! Awesome work GalaxyMan!
    Storyteller - An immersive VR audiobook player

    Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

    Comment


    • #3
      Thanks! How do you create the wavework component? I don't have it in the BP editor.

      Comment


      • #4
        Originally posted by GalaxyMan2015 View Post
        Next on the plans are:
        ..
        - Bouyancy and displacement readback
        I have been trying to read the displacement for ages, I will definitely be keeping an eye out for that!
        Then I could adapt the community ocean project's shader to work with WaveWorks, should be interesting

        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


        • #5
          That's awesome!!

          Originally posted by vinz243 View Post
          Thanks! How do you create the wavework component? I don't have it in the BP editor.
          I think he uses the gameworks plugin from nvidia

          Comment


          • #6
            There's a GameWork plugin now? I used 4.9 engine modified to include nvidia gamework stuff (waveworks+flex+hbao++vxgi)/

            Comment


            • #7
              Originally posted by vinz243 View Post
              There's a GameWork plugin now? I used 4.9 engine modified to include nvidia gamework stuff (waveworks+flex+hbao++vxgi)/
              No, there is no plugin (as far as I know), I meant the modified engine

              Comment


              • #8
                Originally posted by vinz243 View Post
                There's a GameWork plugin now? I used 4.9 engine modified to include nvidia gamework stuff (waveworks+flex+hbao++vxgi)/
                You need my latest changes, i only committed the code last night, once u have that, u should see a Wave Works component in the list of Components in a Blueprint Actor
                NVIDIA GameWorks merged branch (v4.9.2) (v4.12.5) (v4.13 p2)
                Feel free to Donate if you wish to support me

                Comment


                • #9
                  SM4 support for WaveWorks has been committed, also fixed a bug with Turbulence that allows for SM4 packaging. This does not mean all the GameWorks techs work in SM4, only WaveWorks does, but you can package the entire project for SM4 just make sure to disable the other techs ingame somehow.

                  It will use geomorphing instead of tessellation, so you need to update your material and have it pass the WaveWorks Displacement pin to the World Position Offset output instead of displacement. Refer to the sample project, where I use a FeatureLevelSwitch to swap which output is used based on feature level.

                  OGL support is going to be a long while away, a bunch of other shaders for the other GameWorks techs need to be modified to at least be compilable in GLSL
                  NVIDIA GameWorks merged branch (v4.9.2) (v4.12.5) (v4.13 p2)
                  Feel free to Donate if you wish to support me

                  Comment


                  • #10
                    Originally posted by GalaxyMan2015 View Post
                    You need my latest changes, i only committed the code last night, once u have that, u should see a Wave Works component in the list of Components in a Blueprint Actor

                    Thanks! I'll try to see if your changes can be merged in our modified engine!

                    Is it possible to make wind blows to a point rather than a direction (so if you're making an island for example)?

                    Comment


                    • #11
                      Originally posted by vinz243 View Post
                      Is it possible to make wind blows to a point rather than a direction (so if you're making an island for example)?
                      Not that I am aware of, WaveWorks only takes a direction.
                      NVIDIA GameWorks merged branch (v4.9.2) (v4.12.5) (v4.13 p2)
                      Feel free to Donate if you wish to support me

                      Comment


                      • #12
                        A pity. And what about collison with landscape?

                        Comment


                        • #13
                          Originally posted by vinz243 View Post
                          A pity. And what about collison with landscape?
                          WaveWorks purely is a visual thing, it provides no collision data. Even for buoyancy, all I get is the current displacement values so I can implement some kind of buoyancy myself. So you'll have to handle any kind of interaction with the environment.
                          NVIDIA GameWorks merged branch (v4.9.2) (v4.12.5) (v4.13 p2)
                          Feel free to Donate if you wish to support me

                          Comment


                          • #14
                            Well I got displacement readback going, and implemented a quick and dirty buoyancy test, turns out, haven't got a clue on how to setup actual buoyancy, so will leave that for others to implement if they feel like it.

                            To read back samples, there is a new function on the WaveWorks Component - SampleDisplacements. Feed it in a list of sample points in World Position as a Vector2D, and it will return a Vector4 containing the displacement for that point.

                            Code will be committed shortly.

                            NVIDIA GameWorks merged branch (v4.9.2) (v4.12.5) (v4.13 p2)
                            Feel free to Donate if you wish to support me

                            Comment


                            • #15
                              Awesome work dude!

                              Comment

                              Working...
                              X