Sign in to follow this  

Interaction between water and land (help!)

Recommended Posts

I want to deal with the interaction between water and land(water moving at the coasting). Are there any method have been used, I need some references. Please help me!

Share this post

Link to post
Share on other sites
Well, there are numerous methods..

Far cry used a special water edge mesh for waves at the edges, Crysis uses a depth map add in a layer of foam in the shallow areas. Other games use sprites for wave foam, some dont have anything like Oblivion or Two Worlds.

I've have tried all the methods and currently I think the depth map method is the easiest and most generally robust (although it may not provide perfect results). The idea is to first to have rendered a depth map of the full scene.. most any modern renderer should be doing this any as a depth map is very useful.

Then in the water pass project the depth map using the camera projection and use the depth values to lerp in an animated foam or wave layer...the shadowllow water will have foam on it. This is gives you an edge everywhere even around model sticking intot the water, not just the beach.. so I'ts flexible and dynamic.

However, its doesnt always look correct becasue of dicontinuities somtimes where depth difference are looking at a rock in the water at a low angle...the foam will to stop around the edges of the rock at the sides instead of going around it all the way.

The only way to stop this problem is to actuall render a seperate depth from the top down.. this would fix those problems but also require double rendering of every object. but rememebr if you render a top down map, be sure to put a clipping directly above the water surface so you dont render anything above it..this prevent sfoam form appearing in odd places.. image a tree sticking over the water..the branches would have phantom foam appear on the water below them...

Many water implementations now probably use an animated grid for the water rather than a flat plane.. One can also use the depth map as a vertex texture in the vertex shader to control wave height in the shallows.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this