sailboat model animation

Blitz3D Forums/Blitz3D Programming/sailboat model animation

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm doing a sailing sim at the moment.
I've chosen to use option 3 - separate sail model with mesh deformation.
The whole boat, mast and sail arranegment are modelled in tokamak, using sweenies excellent wrapper, with the boom being attached to the mast with a hinge joint.
Advantage of this is that you can change the hinge joint limits to mimic changing the sheet on the sail - gives quite a realistic 'feel' and when you tack the whole arrangement moves around very well.
Also i've made sure that tokamak does a sloppy job of calculating the hinge joint so the boom can 'wobble' a little.
I'm applying impulse forces to the centre of the sail which simulates (fairly well) the wind forces acting on the boat.
Also, as the boat rocks / pitches the boom and sail move accordingly without any messy coding.
With the sail deformation, i set up a table of vertex positions for the sail mesh at its most deformed, and then as the wind direction and boom angle changes, deform the mesh to suit, reading from the table to ensure that the sail retains its shape.
Best of luck!

Funky Frank
(take a look at my site to see some screenshots of work in progress)