Advertisement

Ocean surf representation

Started by July 16, 1999 11:52 AM
0 comments, last by BigBird 25 years, 5 months ago
OK, this is the problem.
I need to display a nice looking animation of some ocean waves (surf) in 3D. It would be preferable if the camera could zoom in and out and circle around the surf break.
I was thinking of using Direct3D for the rendering because it makes things simple and fast.
The tricky bit is how to store a wave in memory.

I have devised two possible methods:
1) A huge particle system (ideally with H2O molecule size particles). This is slow and takes shitloads of memory but is realitively simple I guess (maybe a large linked list?).

2) Acutally applying wave theorm and physics laws and differential equations to calculate the shape of the 3D surface plane. This is slow but requires little memory, but gives me a migraine even contemplating it.

Can you fellas think of some other way to achieve this?

Actually I saw a special once on the physics of waves (or maybe it was an article in Discovery magazine back when it was a decent magazine, unsure...) It could get a little nasty.
Basically surf "breaks" because the bottom of the wave starts dragging on the ocean floor, which makes it top-heavy. Note that the "bottom" of the wave is a lot deeper than the trough. When the friction becomes great enough, it unbalances and circular currents that occur in waves in pseudo-cylinders perpendicular to the direction of travel cause it to curl. Other than that all you would need is a normal oscillating sine wave to draw your ocean before the breaker point. There is probably a paper somewhere on the math involved as I've seen a few models of it, you might want to see if it's posted somewhere.
As for camera angles, if you can get the wave math to work, moving a camera around should be a breeze.

g'luck, you'll need it *smile*
-fel

~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~

This topic is closed to new replies.

Advertisement