Water waves and a ship

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Andrey
Posts: 17
Joined: Sat Aug 05, 2006 6:53 pm
Location: Ukraine

Water waves and a ship

Post by Andrey »

Hi,
Does any-one knows, how can I do the waves on my sea interact with my ship?
Saku
Posts: 158
Joined: Wed Jan 05, 2005 8:48 am
Location: Denmark

Post by Saku »

You could use a physics engine like Newton or TrueAxis to emulate stuff like that, or you could do something a little simpler with the build-in irr features.

Having thought about the same just a few days ago I figured I could "float" a simple box on top of the waves with the ITriangleSelector. When calculated the position and rotation of the box, simply apply it to the ship node - with a bit a "sink" to it tho, so the whole ship doesnt float ontop of the water ;)

GL
Call me Wice, Miami Wice!
Andrey
Posts: 17
Joined: Sat Aug 05, 2006 6:53 pm
Location: Ukraine

Post by Andrey »

Thanks for good idea :)
But, if I want make something like wavebreaker (de=Wellenbrecher)..? Is it possible?
The waves must react to the ship by sea too...so it would be look more realistic....
crackingod
Posts: 15
Joined: Fri Aug 04, 2006 11:36 am

Post by crackingod »

I think you would need to use a physics engine for that, or maybe code your own.
The capabilites of irrlicht are quite limited for that (and it's normal, it's a 3D engine :D )
SiriusCG
Posts: 58
Joined: Tue Feb 14, 2006 1:05 am

Post by SiriusCG »

But, if I want make something like wavebreaker (de=Wellenbrecher)..? Is it possible?
The waves must react to the ship by sea too...so it would be look more realistic....
You'd have to code it yourself, possibly using FFT functions and the wave effect would completely eat up your CPU/GPU... There wouldn't be any cycles left for your game logic...
Andrey
Posts: 17
Joined: Sat Aug 05, 2006 6:53 pm
Location: Ukraine

Post by Andrey »

Thanks. Hmm...I think, in that case I must decline this idea...
gfxstyler
Posts: 222
Joined: Tue Apr 18, 2006 11:47 pm

Post by gfxstyler »

you could "emulate" "wavebreakers" by adding particle systems to the ship and turn them off/on and fade them in/out.
JPulham
Posts: 320
Joined: Sat Nov 19, 2005 12:06 pm

Post by JPulham »

thats what I'd do. Put a box emmiter accross the front of the ship at water level and if the boxes Y location go below the waters Y then turn on a spray at about 45 degrees away from the ship.
pushpork
Post Reply