Boat in the water...

Posted By: Anonymous

Boat in the water... - 10/22/15 00:46

How would you make a boat pitch and yaw to the waves caused by a noise deform water terrain?

Just a challenge for the bored...I don't really need it.
Mal
Posted By: Dico

Re: Boat in the water... - 10/22/15 01:57

maybee you can use c_trace , a big point abouve the boat to trace the water then make the boat slow in turning , i think you can use smooth() too for tilt and roll
Posted By: sitrep

Re: Boat in the water... - 10/22/15 03:46


|
|
CoolBoat
-*----X----*-
z | z
z | z
z | z

what about the roll, surge, and sway ? calculations based on changes to liquid terrain ?
Posted By: MasterQ32

Re: Boat in the water... - 10/22/15 10:52

calculate water surface normal and align the boats tangents to them

surface normal can be calculated by taking 4 samples around the boat
Posted By: txesmi

Re: Boat in the water... - 10/22/15 12:59

I would vertically trace two points close to fore and aft, compute tilt with hit points height difference and roll with YZ members of the average of hit normals transformed to boat space.
Posted By: Anonymous

Re: Boat in the water... - 10/22/15 16:42

Excellent ideas! I will try and play with this. Seems like a fun challenge.

Thanks
Mal
Posted By: slacer

Re: Boat in the water... - 10/22/15 21:00

Why not just use an Animation?
If it is a movie - try to simulate it
If it is a game - fake it

If you develop a racing game, you would use particles to Show some Kind of dust behind the cars. But would you take the wind direction into your game? I don't think so.

Just use some different idle animations for a boat in small waves / big waves.

Well if your game is a kind of "SIM Sail Boat", you could be forced to throw some math into your game.

Just an idea...
Posted By: Anonymous

Re: Boat in the water... - 10/23/15 00:06

It's not a movie or a game. Just a fun awesome challenge to play with.

I think I'm going to sample a square area around the boat, then sum the major swells and dips of all the normalizes. Then use that data to make a four corner plane, then align the boat to the normal of that plane.
Posted By: txesmi

Re: Boat in the water... - 10/23/15 09:35

My approach:
Click to reveal..

vec_set ( vO, vector(90,0,200) );
vec_rotate ( vO, vector(entBoat.pan,0,0) );
vec_add ( vO, entBoat.x );
vec_set ( vT, vector(vO.x,vO.y,-200) );
c_trace ( vO, vT, IGNORE_PASSABLE );
vec_set ( vP, hit.x );
vec_set ( vN, hit.nx );
vec_set ( vO, vector(-90,0,200) );
vec_rotate ( vO, vector(entBoat.pan,0,0) );
vec_add ( vO, entBoat.x );
vec_set ( vT, vector(vO.x,vO.y,-200) );
c_trace ( vO, vT, IGNORE_PASSABLE );
entBoat.z = vP.z - hit.z;
entBoat.tilt = atan2v ( entBoat.z, 180 );
entBoat.z *= 0.5;
entBoat.z += hit.z;
vec_add ( vN, hit.nx );
vec_rotate ( vN, vector(entBoat.pan,0,0) );
entBoat.roll = atan2v ( vN.y, vN.z );
Posted By: Anonymous

Re: Boat in the water... - 10/23/15 17:52

^+1 I like it..
Posted By: Anonymous

Re: Boat in the water... - 10/23/15 18:49

This would just be easier with a true PhysX fluid simulation correct?

Currently unsupported in 3dgs. Sad.

Well I like txesmi's way.
I was going to sum normals into 3d shapes then apply poly to poly c_moves, get the direction and angles of shape to boat hit-contacts and apply them as force on the boat... Insane !!!
Posted By: txesmi

Re: Boat in the water... - 10/23/15 20:18

laugh

The problem of collision traces is that you need CPU animated vertex for the water model...
© 2024 lite-C Forums