New Ocean Material in Action

Finally got some reasonable quality waves with displacement animation. The shoreline animates with world offset.Unreal Engine 4 Ocean Waves - YouTube

when will it be available? :smiley:

I believe sometime early 2017. Production dates are a bit hard to pin down exactly due to the changes in staff. Right now things are moving ahead at the most rapid I’ve ever seen. We’ve got some great animations, crafting, UI, and even combat all functional.

Out of curiosity could you explain a little on the process for making water like that? Are you using hand made masks to define where the waves are appearing and disappearing and then just panning a displacement texture and water textures over the surface? Any help there would be great as I’ve been trying to achieve the effect for some time now.

Vertex Colors drive where the displacement waves are. Vertex colors just get plugged into LERP nodes (you could also use an IF node with Vertex colors if you want). Depth Fade drives the colors, the alpha, and the foam locations. Vertex Colors are one of the most powerful material nodes in Unreal 4 for water. You can paint the vertex colors in Max or Maya and/or paint them inside Unreal 4. In my case, I do not want to have the entire high rez 8129x8129 multi-million polygon terrain in Max/Maya so I do a 2nd pass of Vertex Color paint in Unreal 4 to determine where waves go. I also use Depth Fade nodes to transition out foam and opacity at the points of intersection with geometry. Since there are 4 Vertex Colors (red, green, blue, alpha) you can basically have 4 different “zones” for your water. What I like to do is have UV mapping that wraps around the contours of the beaches and extends out about 1000 feet into the water which keeps the waves running parallel to the beach all around the island. Then the geometry outside of that zone I actually set to use a 2nd UV channel and use Vertex colors to transition between the two zones with a nice soft fade so there’s no texture stretching and no seams. To create this geometry, I tend to go into Unreal 4 with a rectangular mesh and a spline actor to trace along the beach the entirety of where you want water to be. Then export the terrain at it’s lowest LOD setting, bring it into Maya/Max, delete out main terrain part and you’re left with the spline actor geometry which has perfect UV’s relative to beach and can be extruded from there. After experimenting a bit, I would suggest not using Depth Fade with normal maps - you might get some weird issues underwater if you do so. There’s not much else fancy going on, just panners and some custom textures. Getting the right shape for the waves should take some trial and error and I do suggest using 2 sets of panning waves at slight rotation offset to one another otherwise everything kinda moves together in a static way that doesn’t really feel dynamic. Hope that helps!