Live data from Hacker News

Web GL Ocean Simulation

david.li

61–70 of 138 posts

Re: Web GL Ocean Simulation

#61

I remember seeing this run smoothly on a P2 after a very small executable download in late 90's. How far we've come in a big, stupid circle back where we started. Now instead of a small executable, we need a large executable to sit on top of a large API on top of the CPU before even touching the GPU, and a network connection to download all the dependant APIs and libraries every time the page is loaded. The only impr…

I'd venture that the differences these day is that there is no install step and it works on many different systems.

>many different systems.

Sure, for varying values of "works" and "different" and "no install step".

I'm going to go out on a limb here and state that a DOS executable from the 90's will run on more machines in the world than this demo, given "platforms" similarly to what this demo takes as a given.

Re: Web GL Ocean Simulation

#63
This is a really awesome demo. Great work.

I'd love to see it with different ocean floors to be able to see how waves break in different locations based on certain conditions. Someone please make this happen! :D

Re: Web GL Ocean Simulation

#65
post #46
post #38

Earlier quoted context omitted.

His system of equations is not linear so vanilla Ax=b won't work.

It is actually linear. a,b,c,d are the unknowns and x1 and x2 are the inputs. A bit confusing since normally x1,x2 denote the unknowns.

Not if you are doing econometrics/statistics.

Re: Web GL Ocean Simulation

#66
post #46
post #38

Earlier quoted context omitted.

His system of equations is not linear so vanilla Ax=b won't work.

It is actually linear. a,b,c,d are the unknowns and x1 and x2 are the inputs. A bit confusing since normally x1,x2 denote the unknowns.

Unless you like econometrics: then X are data, betas and gammas and sigmas are unknown (oh my!).

Jargon is fun, unless I want to communicate across fields :/.

Re: Web GL Ocean Simulation

#67

This is a really awesome demo. Great work. I'd love to see it with different ocean floors to be able to see how waves break in different locations based on certain conditions. Someone please make this happen! :D

It's heavily based on Jerry Tessendorf's "Simulating Ocean Water" paper, so it only does open water: interaction of water and wind using Phillips' Spectrum.

So it doesn't model the interaction with land in any way.

Re: Web GL Ocean Simulation

#68
post #36

The code is quite cool to look at. Love seeing the extensive use of matrices and mathematics to create such a beautiful and mesmerizing display. If anyone is interested in playing around with it, I threw it up at JSFiddle here: http://jsfiddle.net/zyAzg/ Excellent demo.

I'm not sure how I'd feel about a repost to jsfiddle without my permission if I were the original author. How is this any different than reposting xkcd or other webcomics on alternate hosting without the author's permission?

I'd hardly call him the original author - A. it's based off Jerry Tessendorf's seminal Ocean Wave simulation paper from Siggraph 2001, and B. the code's very similar to Keith Lantz's non FFT version here, just in JS and WebGL shaders instead of C++:

http://www.keithlantz.net/2011/10/ocean-simulation-part-one-...

Re: Web GL Ocean Simulation

#69
post #35

The code is quite cool to look at. Love seeing the extensive use of matrices and mathematics to create such a beautiful and mesmerizing display. If anyone is interested in playing around with it, I threw it up at JSFiddle here: http://jsfiddle.net/zyAzg/ Excellent demo.

Just to clarify - the bulk of the work here is done in GLSL shaders on the GPU, not with matrices in JavaScript. All that matrix code you see in the source here is basically just the minimum prerequisite for doing 3D graphics, it would be the same if you just wanted to get a spinning cube with some camera control. The real magic happens in the shaders which compute water mesh displacement, normals and shading directl…

> ust to clarify - the bulk of the work here is done in GLSL shaders on the GPU, not with matrices in JavaScript.

I noticed that, which I thought was pretty cool. I was playing with it in Chrome on OS X when I realized that it wasn't doing too much to my CPU, even when I cranked the simulation up to max.

Re: Web GL Ocean Simulation

#70
computers have now become so powerful that this stuff is easy. you can implement it in a way which, aside from platform, is really quite naive and wasteful - and still get applause.

most programmers can come up with a much better solution to this problem if removed from google and forbidden access to gpu gems.

this is at least well presented though...

its a shame the code has been posted. whilst i normally assume that demos like this are unlikely to be smart or impressive these days - this time i know for sure. its actually a good deal worse than i ever would have imagined.

i'm still quite torn whether all this horsepower is a good thing or not.... on the one had we get a demo like this without much in the way of understanding or resourcefulness. on the other hand we have hundreds of man hours being wasted at dev studios because clever efficiency is rapidly becoming a thing of the past...

Post reply on HN