2 ms·
> It essentially just moves each vertex toward the average height of its neighbors, which turns out to propagate waves that look like water ripples. If you loo
by Florin_Andrei 13y ago
> It essentially just moves each vertex toward the average height of its neighbors, which turns out to propagate waves that look like water ripples.
If you look at the equations that govern the liquid surface, the assumptions that this model is based on are not that bad. Reality is a bit more complex, but the average-of-neighbors seems like a good start. Pretty simple too, which is always good computationally.
> The reflection and refraction raytracing is all hard-coded for the geometry in the scene, which makes it really easy.
Which reminds me...
Back in the days of 386 CPUs, I did a real-time 3D ray-tracer that drew a few spheres rotating around each other, with a fixed light source, and correct illumination depending on incidence angle at any point on the spheres. All on a 30 MHz 386 CPU, nothing pre-rendered, no assembly code, no GPU, running at high frame rate. Bricks where shat when people saw it.
The reality was that the math was highly optimized for that specific scene. I massaged the equations until I worked out of them all the expensive functions. No sin() or cos(). I think the worst thing I had was a sqrt(), and even that was used sparingly.
> The "ambient occlusion" is done by making parts of the objects darker when they get near each other.
You're basically modelling Le Sage's theory of gravitation, with surface illumination representing "pressure" from the "corpuscles".
http://en.wikipedia.org/wiki/Le_Sage%27s_theory_of_gravitation http://en.wikipedia.org/wiki/Le_Sage%27s_theory_of_gravitati...