sailboat model animation

Blitz3D Forums/Blitz3D Programming/sailboat model animation

Nacra(Posted 2004) [#1]
Hi, I'm looking at animating the sail and boom on a sailboat, really simulating it's behavior. How would you do this? Some options I've considered:

* All animation in single model

* Separate out the sail from the boat model and animate separately

* Separate sail model and use mesh deformations in Blitz to animate

Any advice or thoughts on this would be appreciated!

thanks-
Paul


Ruz(Posted 2004) [#2]
you can do a lot in animation and would be better for your framerate.
I would animate the 'cloth'( billowing or whatever) , but turn the sail/boom in the engine.

I have a similar thing with a windmill i am making. haven't quite decided how to handle it yet


Gabriel(Posted 2004) [#3]
I suppose it depends how important the sailboat is. If it's a distant, secondary object, I'd animate it and leave it playing.

If the game is all about sailboats and it's gonna be seen up close all through the game, you're going to notice that the wind changes direction every time you turn the boat. In which case, I would find a way to do it in code. It will be slower though.


Mark Judd(Posted 2004) [#4]
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)


Nacra(Posted 2004) [#5]
Thanks everyone for the good information. The focus of my game is on the boat so it does need to look good and real.

I like the idea of simulating the physics too - hadn't thought of applying that to the boom. Then there's mast bend to consider in a future version. :-)

Frank, I'm doing similar things in terms of applying forces to the center of effort of the sail and am still working at applying the correct forces to counter sideslip and keep everything stable. Fun stuff!

thanks-
Paul