Turret Questions

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

Post Reply
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Turret Questions

Post by Frisbeetarian »

Hidden/Spoiler:
[quote="FragMe!"]A picture is worth a thousand words so here is a picture of a very simple turret (roof mounted chain gun actually)

Image

First the two parts aimer-y and aimer-x are model parts y is the main part of the gun and x is the shaft that is coming out of the top. Now for the hierarchy. If you look at the part on the side where is says bones (BTW even though it says bones they aren't that is just the way Unwrap displays things) you can see where the the different parts go. So they have rootnode (same as dummyroot) then under that is aimer-y then aimer-y is under aimer-y then the hp_fire is under aimer-x (this ensures the bullets come out the right place when it pivots) the p_os things are primitive collisions for ordanance and soldier they move with the gun as it turns but they have to be in the places indicated in order to move properly.

As for what to do to get it in game have a look at the odf for tur_bldg_chaingun_roof and the com_bldg_chaingun_roof.msh.option. (these are in the tur side folder)
The .option file is important to have or it won't move.
[/quote]
I kind of have a few questions that are both on this topic, but about two different types of turrets.
The first turret would need to turn with the yaw motion and have two barrels moving in tandem for the pitch motion and be controlled remotely (though that's not really pertinent here). Here is an example of what I'm doing (obviously not the actual turret).
Hidden/Spoiler:
Image
I know that I need "nodes" for each of the barrels.
1. The nodes referred to in the ODF are the names of the barrel objects in XSI, not nulls, correct?
I'm also not quite sure about how to assign the aimer_y and aimer_x. FragMe! said that "x is the shaft" implying to me that the shaft that the gun would yaw on (on the y-axis) was the aimer_x and the gun barrel (on what was the z-axis) was the aimer_y. However, it would make more sense to me if the aimer_y corresponded to the y-axis, and I feel I'm supported by the fact that p_os-gun and hp_fire are children of the aimer_x. (I also don't understand what it means to have both pitch and yaw limits for both of the nodes, but that's another question for another day.)
2. So if I'm correct in thinking that he switched up the names on accident, what object would be named the aimer_x, since both object facing in the correct axis are already labeled (if I was correct in Q.1)?
3. I feel a bit daft asking this, but for what is the hp_active used?
4. And just to make sure, the primitive collision is a child of the node it represents, correct?

The second turret would be an aesthetic turret that would just fire lasers and not do any damage; a turret for show, and in the same vain as the ship to ship turrets in the space maps (for example, spa1_prop_all_shipturret). I was looking through the aforementioned ODF and the turret I noticed still had the aimer_x and aimer_y node names in there. My turret will also have 2 barrels like the example turret.
5. Is a hierarchy like the one quoted still required even if the turret is not going to move, or will a dummyroot, hp_fire_1, and hp_fire_2 due, or somewhere in between?
6. If the hierarchy is not needed, would I just need the BUILDINGSECTION of the armedbuilding in the ODF and then just stick all weapon info under that?
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Turret Questions

Post by FragMe! »

Answers
1. In the example above it refers to the mesh parts of the turret as that is how they decided to do it. It can also be done with a merged model and nulls (appropriately named) then the model is enveloped to the proper null for the bits you want to move either in x or y. And a third choice is if the mesh bits are separate you can still used nulls and just put the mesh bits under the appropriate null. Do the one you feel most comfortable with.
2. Aimer Y is the side to side (yaw) and aimer X is the pitch up and down (sorry if I mislead you just noticed I had to many Y's and not enough x's) aimer_X is a child of aimer_y because you only want the pitch to affect the barrel (if it was the other way around the whole gun would tilt.
3. Some shipped models have this on weapons some don't, it may be used as a possible offset attach point or something can't say for sure.
4. Collision primitives do have to be a child of what they are providing collision for yes. So if you were to put a cylinder on the gun the collison would be a child of the gun mesh.
5. If the turret is not going to move then you should only need the hp_fires
6. You should only need to put in the fire points as you mentioned. Can't think of an example rightof the top of my head but try the big guns on the Imp stardestroyer.

I'll have a look but what topic was the quote from I should go back and change it.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Turret Questions

Post by Aman/Pinguin »

FragMe! wrote:what topic was the quote from I should go back and change it.
http://www.gametoast.com/forums/viewtop ... 5&p=248730
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Turret Questions

Post by Frisbeetarian »

Thanks for the help, I'll work on it over the next couple days to make sure it works.
For the big turrets, I checked the imp and all turrets and they were the same. Maybe I should go check the cis and rep ones as well.

Also, in the hierarchy, where should I put the barrel nodes? Under the aimer_x and then have each hp_fire under the barrels?
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Turret Questions

Post by DarthD.U.C.K. »

you can see that on the first picture you posted
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Turret Questions

Post by Frisbeetarian »

No you can't. His example shows how you would set up a gun for one barrel, and thus it doesn't need barrel nodes. However, if you have multiple barrels, each needs to have a node (for example, the spa1_prop_all_shipturret has two barrels and thus lists the nodes spa2_prop_shipturret1_L_GunBarrel_ZaxisRecoil and spa2_prop_shipturret1_R_GunBarrel_ZaxisRecoil), and I need to know where in the hierarchy these should be. Also, now looking back at their names, are these nodes just there to show recoil? I wasn't sure because fire points are still related to the barrels.
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Turret Questions

Post by FragMe! »

The barrel nodes are just if you want the barrel to recoil (move backwards) when you fire it is not required. On hp_fire for each barrel is though.
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Turret Questions

Post by Frisbeetarian »

How is each hp_fire referenced in the ODF then, if not under a barrel node?
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Turret Questions

Post by DarthD.U.C.K. »

put this under the Barrelrecoil line of the appropriat barrel

Code: Select all

FirePointName           = "hp_fire"
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Turret Questions

Post by Frisbeetarian »

As FragMe! said, I only need the barrel nodes if if I want the recoil, so my question was where should I put that line (if I need it) since I won't have the BarrelRecoil line.
Post Reply