Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Vengence on March 22, 2011, 04:52:15 pm

Title: Is there a released model with off axis turrets?
Post by: Vengence on March 22, 2011, 04:52:15 pm
Man my FS2 modding moods are all over the place. Anyways I'm looking at some ideas I'm thinking of, and they all mostly require turrets that aren't up or down. I've read many many topic regarding how to pull it off but some reason they confuse me. So here's my topical question, nothing's better than a model with it already pulled off as reference. I'm confident that with an existing reference and revisiting these topics that I can get a better understanding of how this works. Is there a confirmed model with a table file that has the off axis turret I can use as reference? Are they on FS Mods that I can download? All I really need is a name of a released ship that pulls this off. Or is there a mod out there I can download that uses such a model? Oh is the 3.6.12 Inferno release a few months ago support this feature? I remember that one of the reasons I held off on working on this stuff a long long time ago was that some builds didn't support it. More or less I'm just a bit confused, and not up to date  :P.

I know I know, this is a rather noobish request, even for one who is an avid modder such as I, but I'd like a reference for all future efforts for things I don't understand immediately  ;). Thanks for bearing with me and I promise to release the fruits of my labor if they bear fruit.
Title: Re: Is there a released model with off axis turrets?
Post by: The E on March 22, 2011, 04:53:32 pm
The UED Solaris has lots of turrets like that.
Title: Re: Is there a released model with off axis turrets?
Post by: Dragon on March 22, 2011, 05:16:28 pm
Also, this: http://freespacemods.net/download.php?view.646
The first model with off axis turrets ever, by Esarai.
Title: Re: Is there a released model with off axis turrets?
Post by: Vengence on March 22, 2011, 05:41:21 pm
This is more than perfect!  :D. Now to mess around with different vectors  :).
Title: Re: Is there a released model with off axis turrets?
Post by: Droid803 on March 22, 2011, 05:48:14 pm
There's also the Phoenix Rising (also by Esarai), and the HTL Akrotiri (by FSF) that have off-axis multiparts.
Also, the fixed version of the SGs Asuras that I did has them, though I don't remember if I ever released it (cause someone made me make it corvette sized XD)
Title: Re: Is there a released model with off axis turrets?
Post by: Nighteyes on March 22, 2011, 05:54:25 pm
oh? so you have a fixed version of the Asuras? care to share it please?
Title: Re: Is there a released model with off axis turrets?
Post by: Droid803 on March 22, 2011, 06:14:17 pm
hm...actually, the fvec/uvec on that one might not be right as I forgot to flip the x value...
ANd it needs to lose its extra turrets and get scaled back down to cruiser/gunship size.
Title: Re: Is there a released model with off axis turrets?
Post by: Scooby_Doo on March 23, 2011, 01:03:19 am
Quite a few of my models have off axis turrets too.
Title: Re: Is there a released model with off axis turrets?
Post by: MatthTheGeek on March 23, 2011, 01:40:52 am
Was there ever an engine limitation about off-axis multiparts back in the day or was it only that people never tried them before that ?
Title: Re: Is there a released model with off axis turrets?
Post by: The E on March 23, 2011, 03:35:53 am
Yeah, so-called side-mounted multipart turrets are an SCP addition, (a rather old one, I might add).
Title: Re: Is there a released model with off axis turrets?
Post by: Vengence on March 24, 2011, 01:42:15 am
Old but sadly, as far as I know, undocumented in the wiki for tutorial's sake. And what I read in topics alone wasn't very useful without a reference. But now I've got a good understanding and I'm working on a rather... complex turret setup. a side axis turret that is turned 45 degrees. I haven't tested it yet ingame but I'm hoping my calculations are correct. If this lil test works out then I have an awesome new ship model idea  ;).
Title: Re: Is there a released model with off axis turrets?
Post by: headdie on March 24, 2011, 04:45:14 am
the thread multipart turrets on angled surfaces (http://www.hard-light.net/forums/index.php?topic=60327.0)

Here you go: http://scoobydoo.freespacemods.net/Completed/Angle2VectorConverter.exe

It's ready for 3dmax usage (or any app where Z is up/down) and for those still using the old truespass cob method.

The angle of the turret is the "Rotation", if the original turret isn't facing up forward (i.e. it's original angle isn't at 0,0,0) then add "turret origin".
i.e. The most common case: if you made a turret facing up-forward then rotated it to it's correct angle on the hull of let's say (20,0,0) then rotation would be (20,0,0) and turret origin would be (0,0,0). 


I'm not make any guarantees that it's 100% correct. 

If you are using Blender and you want to use Scooby Doo's utility for calculating the uvec and fvec:
- Copy the angle of the turret (or an empty with it's "z" as the uvec and it's "y" as the fvec) into the converter
- Click "Adjust for 3dmax"
- Press Calculate
Important notes...

  • When viewing model in PCS2 and setting uvec and fvec values using PCS2 vectors it is important to notice that first vector element ('X') needs to be reversed.
  • Turret uvec and turret normal need to match (while remembering the above rule) or otherwise turret rotation matrix will not work as it should.

Title: Re: Is there a released model with off axis turrets?
Post by: Spicious on March 24, 2011, 06:41:32 am
You can set this up pre-conversion if you're going through Collada. Add a helper called vec with up and forward directions pointing in the up and forward directions, respectively, of your turret.
Title: Re: Is there a released model with off axis turrets?
Post by: Vengence on March 26, 2011, 12:29:30 am
I mentally figured out how the UVec stuff works  ;), granted I'd probably brain explode if I had to try anything highly complex, but I'll take your advice there. The test models proved successful:

(http://img832.imageshack.us/img832/8617/screen0026.jpg)

No I'm NOT making an EVE mod... I'm just doing this for fun cause I saw lots of EVE ships have odd turret placement and I happened to have a model viewer/exporter for it, and the textures and normal maps were virtually all set to be ported. So I used them for my experiment.

The Hyperion on the right has turrets that are not only 90 degrees sideways... they are also turned 45 degrees inward. This proved to be the challenge I wanted to accomplish, as I figured if I can get this right, then I can pretty much design anything with any form of turret placement. Granted the solution wasn't that hard thankfully, though it took me half an hour of thinking to understand how this all worked. Anyhow, here is my subobject properties for a front right turret:

Code: [Select]
$special=subsystem
$fov=180
$name=GunTurret
$uvec:1, 0,1
$fvec:-1,0,1

Thanks for the help  ;)
Title: Re: Is there a released model with off axis turrets?
Post by: Commander Zane on March 26, 2011, 03:43:02 am
Honestly...
I thought it was WoD2... :nervous:
Title: Re: Is there a released model with off axis turrets?
Post by: Dragon on March 26, 2011, 06:42:25 am
This looks amazing.