Hello. Lately decided to try and have a knack at deforming meshes to simulate waves in Roblox because why not? This little project started with Perlin noise waves, however, Gerstner Waves caught my eye and well I couldn’t resist the challenge there.
After 4-5 days of work the project currently features:
Boats floating on the water and rock with the waves.
Waves look the same for players in a single server.
Boats are controlled by players, they spawn when a player joins or resets and de-spawn when the player leaves or resets.
Gerstner waves have 3 different waves that are combined - this took a while to make it work properly.
Heights, directions and lengths of the waves can be easily changed - currently they aren’t randomized but future versions will.
The water mesh moves to the players position along the X,Y axis after the player moves a certain amount of studs away from a defined location that also gets reset when this process happens.
Waves are more calm near the current and only island, this will be updated to handle multiple islands with varying sizes.
Hello! I have to say this is amazing, I love the art style and functionality of the waves. However, I do have one question. How did you manage to make the waves near the island(s) to be smaller, while farther out in the ocean it becomes more rocky and violent. Any help would be appreciated, I have been working on my own system for awhile but can’t seem to figure this out!
When I update the waves I get the distance from the closest island and the bone that’s getting updated, this acts as an extra modifier for how steep the waves are
This is super cool! The motion looks incredibly convincing. Definitely a lot better than Roblox’s default water, which has waves that don’t do anything.
This is really cool! I’m currently trying to do a similar kind of thing for hover vehicles. I have 4 points for each of the 4 corners and I want the hovercraft to rotate so that each of the 4 corners of the hovercraft match the 4 points. How would I calculate this?
The current method I use to make my boats float is adding an upwards force to a point, the scale of the force mainly depending on how far under the water that point is. So really I just let the built in physics to rotate it for me.
I think you may have misunderstood what I tried to say, the points on my boat are actual instances under the boat (so they will rotate with the boat), I apply an impulse at each position of these instances depending on how far under the water that position, this lets the built in physics do the whole rotating for me.
Ahh! I see what you mean. So rather than basing the position of the boat off of the points, the boat is actually as if it where, tied to those points physically?