Turret Tutorial

How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.

Moderator: Moderators

Gametoast Staff
User avatar
Posts: 2267
Joined: Sat May 13, 2006 12:34 am
Location: Origin name GT_FragMe
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set

Turret Tutorial

Postby FragMe! » Fri Oct 31, 2008 1:12 pm

This is a simple Turret tutorial, decided to do it after having seen question here and from helping people on XSI.

There are two ways that a turret can be constructed in XSI as separate parts and with all parts merged.
The major difference between the two is if it is merged you will have to envelope the the model to the appropriate nulls.
Other than that the hierarchy is basically the same. Both of these have been tested in game and work.
Note: Merged method can only be used if you have a version of XSI that used the Pandemic exporter.

In both case you will need to create nulls for things like aimer_y (the rotation of the gun) and aimer_x (the tilt of the barrel)
hp_fire (that one is obvious) and optionally barrel (this can be used for recoil of the barrel when the gun is fired)
Other things that can be include but I didn't are hp_pilot if you turret is like the anti-aircraft guns on Mygeeto.

Here are two pictures of the different ways and sample odf and msh.option files. These are very simple models, done that
way on purpose so things can be easily seen. On the left side is the hierarchy tree.
The important things to remember is the turret needs to be set up as shown, barrel pointing to the right along the Z axis
and in what would be the center "neutral" postion for the tilt (pitch). The nulls for aimers, fire and barrel can be moved
into position but should not be rotated from their creation value also the nulls should not have their transforms frozen.
Also not shown in the examples is the collision primitives, these would just go under the appropriate part if using separated
parts or under the proper nulls if doing merged mesh.

Separate Parts
Hidden/Spoiler:
Image

msh.option contents
Hidden/Spoiler:
Code: Select all
-keep aimer_y aimer_x

Sample ODF
Hidden/Spoiler:
Code: Select all
[GameObjectClass]
ClassLabel              = "armedbuilding"
GeometryName            = "turret_parts.msh"

[Properties]

BUILDINGSECTION             = "BODY"

RespawnTime      = "999999.9"

MapTexture          = "turret_icon"
IconTexture         = "HUD_all_lascannon_icon"

MapScale            = "1.2"
HealthTexture           = "HUD_kam_turret_icon"

GeometryName            = "turret_parts"

MaxHealth           = "400000.0"


BUILDINGSECTION         = "TURRET1"

ForceMode = 0

TurretNodeName          = "aimer_y"

PitchLimits             = "-30 30"
YawLimits           = "-180 180"

PitchTurnFactor     = "0.0"
//FirstPerson             = "com\comviewf;com_1st_cockpit_viewfinder"
ThirdPersonFOV      = "65"
WeaponName          = "tur_weap_recoilless_rifle"
WeaponAmmo          = "0"

MaxTurnSpeed            = "3.8"
MaxPitchSpeed           = "3.8"
PitchRate                = "1.0"
TurnRate                 = "1.5"
PCMaxPitchSpeed         = "3.0"
PCMaxTurnSpeed          = "3.0"   


TURRETSECTION       = "TURRET1"

AimerNodeName           = "aimer_x"
AimerPitchLimits        = "-30 30"
AimerYawLimits          = "0 0"
EyePointOffset          = "0.0 2.5 0.0"
TrackCenter             = "0.0 0.0 -2.0"
TrackOffset                     = "0.0 3.6 2.0
FirePointName           = "hp_fire"


TurretYawSound         = "turret_whir_yaw_lp"
TurretYawSoundPitch    = "0.7"
TurretPitchSound       = "turret_whir_pitch_lp"
TurretPitchSoundPitch   = "0.7"
TurretAmbientSound     = ""
TurretActivateSound    = "vehicle_equip"
TurretDeactivateSound  = "vehicle_equip"
TurretStartSound       = ""
TurretStopSound        = ""

FoleyFXGroup    = "metal_foley"


Merged Mesh Method
Hidden/Spoiler:
Image

msh.option
Hidden/Spoiler:
Code: Select all
-keep aimer_y aimer_x barrel

Sample ODF
Hidden/Spoiler:
Code: Select all
[GameObjectClass]
ClassLabel              = "armedbuilding"
GeometryName            = "turret_merged.msh"

[Properties]

BUILDINGSECTION             = "BODY"

RespawnTime      = "999999.9"

MapTexture          = "turret_icon"
IconTexture         = "HUD_all_lascannon_icon"

MapScale            = "1.2"
HealthTexture           = "HUD_kam_turret_icon"

GeometryName            = "turret_merged"

MaxHealth           = "400000.0"


BUILDINGSECTION         = "TURRET1"

ForceMode = 0

TurretNodeName          = "aimer_y"

PitchLimits             = "-30 30"
YawLimits           = "-180 180"

PitchTurnFactor     = "0.0"
//FirstPerson             = "com\comviewf;com_1st_cockpit_viewfinder"
ThirdPersonFOV      = "65"
WeaponName          = "tur_weap_recoilless_rifle"
WeaponAmmo          = "0"

MaxTurnSpeed            = "3.8"
MaxPitchSpeed           = "3.8"
PitchRate                = "1.0"
TurnRate                 = "1.5"
PCMaxPitchSpeed         = "3.0"
PCMaxTurnSpeed          = "3.0"   


