Water

Any good water example?

There’s:
Water from my Koparka editor:
-normal map scrolling opposite ways for distortion
-foam around islands
-directional light highlights
-a bit of waving with a sin function (vertex displacement)
-planar reflections
-sort of fresnel effect

Water from Yarr:
-scrolling normal map for distortion
-planar reflections

-Water from Ogre3D:
-complex vertex displacement
-reflections from a cubemap
-different deep and shallow water colors
-all sorts of advanced stuff :mrgreen:

youtube.com/watch?feature=pl … 4grY#t=138
BGE. I thought about porting, but still have no time, may be someone else will do this :wink:

Any water without shaders?

Only if there’s no wind. :slight_smile: It’s easy to get a smooth reflective surface without a shader, but you’ll probably need a shader to get good ripple effects.

It’s hard to do anything without shaders.
You can make a plane with waves animated by some 100 bones or morphs (blend shapes).
You can have reflections using texture projection.
Some specular highlights and caustics can be faked with a animated texture.
Refraction/distortion… well you need shaders for that.

The thing is, all of this is slow, so if you are aiming for hardware that can’t run shaders, then that hardware won’t have the power to run a water symulation.

Don’t expect anything else then a plane reflecting the sky (and some select objects) using the fixed function pipeline.

If you don’t want to use shaders because they are hard/strange/evil/magic, then I think I can make script that will make it simple, and all you’d have to do is call makeWater(level=0.0, wave_length=5, wave_height=0.3, noise=2.5, alpha=0.5, distortion=0.1) or something like it.

One thing that might slightly alleviate the flatness of shaderless water might be one or more blended, scrolling “wave” or “caustics” textures, animated via “NodePath.setTexOffset”. The result will still be very flat, but might at least improve the effect a little. Use of multiple texture stages with appropriate settings might help even more–although I don’t know that this feature doesn’t use shaders behind the scenes.

Currently I am using the water from the nature demo. I like the idea of a script where I can call make Water!