I wanted to create some realistic water waves and this is what I produced. The place lets you play with it. This was a challenge to get running fast so it took quite a bit of optimisation. There’s also some fancy physics that occur in the place such as waves pushing you (done via code) and wave noises based on their relative position to you. For anyone interested, this involves using the wave equation (and extra methods to make it work on a computer).
This is dynamic and not something animated via keyframes. For e.g. you can collide several waves with eachother to cancel them out.
For reference, a simple explanation of how it works (without talking about how I got the wedges to triangulate the surface), imagine a grid of 70 x 70 points. Imagine each point is connected in a lattice-like structure to each adjacent point by a spring constraint (and a prismatic constraint so that they can only slide up/down). Whilst this doesn’t actually use spring constraints, it works fairly similar. The points hold themselves together with these “springs” and will exhibit wave-like motion when pulled up or down.
E.g. this uses no code and produces the same effect with only constraints.
it looks cool… Hey, I think it is a good thing to post a reply about your creation.
here the link:
So… if you interested go ahead I love some cool thing about the people that were doing in the studio and also pretty cool water
but then i found some issue with your water wave simulation…
here the picture of it:
it happen when you low everything on the manual of the “water wave simulation” to 0 it will cost the water look like spike!!!
So i hope you fix this soon…
that all for now and I will see you in the next reply…
I left that in there intentionally to let users create really tall waves if they wanted. Speeds slightly above avoid that bug. If you want waves on the minimum speed, you need to make sure all the fast moving waves are flattened out (increasing viscosity), then slow down everything to 0.01, then finally, add in your waves on that speed by clicking them in.
So I decided to make a demonstration of my custom water using only constraints. This uses no code whatsoever. Thought this was really cool.
The idea is that you can model the surface of a material as joined up by several molecules in a lattice like structure. Each molecule wants to stay near other molecules and so will pull eachother together if stretched apart. A good model of this is to connect them up with springs.
Anywho, the idea is that the wave equation simplifies having hundreds of springs into a single equation. I then apply my own physics solver via code.
Lastly, for optimization, I “squeeze” a 70x70 grid into a 23x23 grid = 529 grid cells = 529*(4 wedges per grid cell) = 2116 wedges.
Hi there, seems like you’ve made this simulation open-sourced at one point. Is it possible if it gets open-sourced once again? (the old non-skinned version is fine for me), I’m just interested to read through your physics and code to learn deeper about the wave equations. I’m aware of the Gerstner (trochoidal) waves which others commonly use, but it just doesn’t really give me the effect that I’m really looking for.