Jump to content
  • Advertisement
Sign in to follow this  
nipun

Help me out pls: want to render water in my terrain

This topic is 4163 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

i have developed a game in which there is a 3D terrain. i want to draw river etwork on it. Currently i have just used texture mapping n mapped textures in the terrain to render the river. but it doesnt look realistic. so i want to draw the river in a maner that it looks with waves. Can ny body pls suggest me ny tutorial or help me out how can i do this ..........i dont want my application to be too heavy........... pls pls help me out

Share this post


Link to post
Share on other sites
Advertisement
One fairly easy and light way to do this is to use an animated texture - you stay with a flat quad for the water, but instead of using just one static image for the texturing you create a series of linked water images that when animated give the impression of the water moving and rippling in the wind. Store all the images in the same texture and then cycle through these one after another - it is probably best to not change the image used every frame, but at regular intervals to avoid the animation being uneven.

This from experience gives you a pretty good look for lakes and seas - for rivers it might not be as good as you want to give the impression of water moving in a particular direction.

Also I make sure that the water is partly transparent - again this is easy to do and improves things a lot.

Hope that helps,

Share this post


Link to post
Share on other sites
If you want to get more advanced, you could render the scene without water to a texture, then blend that with your original water texture (which might be a partially transparent noisy texture or something), and perturb the texture coordinates in a shader to give a ripple effect.

Or do that but tesselate the water surface and use a vertex shader to make the geometry actually act like a water wave too.

sam

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!