News for hackers. Stuff that matters.
Re:WebGL Water Simulator by chengsun on Saturday January 10, 2015 @07:43PM (#8868576)
Unfortunately the effects that you describe are nontrivial. The method of water simulation that is used here doesn't lend itself to simulating the effects of things like water tension or breaking waves. This is because the water surface is represented as a 2D height-map, representing the displacement from equilibrium (i.e. the z coordinate as a function of x and y). It's clear that it is not possible to represent water clinging to the sphere or dripping off it.

A particle-based system could simulate the effects you describe (by keeping track of the positions of some large number of water "molecules" and exchanging forces between each pair of particles), however the simulation would be far too costly to run in real-time on typical hardware today. It also has its downsides. With a height-map based representation it is trivial to calculate the normal to the surface of the water, which is necessary for the lighting effects, but with a particle system you would need to reconstruct the surface of the water in an additional step each frame, using something like the marching cubes algorithm.

Re:WebGL Water Simulator by iamcreasy on Saturday January 10, 2015 @07:55PM (#8868602)
So the surface of the water is a real time displacement map?
Re:WebGL Water Simulator by zamalek on Monday January 12, 2015 @03:00AM (#8872883)
A real time calculated displacement map would be more appropriate. These simulations typically use real wave-front physics (Navier-Stokes), even if simplified.