Aproaches to Physical Water with Wave Collision

Hey folks,
I’m working on adding water to my game which can be walked/surfed on by the player, as seen in games like Wave Race 64, Solar Ash or Wavetale. Of course a flat body of water is very simple to just add a box collider to, the difficulty is creating waves which have appropriate collision rather than being a purely visual effect.

Currently my best solution is to create a skeletal mesh with a bunch of bones animating a plane. This works ok but it’s quite a lot of work to manually animate the waves in a natural looking way, and could require a lot of different meshes to suit various level design needs.

So I wonder, does anyone have a better idea? I’ve seen people use buoyancy with the water plugin but I can’t seem to get it working and I wonder how well it would interact with my character controller anyway. Since buoyant objects can react with waves I wonder if I could somehow use that wave data to create solid collision instead?

Failing that, is there an easier way I can apply a sine wave to a mesh instead of manually animating it with a skeleton? That seems to be what they did in Wave Race.

I’d love to hear any other ideas people may have.

I’m glad you ask because you obviously have 0 clue and did 0 research.

No, you won’t be able to do it with a skeletal mesh. I mean, you are welcome to try, but the game will probably run sub 10fps just due to the compute complexity…
Plus, lighitng on a skeletal mesh is already problematic on it’s own, and lighting water shaders right is already a handful, so if you combine the 2 you will live in hell for a month with next to nothing to show for as a result.
But hey, to each their own.

Meanwhile, in the real world water is purely visual. Always.

The way you make it seem as if there are some sort of physics (which we uncolloquially call Buoyancy) is by using a pysics manager.

The manager is in charge of returning height value which match the wave math you use visually based on the X,Y position and time you query for.

You then use the returned value however you see fit. Be it to set the object’s position, or maybe to apply some physics values based on some other calculations.

Now, with that, buoyancy solvers are complex, but the math for how it works is described in a lot of books. With just a little research, you can come up with your own system that applies lift to an object based on its density or surface area, or whatever you find you want to do.

For most game purposes, you simply use the returned Z value as is.
In some games, they go to more extremes, probably for no reason considering I have yet to see anything published where the water actually feels realistic…

Ps:
Someone will likely butt in and suggest epic already provides a water thing. Like anything epic makes, engine included, I’d suggest staying as far away as you would from a plage rat…

No its no good, yes as always its filled with about 1001 useless thing that increase computation costs. And i think it also requires you use the landscape, which is another nonstarter to anyone serious about making games…

Thanks for your input. Hope you feel better soon.

isnt there a proper method of how all this is done. i mean all i hear is, use math, or, edit this, edit that, how do i actually edit the landscape material itself, outside of the material itself, like the mesh itself, to adapt itself to the materials looks, like, do i go inside the engine and fine that exact material or something, some kind of a tutorial will be nice