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:
Create a new WaveWorks asset and configure
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.
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.
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