Newbie trying to build crazy ship... help?
|
|
Captain Brewster
Registered User
Join date: 12 Feb 2006
Posts: 3
|
02-14-2006 20:21
Hi guys!
Joined yesterday and have been spending most of my time in sandboxes trying to make something fly. Basically, I'm trying to build a large sailing airship.
The crazy thing I'm trying to do is have it actually powered by the sails - they are separate objects mounted on masts that slide through hollowed prims on the ship's hull, and use llSetForce to generate motive force. Idea being that to get going, i would actually have the ship rez the sails and they would propel it.
I'm having some considerable trouble with it. First, the hull is bloody heavy and I can't get enough force out of the sails to lift it... and can't see a way to lighten it that would not be sensitive to the weight of the sails as they come and go.
Second the masts keep tunnelling through the mounting points, though this may be a physics engine weakness that scuppers the whole thing...
Third when it does start to get off the ground it doesn't lift stably in any way, it skews and slews all over the whole sim, also a physics limitation? I have the sails set to lift straight up, so i have no idea why it doesn't try to go straight up.
|
|
Cottonteil Muromachi
Abominable
Join date: 2 Mar 2005
Posts: 1,071
|
02-14-2006 21:35
Perhaps you're approaching this the wrong way? A lot of things in SL are simplified versions of what you'd expect from physics in reality. The physics engine built into SL isn't as advanced as you would think it is. Typically, when building vehicles, people tend to separate the script for making the vehicle move, and the scripts that make it 'appear' to be moved by some force. A sailboat for example, has a script to move the whole boat as one entity, sails and all along with controls for movement. And another script to rotate the sails to make it look like wind is affecting it. And this is the cosmetic part. Other examples are rockets. Theres a script to create lots of smoke and jet fire particles, but this is just cosmetic. The 'fire' doesn't really provide the motive force.
|
|
Captain Brewster
Registered User
Join date: 12 Feb 2006
Posts: 3
|
02-14-2006 22:24
Yeah, i know that's the way it's usually done... i mainly wanted to try to see if the physics engine could do it, though, as a fun simulation. Also a couple reasons i wanted to do it:
1, break the 31 prim limit by segmenting my vehicle into separate objects... I think having sails as physically "mounted" objects rather than linked prims would allow me to drag around a lot of sail prims on a hell of a fancy ship... i guess the sails could be dragged by a powered ship, rather than pull the ship, and still accomplish this.
2 (way too ambitious), have the power sails capable of being blown off with guns, resulting in spiral trajectories etc... for a damaged airship, and you would have to compensate by dropping other sails/changing power levels... such a setup would take a long time to code by hand, but would be automatic with a good physics engine. The engine in SL is probably not good enough though.
I have a feeling that even if I did get this to work, a multi-object ship would most likely put a serious load on a sim due to nonstop collisions between the ship parts.
Well, I'm off to build a more "normal" ship, i suppose!
|
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
02-14-2006 23:01
I think this is an interesting project. I'd encourage you not to give up on it just yet. I have a few suggestions that might help you out. I'm not much of a scritping expert though, so if you need assistance with specifics, hopefully someone else will chime in.
To solve the weight problem, heavier sails might do the trick. The larger an object is, the more force it can exert. Maybe make the sales invisibly huge, with only the right size parts being visible.
As for the collisions, you're right, I'd imagine it would be a bit of strain on the server, but I don't know if it would be noticeably detrimental if it's well managed. It's worth a try. If it turns out to be a killer, so be it. Give it up at that point. It's worth finding that out for sure though before throwing in the towel, at least from my point of view.
The "skewing & slewing" problem isn't altogether unexpected if you think about it. Physical objects tend to drift anyway, and you've got a lot of collisions at work. Just because you tell it to go up doesn't mean it can't get knocked off course. Murphy loves physics engines. Whatever can happen will. I don't know enough about it to advise you how to solve that one, sorry.
It occurs to me that another way you might want to go about this is instead of having the sails physically pull the ship, maybe have the ship scripted simply to follow the sails. That would completely eliminate the need for collisions while still giving you the sail-powered engine you were looking for. You're just replacing physical bonds with "magnetic" ones.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
|
Boliver Oddfellow
CEO Infinite Vision Media
Join date: 22 Sep 2005
Posts: 484
|
02-15-2006 00:09
I dont know a damn thing about how to do it. But, if you get done I bloody well want one!!!!!
_____________________
Infinite Vision: Specialists in Virtual World Projects http://infinitevisionmedia.com
|
|
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
|
02-15-2006 03:39
Yes, and me!
|
|
Captain Brewster
Registered User
Join date: 12 Feb 2006
Posts: 3
|
02-15-2006 16:33
OK, I'm liking the scripted idea. Should be harder but simpler to implement.
Here's the new idea that has been formulating in my head: ship of vehicle type "airplane" and consisting of a low number of prims. Basically, the hull and wheel. It moves and continually broadcasts its vector on a channel. Can a vehicle script continue to operate without someone holding the controls? I would like to be able to set a course and then hang out around the ship with friends.
Separate sails/rudder/ornamentation, rezzed and derezzed by ship and listening on channel to figure out which way to point. Eventually callbacks for sail power settings/damage, which has to be calculated by the airplane script into appropriate motor behaviour.
Can nonphysical objects take damage? I think "following" sails would be best done nonphysical so that they can chase along via simple llSetPos()... maybe i'll put a hold on sail damage for now.
Fully floating sails may lag about a bit is my only worry, so they may have to be "floating" rather than try to appear on masts... this might actually look cooler than the original plan, especially when the sails are rezzing up and down.
|
|
Cottonteil Muromachi
Abominable
Join date: 2 Mar 2005
Posts: 1,071
|
02-16-2006 02:21
Theres a free sailing boat script in the scripting library threads. It actually runs based on the wind in SL. Maybe you can dismantle that script and modify it a bit.
|
|
Sirex Cookie
Registered User
Join date: 29 Jan 2006
Posts: 103
|
02-16-2006 06:13
bear in mind that physics is a very laggy aspect of SL. if you did manage to create this, chances are it would be really laggy.
|
|
TonyRockyHorror Hauptmann
two-for-one special
Join date: 5 Nov 2005
Posts: 76
|
02-16-2006 21:43
you should also check out the sailboat races in Sanchon, using Kanker Greenacre's wonderful boats.
and also the pirate ship battles in Sanchon as well, using Chase Speculaas' badass ships, complete with gunnery and sword fights. it's a lot of fun!
|
|
Blueadept Enigma
Registered User
Join date: 17 Nov 2005
Posts: 3
|
02-17-2006 06:34
From: Sirex Cookie bear in mind that physics is a very laggy aspect of SL. if you did manage to create this, chances are it would be really laggy. Don't listen to them Captain Brewster  Yes the physics engine has some quirks but most can be WORKED AROUND to do exactly what you want to get done. It's a matter of thinking OUTSIDE the BOX =D I built a SL simulator of a real life lottery ball selection machine. The first time i built it yes it did lag the sim out badly, but after a little creative utilization of the same physics quirks that were giving me troubles POOF a perfectly working pure physics machine with esentially 41 flying vehicles (balls), and three stages of random physics baracades (ball poppers like in the real ones). Not only did it work great but by the time i finished it it would barely nudge the sim usage which is nice concidering the great number of actual physics events that were being handled per second in the machine.
|