Jump to content
  • Advertisement
Sign in to follow this  
X5-Programmer

OpenGL Water

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

Hi, I wanna add some water to my program I have read some tutorials on how to render water but I have hard to understand tutorials so I whonder if anyone knows were I can find some source code on render water in OpenGL? edit : have lookt at google but no luck.

Share this post


Link to post
Share on other sites
Advertisement
It depends on what your program is. If it is a terrain engine then a simple texture-mapped triangle mesh will suffice. There are plenty of free water textures on the net. If you want something more dynamic (and smaller) like a fountain or a waterfall, then you should use a particle system.

NeHe has some relevant tutorials.

Share this post


Link to post
Share on other sites
Which tutorials did you read? Can you provide us with some links, and tell us about the parts you had trouble understanding? It's alot better to try and understand it all, rather than just taking some source-code and pasting it into your own application. I don't think anyone is just going to write that code out for you...

Share this post


Link to post
Share on other sites
James Trotter:

Think you dont understand me correct, I dont use source code to copy and paste what do I learn then? Try to understands code is mutch more effective to learn for me then read some tutorials.

Ajare:
I need water for a little cave I made in 3dsmax dont know how to use shaders for water yet so it will be something more simpler water I think.

Share this post


Link to post
Share on other sites
Water is something that can either be done very easily or in a VERY HARD way. It depends on ur requirement. A somewhat good looking water can be achieved using Perlin noise as wave-generator and projective texturing to reflect the sorroundings with maybe a lil bit of caustics as well. Hey,u can check out the Rhino-Isle demo at Nehe's site.. the sea water was done quite nicely i suppose.

Rhino Isle


But if u want to dig even deeper than u have to apply something called fresnel reflection-refraction for shading and FFT for water wave generation. However, if this happens to be ur first water program, then dont even dare to touch these stuffs yet :p.

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!