Tasty Water (mmm) / by Elliot Gray

Put together a rather neat unified water system in ue4 because basically I’m jealous of cry-engine developers haha. I’ve been replaying the Crysis series, a flawed masterpiece of a trilogy with graphics that still hold up 5 to 12 year later! Crysis 3 introduced some truly impressive interactive water surfaces with what appeared to be very accurate simulation. Going back however, I realized how fake the caustic lighting really is which inspired me to have a stab at it myself. I love pretty games.

Features include:

  • Infinite, automatically interactive, water plane

  • Totally not fake caustics sim (reflections + refraction) -

  • Water ripples affect plant 'physics'

  • Easy to use, almost no programmer intervention required (soon to be none)

Currently the system works well and looks really good but before it’s ‘game-ready’ I need to add/finish a few more features:

  • Support for water mesh LOD’s so the shader complexity can be lowered at distance automatically

  • Support for multiple separate fluid surface per level.

    • Currently while there’s nothing stopping you adding more than one mesh to the level, I’ll need to add a bit of logic and shader support so that meshes take caustic data from the water body they’re nearest to.

  • Move logic from blueprint to C++

    • Obscenely cpu intensive for a graphical feature otherwise

  • Automatic lighting condition support

    • Currently because the caustics are just faked based on height data of the surface ripples, if the scene lighting gets changed significantly the caustics will be over/underbright. At it’s simplest I’ll be able to read lighting intensity from a param collection but I’m also thinking about other options such as reading from the skylight or even reflection capture cube maps

  • 100% drag and drop setup

    • I’d love for this system to be able to be integrated seamlessly into any project with zero implementation work. Drag, drop, scale, and done. That’s the goal and I don’t expect there to be much trouble getting there from where I am now.

So definitely a lot of work ahead but hopefully I’ll be posting back here soon with a finished product. Thinking I might pop it up on the UE marketplace so if that’s something anyone’s in give me shout!