Realtime Dynamic Deep Ocean Waves

Hi

Is it possible to use an animated heightmap texture (e.g. avi) for the terrain object? If so then it could be used for creating animated oceans.

Thoughts?

Cheers
Geoff

Yes, it is possible to change the terrain-heightnap at runtime. But i would strongly recommend using a custom mesh with some script magic on it. This will leave you the freedom of using all types of shaders on the ocean-mesh. That can not be done with terrain at the moment or only with great affort and workarounds and no guarantee that it will work with future versions.

The mesh can be accessed via java script and its quite speedy. There are example projects on the unity website wich might serve your needs with just a little tweakin. You can find them here:

Frank

Of course, at that point, you may as well work with an animated mesh which would give you more control (allowing, say, waves cresting) and would probably be smaller in size.

In my experience altering the heightmap in runtime is very slow; I tried to animate the terrain for some cool effects but it’s just too slow :frowning:

Thanks guys

The sinus example is probably in the right direction.

Here is the effect ive done in Max, I need to reproduce this same effect in Unity. I use 4 animated caustic maps to create the wave and swell.

http://www.geoffcoope.co.uk/resources/Geoff_sea.mov

Cheers
Geoff

There was another thread a while back and the poster indicated that he already had something in progress. I think the title was something like “deep ocean waves” or such. If I had the time I’d love to investigate this also as it’s one of the few things that Quest3D and DX Studio do better than Unity at present. If someone sorts this out and is interested in licensing it, please let me know.

I have read the paper on Deep Ocean Waves.

Its based on FFT and can be found here:

Here is a real ocean shot for reference


Cheers
Geoff

Additional Reference…

This is a Youtube video of realtime ocean waves created by Eric Boissard

He also uses FTT for the wave generation.