Sign in to follow this  
spong3bob

Water rendering

Recommended Posts

Hi! in want to create a ocean... but really got no idea how to do it.. i know there are a lot of papers, but none of them explained how i get the pixel-color of a reflection/refrection they only always write about a reflection/refrection map, but i really got no idea how to get such a map?? until now i create the water like my terrain, that means a mesh with a lod-algorithm reading its height out of a heightmap.. no problem so far, but i need a realistic movement of the waves and a realistic lighting of the waves.. how many heighttextures should i use (now i use 2 of different sizes)

Share this post


Link to post
Share on other sites
fluid simulations are a field unto themselves.

Do you want physically modelled 3d waves? If so it's a tall order, there are some methods of faking it, but generally it's quite a mathematically involved process (and usually not too kind to the processor either).

Share this post


Link to post
Share on other sites
I'd suggest checking out the Nvidia FX Composer sample. It can do waves, 2D bump-mapping effects, or a combination of both. It also does reflections via a cubemap, which is probably the simplest and easiest way to add them. If you wanted you could extend that to have real-time reflections of scene geometry, or underwater refractions (these both require multiple passes, where you render the geometry to a reflection map or a refraction map).

This site has a few variations of the Nvidia shader using XNA, if that helps you out more than just an FX Composer project.

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