2D/3D Water with Orthographic camera

Hi,

I hope someone can help.

I’ve been struggling to come up with a way to display water with waves. Basically my view is from the side, and I’d like the water to look as if it’s against the camera. Think mario/sonic style water and you hopefully get the idea.

At the moment, my view uses a physics volume to manage the buoyancy, and a post-processing volume to adjust the colour when you go below the water line. That, I think, is a tad too realistic for my graphic style, which is block-based. I’d like it to be alot more basic - so with waves on the top (simple - nothing complex), and probably use some particle effects for when you break the water line.

I’ve found loads of articles for other engines. For example, Unity there’s the suggestion of using Line Renderer’s to render a series of points and then animate those points to simulate the wave. Other articles mention springs. Another dev for a game titled ‘unravelled’ mentions Hookes law and the use of a procedural mesh - which was within Unreal - but it looks a bit too complex (perhaps?) and doesn’t mention how they achieved it unfortunately.

Any steer would be really helpful. I’m still new to Unreal - I’ve moved from Unity - and my game is not far off from completion - this was my last major hurdle and I’ve left it til last!

Thanks in advance,

So I’ve started experimenting, and so far the only thing I can think to use would be a spline mesh using a simple plane mesh facing the camera with a certain number of points, and then move those points perhaps using timelines to achieve animated oscillation to create the waves.

This is all in BP as I’m a C# coder by trade and don’t feel comfortable enough in c++ to do this yet.

Any pointers on what to do? Ultimately this is a mobile game too so would be interested in any performance considerations I need to bear in mind as well.

Thanks in advance,

if you camera is just moving side to side like most 2d platformers then maybe you could use something like a partial box mesh and just mask the top for the waves.
http://www.criticalfailure-studio.com/creating-the-water-part-2-the-reckoning/

Wow that’s a brilliant example - thanks alot for this - it’s really helpful!

Easy when you know how I guess!

Thanks again - I’ll post what I did here when done, if it goes well of course :slight_smile: