Setting Up A Weapon For BF2

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

User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Setting Up A Weapon For BF2

Post by lucasfart »

I'm trying to set up a weapon for BF2 which I've made in blender. I've imported it into XSI Softimage Modtools 7.5 through the obj import, however I'm pretty sure my scene isn't set up properly. If someone could help me get everything in the right spot, that would help immensely....
Hidden/Spoiler:
Image
The scene itself is named Scene_Root. I've added two extra nulls on top of the original one, but i really don't know what I'm doing. I've looked at Fragme's Picture, but apart from that I'm not really sure what to do.
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: Setting Up A Weapon For BF2

Post by ANDEWEGET »

Should look like this:

Root(container for everything, usually of type Null, name can be anything)
----models
----hp_fire(null, if you select it and press V(translation tool)shots will emit along the blue arrow)

hp_active doesn't do anything AFAIK, BTW.
You could use ZETools for the setup, too. It will create a hierarchy with hp_fire, then you can select your model and press the Selection > Hierarchy(forgot how it's called...).
Lephenix
Captain
Captain
Posts: 497
Joined: Tue Jul 12, 2011 6:46 am
Projects :: Becoming a Concept Artist-Illustrator
Contact:

Re: Setting Up A Weapon For BF2

Post by Lephenix »

hp_active and hp_fire should be in dummyroot (or MS3DSceneRoot).
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Setting Up A Weapon For BF2

Post by AceMastermind »

You don't need the hp_active or the 'MS3DSceneRoot' null (there's no point in naming anything MS3DSceneRoot anyway).
Line the weapon geometry up on the grid where it will line up properly with the character's hand ingame then freeze the transforms(the geometry center will be the attach location) and add the hp_fire null at the end of the barrel. Make hp_fire child to the weapon geometry then branch select the weapon and export.

If your weapon geometry consist of multiple objects then just use one of them as the master parent then make everything else a child of it. This works with the Pandemic Tools and ANDE's ZE Tools but not MshEx since it requires a null as the master parent.
Lephenix
Captain
Captain
Posts: 497
Joined: Tue Jul 12, 2011 6:46 am
Projects :: Becoming a Concept Artist-Illustrator
Contact:

Re: Setting Up A Weapon For BF2

Post by Lephenix »

AceMastermind wrote:This works with the Pandemic Tools and ANDE's ZE Tools but not MshEx since it requires a null as the master parent.
It works, i exported weapons with it.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Setting Up A Weapon For BF2

Post by AceMastermind »

