Jump to content
  • Advertisement
Sign in to follow this  
Anddos

Creating a lake or a pond ?

This topic is 2105 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What would be the best way to create a pond or a lake with DirectX 9, in 1 of my books there is a sample of making the texture offsets of the quad move but that was for a cloud demo, what is the way to make water so it has depth and movement,thanks

Share this post


Link to post
Share on other sites
Advertisement

There are many things to consider with water such as

 

- reflection (light reflected by the water surface, ie. the environment)

- refraction (light refracted by the water surface, ie. the surface below)

- waves (to make the surface behave like water)

 

For simple waves, you can for example add together several normal maps moving at different speed. Using this surface normal you may sample a environmental cubemap for example. For the water to look realistic, you'll need to add refraction for which you'll need a fresnel term. 

 

There's plenty of example about water rendering on the internet so I won't go into the details.

 

Cheers!

Share this post


Link to post
Share on other sites

If want the surface of the water to be animated and moving, you can use a simple simulation to approximate how waves should be moving.  You can check out the WaterSimulationI sample program from Hieroglyph 3 for a GPU based D3D11 implementation.

Share this post


Link to post
Share on other sites

Well for that kind of realism, you'll need to have good reflection either using a cubemap (which may or may not be sufficient) or rendering the scene from the reflected point of view in order to have good looking reflection.

 

Also you'll need another texture for the things that grow on the surface of water and some sort of an alpha map to define the regions.

 

Cheers!

Share this post


Link to post
Share on other sites

I need it so there is a rippling effect on the water,so it looks like its moving,relection isnt important,i think this techniquie is called normal mapping

Share this post


Link to post
Share on other sites

I need it so there is a rippling effect on the water,so it looks like its moving,relection isnt important,i think this techniquie is called normal mapping

 

Well the technique itself isn't used only for a rippling effect, but I know what you mean, and it can be used for that. smile.png

 

I personally recommend this blog, it explains most of it:

 

http://habibs.wordpress.com/lake/

 

Good Luck!

-MIGI0027

Share this post


Link to post
Share on other sites


I need it so there is a rippling effect on the water,so it looks like its moving,relection isnt important,i think this techniquie is called normal mapping

 

Two "scrolling" normal maps (moving in slightly different directions and scaled slightly differently) used for lighting do a fairly good job of accomplishing this effect.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!