Game Development Community

Real Waves for Water - Help Needed

by Jorge Luis Gandulfo · in Torque Game Engine Advanced · 10/19/2008 (7:27 pm) · 10 replies

Anybody made a waterblock that renders real waves? i mean not using shaders only, but also rendering movement on the water (This could be seen on the shore where the normal water block doesn't move even when waves are drawn).

Thanks in Advance for any tips or links you can give me..

#1
10/19/2008 (7:30 pm)
I would think that you would have to simulate a DTS wave action, if you are looking for something more complicated (phyics based wave action) then there are a few wave/water engines. but it would essentially require a entire redo of the way water is rendered in the engine (read - you will need to really know your programming)
#2
10/19/2008 (9:44 pm)
For real waves that would be quite the feat as I was under the impression everything was simulated on your screen and didn't really exist. /joke

Seriously though, if you only issue is because of the where the water meets the shore you could try moving the water block up and down slowly possibly a random amount each time. It simulates "real" waves quite well even without animation or shaders.
#3
10/19/2008 (10:50 pm)
Thanks Edward for the Tip.

No Ben, i was more thinking on a sailing simulation, just for a Demo.

But seems there is nothing done yet right?
#4
10/19/2008 (11:07 pm)
You mean these types of waves then?

sxmprivateeye.com/files/images/waves.thumbnail_0.jpg
I could see it being done with clever use of transparency, shaders, and particle effects. But the amount work of to get it right so that the player doesn't see through it would be the kicker.

Honestly, your best bet is probably to dig into the water rendering code. I once worked on a game where we used a rendering method which was basically - render deformable terrain with a water texture. The basic idea is that you need a non-block water, so that you can raise and lower the water as needed. As for the curves in the waves - I'm not exactly sure how that could be achieved but its possible you could blend in the DTS method Edward mentioned without it being too noticeable.

GameDev.net has some articles on water. I haven't checked them out but they may be work a look.
#5
10/20/2008 (5:28 am)
When i say real waves, i mean, a waterblock that renders a mesh that moves, making the waves.
Wire frame would look something like this

www.digitalanarchy.com/psunami/pix/psu_wireframe.jpg
Final results would look something like this.

www.hangsim.com/vs/help/water1.jpg
There are games like Ship Simulator 2008 that renders this kind of water.

I saw a demo the other day of a guy that did this kind of water in Irrlicht.

I was asking because maybe somebody worked in this kind of stuff for torque.
#6
10/20/2008 (6:19 am)
I think you would use a shader for the effect.
Although I do not know how to implement this.
#7
10/20/2008 (7:25 am)
I am also interested in the concept of a sailing simulator.
Is there any resouces for "boat" and water interaction floating
around here? :)
#8
10/20/2008 (8:33 am)
A while ago I found and bought this Water Lib/Engine and planned to see if it would be possible to tweak it into our mmorpg. We havent reached a point yet, where we actually works with it...

Just wanted to give ye folks the link!
#9
10/20/2008 (9:31 am)
Deformable "terrain" treated as water will do the trick I've used that method before. Shaders will help as well.

The idea is to make a "terrain" block and then deform the verts up when a "wave" hits them after the wave has past the vert decreases by an amount each frame until they are about back to their starting point.
#10
10/20/2008 (10:16 am)
Chris, the water engine you sent us a link is great, im just thinking on how hard it will be to integrate it with torque and then physics.

Ben, Any idea on how to start implementing this?