I know you can export weapons with it, I was referring to the hierarchical setup. MshEx by design requires a null as the master parent whereas using the other two conversion methods don't.
[color=#FF8040]MshEx Beta 3[/color] wrote: Rules you must follow:
  • ...
    There has to be a null as the parent of everything.
    ...
Instructions:
  • ...
    Put everything you're going to export under a null (not the scene root).
    ...
This is only a requirement of this tool, not Zero Engine and therefore isn't needed when using ZE Tools or the Pandemic Tools to export models. I hope this was clear! :)
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: Setting Up A Weapon For BF2

Post by lucasfart »

Thanks heaps for the help guys! I have adjusted my structure according to your instructions, however I'm not sure if i need to move the mesh itself up in the hierarchy.
Hidden/Spoiler:
Image
I have three more questions:

1. What do the blue shaded sections of my model mean when i have the mesh selected?
2. Is it possible to change the hand positions on my sniper rifle ingame, or is this set/involves changing something difficult?
3. When freezing transforms, what should i have selected; everything or just the mesh?

EDIT: Well, using the above setup I've managed to get my model ingame! Thanks guys for the help. Now i just need to follow the texturing tut....
Hidden/Spoiler:
Image
My other questions, while not fundamental, still stand.

Also, how does one see the mesh information (vertice/face count etc)
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Setting Up A Weapon For BF2

Post by Marth8880 »

lucasfart wrote:1. What do the blue shaded sections of my model mean when i have the mesh selected?
If you are talking about the blue edges, those are edges with only one attached polygon. (I forgot the proper term for this. Disconnected polygons? :S)

Example:
Hidden/Spoiler:
Image
lucasfart wrote:2. Is it possible to change the hand positions on my sniper rifle ingame, or is this set/involves changing something difficult?
The mesh should be positioned in such a way that the trigger of the weapon is at the absolute center of the scene. (X,Y,Z = 0,0,0)
lucasfart wrote:3. When freezing transforms, what should i have selected; everything or just the mesh?
Just the mesh.
lucasfart wrote:Also, how does one see the mesh information (vertice/face count etc)
Little eye icon in any viewport, "Selection Info".
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: Setting Up A Weapon For BF2

Post by lucasfart »

Thanks for the answers Marth!

@1 - What am i supposed to be seeing in your pic?

@2 - I get that. What i mean is, can i make it so that the two hands on my model ingame are further apart on the model, instead of shrinking my model to make it fit in the default hand positions.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Setting Up A Weapon For BF2

Post by Marth8880 »

lucasfart wrote:@1 - What am i supposed to be seeing in your pic?
Check the picture again, I updated it. Look at the part I circled. That's the area around which your trigger should be located: 0,0,0.
lucasfart wrote:@2 - I get that. What i mean is, can i make it so that the two hands on my model ingame are further apart on the model, instead of shrinking my model to make it fit in the default hand positions.
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: Setting Up A Weapon For BF2

Post by ANDEWEGET »

The position of the hands is stored in the according animation.
Blue lines are edges that arent connected to another poly.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Setting Up A Weapon For BF2

Post by Marth8880 »

Marth8880 wrote:
lucasfart wrote:@1 - What am i supposed to be seeing in your pic?
Check the picture again, I updated it. Look at the part I circled. That's the area around which your trigger should be located: 0,0,0.
lucasfart wrote:@2 - I get that. What i mean is, can i make it so that the two hands on my model ingame are further apart on the model, instead of shrinking my model to make it fit in the default hand positions.
The heck?! My reply to his second quote vanished! :o
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: Setting Up A Weapon For BF2

Post by lucasfart »

Marth8880 wrote:
Marth8880 wrote:
lucasfart wrote:@1 - What am i supposed to be seeing in your pic?
Check the picture again, I updated it. Look at the part I circled. That's the area around which your trigger should be located: 0,0,0.
lucasfart wrote:@2 - I get that. What i mean is, can i make it so that the two hands on my model ingame are further apart on the model, instead of shrinking my model to make it fit in the default hand positions.
The heck?! My reply to his second quote vanished! :o
:lol: What was your missing reply? :P
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Setting Up A Weapon For BF2

Post by Marth8880 »

I think I said something like, "You would need to create a new basepose animation."
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: Setting Up A Weapon For BF2

Post by lucasfart »

Ahh. ok. I thought as much, but being the newby to this stuff that I am, I thought it was probably worth checking. So there's no other way to relocate the guys arms on my model?
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Setting Up A Weapon For BF2

Post by Marth8880 »

Nope, sadly. :cry: imtiredbai :sleep:
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Setting Up A Weapon For BF2

Post by AceMastermind »

Blue(cyan by default) lines represent border edges in XSI.
[color=#FF8040]Softimage Wiki[/color] wrote:Edges that are not shared represent the boundary of the polygon mesh object and are displayed in light blue...
A basepose (usually T-pose) has no animation (keyed on a single frame), it just defines the skeleton (bones) from which the animations pull data from. You would need to create custom animations to change how a weapon is held if not using a default style.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: Setting Up A Weapon For BF2

Post by lucasfart »

Allrighty. I'm back with more problems - I've managed to get my mesh ingame just fine, but in the process of texturing my model to use with Ande's I feel like I've completely stuffed it up. What I did was UV my model, added several textures to my model and then divided the meshes, based on the textures used, into separate clusters using the "extract polygons" command (I think). I then added the materials using the Ande's tool and exported.

However, my 2000 vertice model exports as over 20,000, with no textures ingame, and I'm not quite sure why. Here's some pics of my root:
Hidden/Spoiler:
Image
Image
Image
i based my UV'ing on Bandu's tut, which says you should use ctrl + L before actually applying textures. That just makes it a separate cluster doesn't it?
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: Setting Up A Weapon For BF2

Post by ANDEWEGET »

It's most likely a cluster problem, you shouldn't have any Polygon Clusters.
If you've already split the model into chunks which only use one material/texture, don't use CTRL+L.
About the vertices: vertices are not the same vertices as in XSI, they are per poly, that means for every vertex in one polygon there is a unique one in the .msh file.

Code: Select all

O-------O------O
|       |      |
|    1  |  2   |
O-------O------O
These are two polygons, every O is a vertex.
In XSI this geometry has 6 vertices.
In the .msh file it has 8:
For poly 1:
top-left, bottom-left, top-middle and bottom-middle.
For poly 2:
top-middle, bottom-middle, top-right, bottom-right.

BTW, for UVing, you should only once use Get>Property>Texture Projection>_someprojection_ per model.
After that only use the subprojections in the texture editor(acutally the UV editor).
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: Setting Up A Weapon For BF2

Post by lucasfart »

ANDEWEGET wrote:It's most likely a cluster problem, you shouldn't have any Polygon Clusters.
What do you mean by polygon clusters? Do you mean I shouldn't have clusters with separate meshes in them or something? Are there any good tuts for how to do this in terms of BF2, or has it only recently been important, what with your tool and all...
ANDEWEGET wrote: About the vertices: vertices are not the same vertices as in XSI, they are per poly, that means for every vertex in one polygon there is a unique one in the .msh file.

Code: Select all

O-------O------O
|       |      |
|    1  |  2   |
O-------O------O
These are two polygons, every O is a vertex.
In XSI this geometry has 6 vertices.
In the .msh file it has 8:
For poly 1:
top-left, bottom-left, top-middle and bottom-middle.
For poly 2:
top-middle, bottom-middle, top-right, bottom-right.
Thanks for the explanation. I think I get that now. :) But still, I shouldn't be getting 10 times as many when I export, should I?
ANDEWEGET wrote:BTW, for UVing, you should only once use Get>Property>Texture Projection>_someprojection_ per model.
After that only use the subprojections in the texture editor(acutally the UV editor).
Yeah that's what I've been doing for my UV'ing.
Post Reply