Creating Water that works on the iPhone

Given that the iPhone doesn’t support bump mapping and the Unity Water shaders don’t work on iPhone, can anyone offer some suggestions on alternative techniques for creating a realistic water surface for the iPhone in Unity?

A good example of the effect I’m looking for would be the Koi Pond App for the iPhone. The camera will look directly down at the water’s surface, everything below the surface needs to be visible and undistorted.

For the most part, the shimmering at the surface should be sufficient to create the illusion. No need for big waves or heavy sub-surface distortion.

Thanks for any help.

this is a simple texture animation
and that is also the max you can expect.

It has two texture units so you use one texture for the basic water texture and one for the wave / disortion effect which you move.

If that is possible with unity iphone is something someone with more shaderlab experience will have to answer thought

Yeah, like dreamora said, two texture maps one for displaying the ripples the other that contains the height maps of the ripples. There is a simple calculation that generates the ripple effect. You would have to do this at the pixel level, using Read and Set pixel calls. I don’t know if the iPhone is fast enough to allow the effect to run smooth (frames per second).

Here is a good webpage that describes how it works (you would have to adapt the code to work in Unity)…
http://freespace.virgin.net/hugo.elias/graphics/x_water.htm

This is an old version of my ocean model.

Are there any freeware video grabbers for OSX? My Snapz trial ended.

Any way of grabbing video from the iPhone itself?


127634--4775--$waves_image_113.jpeg

Yes, we need some shader expert help here.

ScreenFlow is the best screen-capture tool I’ve ever seen on any platform. I used it yesterday to make a demo movie of an iPhone app. It’s pricey, but there is a free demo, and you can learn to ignore the watermark!

There is no way to grab video from the phone itself, at least not that I know of. There’s doubtless a dozen jailbreak VNC servers you can run and that would probably work well enough.

ReJ: I hereby request AOT compilation to i386 so we can run in the simulator and make demo movies.

Sorry, I have no actual useful input on water rendering.

etoiles did a great job with water in Biplane - Wings of Raccoon. In this thread:
http://forum.unity3d.com/viewtopic.php?t=19243
he says:

Maybe someone could get him to join this thread with more info about it for those of us who aren’t so old or who didn’t learn as many tricks!

I did it my project. Please follow the link for Reflection http://forum.unity3d.com/viewtopic.php?t=19921

But here we are talking about simple Shimmering effect on the water or a tinny wave on the water. As we are not allowed to use refraction in iPhone, then we have to use texture technique. Also bump is not supported in iPhone :(.

You wont be able to achieve actual reflections on a moving surface, but you can use a really low resolution dynamic spheremap to get the shimmering effect on an animated surface.

Thought I would show some progress on my ocean model:

Some more iPhone ocean modeling progress:

That’s really fantastic. Great job!

very very nice indeed - great work.

Congrats, that looks amazing.

Wow, amazing.
-Chris

Does anyone have an opinion on how to implement interactive water surface effects (like those in the Koi Pond app) in Unity?

As I said, it looks amazing, do you mind sharing your method? I know you used some ASM on it, but what’s the technique? Any papers, tutorials, links or your own explanation? I’m really curious to know how to achieve that, it looks pretty realistic.

I’d be interested to know a little more about how you achieved this too - it looks swell (see I made a joke too).

Me too :slight_smile:

The basic technique is called Gerstner Waves.