Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: whitearrow on May 13, 2013, 07:34:38 pm

Title: Models with mobile parts
Post by: whitearrow on May 13, 2013, 07:34:38 pm
Hi everyone! I'm planning to build a new frigate/corvette size model. It will have some mobile parts: mainly some panels that need to perform 1-2 steps movements (it will feature also some turrets anyway). But I'm concerned about one thing: I know very few models which have mobile parts e.g. UEF Kentauroi and the Stealth Bomber by BlasterNT. So, I'm wondering why so few ships feature mobile parts. Is it so difficult to implement them in FSO?
Title: Re: Models with mobile parts
Post by: General Battuta on May 13, 2013, 07:48:19 pm
Rotation is easy, translation is hard.
Title: Re: Models with mobile parts
Post by: Black Wolf on May 13, 2013, 08:06:08 pm
Controlled rotation - i.e. anything other than the constant rotation you get on the Faustus, is also a relatively new capability. It's taken time to become commonly used, although I'd say that's well and truly changed now -a lot of newer models have some form of animated motion.

But yes, it can also be tricky, and as Battuta says, anything other than relatively simple rotation is particularly tough. What exactly do you want to do?
Title: Re: Models with mobile parts
Post by: Phantom Hoover on May 13, 2013, 08:50:53 pm
is there a reason translation isn't just implemented as a primitive animation in the engine...
Title: Re: Models with mobile parts
Post by: Black Wolf on May 13, 2013, 08:58:38 pm
It's hard as a motherfracker, by all accounts, basically. would require a significant rebuild of large parts of the code.
Title: Re: Models with mobile parts
Post by: Scooby_Doo on May 13, 2013, 10:21:41 pm
Also look here: http://www.hard-light.net/forums/index.php?topic=83947.0
This script can be expanded to handle different situations ( i just never had the time to do it myself)
Title: Re: Models with mobile parts
Post by: whitearrow on May 14, 2013, 05:09:22 am
But yes, it can also be tricky, and as Battuta says, anything other than relatively simple rotation is particularly tough. What exactly do you want to do?

Well, the ship is a stealth assault frigate (for e.g. SOC) and is equipped with a massive fore beam. The whole thing is packed into the hull for tougher protection and for keeping a stealthy and clean shape. Other secondary offensive weapons are stored under the deck.
I need the bow section to open in order to fire with the primary beam, and the deck section split and lift to fire with secondary weapons.

I'm sorry I can't post a picture right now, because I am still in the sketching phase, so everything is still literally on the paper. Should translation turn out to be too hard to implement, I may consider to revise the whole design, but I may result "less stealthy"...   
Title: Re: Models with mobile parts
Post by: Mad Bomber on May 14, 2013, 06:09:35 am
One of the LSF ships from Wings of Dawn has a forward beam hidden behind doors, the Challenger 2, I think. And there's also the main gun for another of the Federal/UEF fighters.
Title: Re: Models with mobile parts
Post by: zookeeper on May 14, 2013, 08:26:52 am
Well, you can fake translation by either putting the submodel's pivot point so far away that a tiny bit of rotation is indistinquishable from translation, or by parenting it to a couple of other invisible rotating submodels which are placed so that they cancel out each others' motion on all but one axis. Hacky and a bit tricky, but can be done.
Title: Re: Models with mobile parts
Post by: whitearrow on May 14, 2013, 05:25:43 pm
[...] by parenting it to a couple of other invisible rotating submodels which are placed so that they cancel out each others' motion on all but one axis. Hacky and a bit tricky, but can be done.

Yes, actually I was thinking about this solution too.

I have decided to post my sketches. Keep in mind that these are the very first ones I put down, so I'm aware they might be a little confusing! :) Anyway I'd like to know your first impressions about the concept...

EDIT - description: section 3 and 4 should slide along a vector that is parallel to the panel's rear edge, in order to expose the main beam completely. Section 1 and 2 should move obliquely up and backward, to expose the dorsal AF cannons bay and the side torpedos launchers.

This ship essentially plays the role of the sniper. Its mission profile consists in neutralizing escort units and cause major damage to capital ships's subsystems from long distance, using its main beam cannon. Since it should be capable of vaporizing a deimos-sized target, this weapon will draw about 80% of the entire reactor's power. So no other energy consuming weapon is allowed during this phase. This is the reason for the side torpedo and missile launchers, which operate in the same way as on UEF Katana-class frigates. Also the dorsal anti-fighter cannon will fire physical ammunition, creating a firing solution above the ship in order to cover the main beam cannon's body that is now partally exposed and vulnerable (green).

As far as the speed is concerned, during the laser strike, the ship's max velocity will be limited to 10 m/s, barely enough for changing the firing vector.
During shealth cruise mode instead, with all armored panels retracted, the ship will be able to fly at 60-70 m/s by taking advantage of the full power of the reactor.

The armor (red) will provide enough protection to survive a close fight against capital ships' standard beams or fighters'assaults; moreover it will assure a stealth profile, so it won't be targetable by standard radar systems. Anyway, as should be already clear, this ship is not designed for direct confrontation with other ships, but for weakening the enemy battlegroups by depriving the dreadnoughts of their escorts and other minor units.


[attachment deleted by ninja]
Title: Re: Models with mobile parts
Post by: Phantom Hoover on May 14, 2013, 05:34:18 pm
or by parenting it to a couple of other invisible rotating submodels which are placed so that they cancel out each others' motion on all but one axis.

p. sure you can't create a precise translation using a finite number of epicycles, but it is too late and i am too drunk to bother looking up a proof of that
Title: Re: Models with mobile parts
Post by: pecenipicek on May 14, 2013, 05:37:58 pm
or by parenting it to a couple of other invisible rotating submodels which are placed so that they cancel out each others' motion on all but one axis.

p. sure you can't create a precise translation using a finite number of epicycles, but it is too late and i am too drunk to bother looking up a proof of that
its a distinct case of "good enough".
Title: Re: Models with mobile parts
Post by: Phantom Hoover on May 14, 2013, 08:42:03 pm
i'm an idiot, you obviously can do it exactly
Title: Re: Models with mobile parts
Post by: Nuke on May 15, 2013, 01:33:40 am
you can do translations but it would suck. but only one level deep. you cant have a translating thing on a translating thing. hierarchy can only be 5 levels deep, and it takes 3 levels to pull it off, not counting the hull.  you could probibly do a rotating thing on a translating thing or vise versa though.

the tricky part is translating and making the collision detection work.
Title: Re: Models with mobile parts
Post by: whitearrow on May 15, 2013, 03:29:28 am
do you mean that you cannot couple 2 movements of the same type? I was actually thinking of rotation-rotation...
Title: Re: Models with mobile parts
Post by: pecenipicek on May 15, 2013, 09:02:27 am
do you mean that you cannot couple 2 movements of the same type? I was actually thinking of rotation-rotation...
that should work visually, but its anyone's guess how well will it work when physics come knocking.