TURRETSECTION       = "TURRET1"

AimerNodeName           = "aimer_x"
AimerPitchLimits        = "-30 30"
AimerYawLimits          = "0 0"
EyePointOffset          = "0.0 2.5 -2.0"
TrackCenter             = "0.0 0.0 -2.0"
TrackOffset                     = "0.0 3.6 2.0"
FirePointName           = "hp_fire"
BarrelNodeName      = "barrel"
BarrelLength        = "1.0"
BarrelRecoil        = "0.25"


TurretYawSound         = "turret_whir_yaw_lp"
TurretYawSoundPitch    = "0.7"
TurretPitchSound       = "turret_whir_pitch_lp"
TurretPitchSoundPitch   = "0.7"
TurretAmbientSound     = ""
TurretActivateSound    = "vehicle_equip"
TurretDeactivateSound  = "vehicle_equip"
TurretStartSound       = ""
TurretStopSound        = ""

FoleyFXGroup    = "metal_foley"



Just a side note although I haven't tried it, maybe some can and post back, if you use the separate parts method (without collisions)
it should be able to be exported with Repsharpshooters mshex. It would only have the collsion made by visual munge, but at least you
should be able to see your turret in game.

On a final note if anyone has good information regarding the setting and good usage of the EyePointOffset,TrackCenter,TrackOffset
I can muddle through the basics of them but if there is something more definitive out there it would be greatly appreciated.

Lieutenant General
User avatar
Posts: 740
Joined: Fri Aug 08, 2008 11:27 pm
Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe
Projects :: Tron The Grid
Games I'm Playing :: The best..SWBFII
xbox live or psn: No gamertag set

Re: Turret Tutorial

Postby ForceMaster » Fri Oct 31, 2008 1:15 pm

thanks! thanks! thanks! this is what we need !!!!! :bowdown: :bowdown: :D

Sith Master
User avatar
Posts: 2768
Joined: Tue Oct 02, 2007 10:51 am
Location: Ghosting around GT
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set

Re: Turret Tutorial

Postby MandeRek » Fri Oct 31, 2008 2:29 pm

GREAT tut, worked for my turret as you know! :D

The only thing i hope is that someone will make a program one day to print odf lines making the camera position of the turret/vehicle/soldier mesh.. But hey, I'll keep on dreaming :P

well done mate :thumbs:

Gametoast Staff
User avatar
Posts: 3294
Joined: Mon Aug 21, 2006 6:23 am

Camera properties for a turret

Postby AceMastermind » Fri Oct 31, 2008 5:04 pm

Nice work on the tutorial FragMe!
You should post pics of the Explorer window while using the Objects Only filter because 99.9% of the time you won't ever need to see the parameters for each object in your scene anyway and showing all the parameters just clutters up the hierarchy and makes it look more confusing to new users.


FragMe! wrote:On a final note if anyone has good information regarding the setting and good usage of the EyePointOffset,TrackCenter,TrackOffset
I can muddle through the basics of them but if there is something more definitive out there it would be greatly appreciated.

Testing shows:
EyePointOffset = camera's focal point
TrackCenter = camera
TrackOffset = tilt axis

Example images below using these xyz coordinates:
Code: Select all
EyePointOffset      = "0.0 2.5 1"
TrackCenter     = "0.0 3.5 -8.0"
TrackOffset         = "0.0 0.75 2.0"

Hidden/Spoiler:
The view of manned turret ingame
Image

Hidden/Spoiler:
The same view of the turret in XSI
Image

Hidden/Spoiler:
The EyePointOffset, TrackCenter and TrackOffset ODF coordinates plotted in XSI
Image
NOTE: I used XSI ONLY to plot the coordinates to provide visual feedback for testing

psych0fred's AAT ODF with comments gives info that is conflicting with my testing results though:
http://www.secretsociety.com/forum/disp ... p?mid=1272

Gametoast Staff
User avatar
Posts: 2267
Joined: Sat May 13, 2006 12:34 am
Location: Origin name GT_FragMe
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set

Re: Turret Tutorial

Postby FragMe! » Fri Oct 31, 2008 7:59 pm

Thanks Ace, never knew about that filter, or never bothered to look for it.

Pictures updated in the Tutorial.

Sith Master
User avatar
Posts: 2768
Joined: Tue Oct 02, 2007 10:51 am
Location: Ghosting around GT
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set

Re: Turret Tutorial

Postby MandeRek » Sat Nov 01, 2008 3:59 am

Wow Ace! Very nice!!!! One more question.. When you've placed all three, how can you EXACTLY see how it will be ingame.. Or do you need to munge and test?

Still, thanks a lot, i just needed this for huge vehicles like the tri droid and such :D

Master of the Force
User avatar
Posts: 6069
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Turret Tutorial

Postby DarthD.U.C.K. » Mon Aug 29, 2011 2:41 pm

As far as i experience the cameravalues have another effect:
EyePointOffset - offset of the cockpit from the turretnode/dummyroot in firstperson
MountPos - point around which the camera rotates/offset from turretnode(?)
TrackCenter - offset of the camera from the turretnode/dummyroot in thridperson
TrackOffset - pretty much the same effect as TrackCenter

Return to 3D Modeling & Animation

Who is online

Users browsing this forum: No registered users and 3 guests