### Basic Modeling in XSI updated

This page is in the process of being updated!

Beginning Modeling in XSI

Robert L. Hoffman

Updated by Ace

## Modeling Methods Defined

There are several modeling methods. The most basic method is called the "Box Modeling" method. This can be thought of in the following manner. Imagine if you had a bunch of cardboard boxes. These boxes are one foot by one foot by one foot. Now let's say you stack them three wide by three deep by three tall. You would now have a cube that has a total of nine boxes. Now the beauty of this method is that you can move points on these boxes without causing wrinkles like what would happen with real cardboard. This method uses more than just cubes. In fact, this method can use many primitives such as; sphere, cone, and cylinder are a few of the more commonly used objects.

## Tools

There are several software pieces you will need:

BF2_modtools - This is used to create and edit maps. You need this to test your objects.

Image Editor - GIMP (free), Paint.NET (free) ,Photoshop (not free) *

Text/Code Editor - Notepad++, SciTE, PSPad (all free) *

3D Modeler - XSI Foundation, XSI Essentials, XSI Advanced versions 4.2-5.11 (not free, but 30 day trials are available)

These versions are recommended since they work with the Pandemic Tools exporter.

You could also use XSI Mod Tool 7.5 with ANDEWEGET's ZETools which are both free.

*There are others that aren't listed that work but the basic rule here is: find at least one tool that works, that you are comfortable with.

## Modeling a Simple Object

I will be using XSI Foundation (since the Pandemic Tool's msh exporter work with it).

Let us begin with a simple object. A plain wall is even too simple, so we will start with a wall that can have a door in it. We will make it a double wide door.

In XSI 1 default grid square is 1 meter. So an average human standing with arms stretched will be about two squares high by about 2 squares wide.

With that in mind, let us consider a typical wall and doorway.

Average floor height in a home is about eight feet. Average doorway is about three feet wide by seven feet high. Let’s make the room about fifteen feet wide.

Open up XSI Foundation.

You will have a blank scene.
The upper left is the Top view.
The upper right is the Camera view, change it to User view.
The lower left is the Front view.
The lower right is the Right side view.

Start by selecting Primitives from the Model module on the upper left of the user interface.

Then from the drop-down menu select Null.

You should now see a little plus sign looking icon that is centered at 0,0,0.

Take any of the viewport windows (I usually use top view) and select Explorer or press 8 to bring up a floating Explorer window.

Now, in the Explorer window, right click on the null you just created and select rename or press F2 and name it dummyroot.
This dummyroot will be the master parent to all objects being exported.
For now just select it and hide it by pressing the H key since we don't need to see it in the viewport.

Now we start to create our wall. From the top toolbar, select Primitive, then Polygon Mesh, then cube.
It will create a cube that is 8x8x8 Softimage units and start with the properties box open.
Since walls are generally only about a foot thick, highlight the length 8 and type .33 (point-3-3)

Close the properties box.

The object just created will be highlighted white since it is still selected.

The art_guide.doc provided with Modtools states that all objects should be created with their center at 0,0,0.
We don’t want half the wall buried in the ground. Since we created our dummyroot at 0,0,0 we can adjust our object at will and not worry about it.
Adjustments are done through the Transform panel on the lower right of the user interface called MCP.
It looks like this:

The S is for Scale and the shortcut key is X
The R is for Rotation and the shortcut key is C
The T is for Translate and the shortcut key is V

The first thing we want to do is get the wall to the proper scale.
We do this before moving it, because when you re-scale an object it grows out in both directions.
So click on the S and you’ll now notice three color bars that correspond to the X-axis, Y-axis, and Z-axis. Red, Green and Blue respectively.
Since we don’t want to spend all day stacking one foot boxes to make our wall, we simply stretch the y-axis by a factor of eight.
This should give us our eight foot high clearance.

Now we can stretch the wall to fit our width.
Remember we want the wall to be fifteen feet wide with a double wide doorway. So let’s stretch the X-axis by a factor of 4.5

Now that our object is at it’s proper scale let us move it to the proper location, in the Transform panel click on the T.

adjust the X-axis by -1.7425
adjust the Y-axis by 1.33

It should look like this:

Now in the Explorer window, right click on the cube and select rename or select it and press F2 and call it: leftside

Now a quick and easy shortcut. In the explorer window, right click on 'leftside' and select Duplicate.
Now you should see a 'leftside1' object, and it should be selected.

Now we want to move this to the right side of the door.
Under the Transform panel select the T or press hotkey V and adjust the X-axis to be 1.7425 and verify that that Y-axis is 1.33.
Now you can rename 'leftside1' to 'rightside'.

Now from the Model module select Primitive > Polygon Mesh > Cube.
You will see a new cube with a length of 8, and a properties box will pop up.
Modify the Length to 2
Close the properties box.

Next we want to scale this piece so select the S from the Transform tool panel or press hotkey X.
Adjust the Z-axis to .165
.165 of a 2 block is equal to the .33 of a 1 block that we made the first two pieces out of.

Then adjust the Y-axis to also be .165 and the result should be a cube 6 feet wide, 1 foot high and 1 foot deep. Now you can rename this piece 'top'.

Now we need to translate it into place, so select the T from the Transform panel.
Adjust the Y-axis by 2.4825.
Now all three objects should line up.

You can zoom in by selecting the perspective ( looks like a little camera )

Under this, the main uses are:

Navigation tool or the S key ( You can track (lmb), dolly (mmb), and orbit (rmb) around your objects )
Frame Selected or the F key ( centers viewport on current object )
Frame All or the A key ( centers viewport on all objects )

Now we come to an important part, under the Explorer view, left click and drag all three objects to the dummyroot.
Expand dummyroot to verify that all three objects are under it.

If you are working on a large scale item you can merge objects to reduce the number of objects.
With the 3 objects selected ( leftside, rightside, and top ) from the Model module locate the Create section, then select Poly.Mesh then select Merge.
It will create a new polymesh and open a properties page. Press the Delete inputs button.
Now you can rename your one object to 'doorwall'.
You will need to move this new polymesh under the 'dummyroot'.

This will not reduce poly count but you will have fewer objects to deal with as you now have 1 object instead of 3.

Now is a good time to save your scene.

Save early and often. Make different versions so you don’t overwrite. This can be useful if you make a mistake and have to go back.

Now we will create the collision mesh. Select the 'doorwall' obect from the Explorer view then right click and select duplicate. This creates an identical object.
Rename this new object to 'collision' and move it under dummyroot in the Explorer then hide the collision mesh.

Now right click on the 'collision' object and select Duplicate.
Rename the new object 'x_lowrez' (where x = whatever your object name is) then hide it.
Make sure it is under 'dummyroot'.

What this does is create a low resolution version of your object.
Why do that when it’s such a simple object? Answer, so it is viewable from a distance.

The Battlefront game Zero engine has a near and far scene range ( which can be altered when making maps ) that controls what you see and when.
If you don’t have a '*_lowrez' version of your item then it just disappears at a medium / long distance.

## Texturing a simple object

A simple object can be textured extremely easily; for this example I will use a pre-existing texture.
I rather like this one:
C:\LucasArts\BFBuilder\Assets\Shipped Worlds\Bespin\MSH\bes2_bldg_set05.tga

So I copy it to my desktop and rename it bldg_lego_double_door_wall.tga

To keep things organized you should come up with a naming convention:
Bldg = building
Lego = generic
Double door wall = descriptor

Suggested naming convention
Prop courscant
Weap

You get the point.

Now, inside of XSI Foundation we should still have our object(s) selected. Make sure that the collision object is not part of the selection.
On the Model module under the Get section is Material, select it then select Phong. A properties box will now pop up.
Under the 'Diffuse' section you will see a little plug icon to the right of 'Color'. Click it, then 'Image'. The properties window will change.
Under the Image section click the 'New' button, then 'New From File'. Browse to your selected texture image file, remember mine is on the desktop.

When selected, the color number grid (noicon.pic) will be replaced by your texture image choice. Like so:

Now, under the 'Texture Projection' section click the 'New' button, and then click 'Cubic'. ( for this demonstration cubic should work best, 'planar xy' would also work )
Some choices are self explanatory while others are not. If you have a very complex item then you would select 'Unique UV’s (polymesh)'.

Now if you didn’t merge the objects then the texture would be applied to each box independently. Meaning you would get the two tone on the top box also.

Now you can close the properties box.

SAVE then scene.

Now you have your object(s), a collision mesh, a textured main and lowez mesh.
If you are using XSI Foundation and have the Pandemic Tools exporter click on File>Pandemic Tools [u]> Export Mesh [u].

Adjust the path by clicking the browse button or simply typing in the box.

I will save this to my desktop as bldg_lego_double_door_wall.msh

Then click the Export Selected Models Only button.

## Creating / Editing an .odf

Now that you have your .MSH and .TGA file it is time for the .ODF file.
Copy any exiting prop .ODF or use the text below to create a new one.

`[GameObjectClass] `
`ClassLabel = "prop" `
`GeometryName = "bldg_lego_double_door_wall.msh" `

`[Properties] `
`GeometryName = "bldg_lego_double_door_wall" `
`FoleyFXGroup = "stone_foley" `

Notice that the GeometryName entry under [Properties] doesn’t have '.msh' appended.

Now you have your .ODF file. Place the .ODF file in the ODF folder and the .MSH and .TGA files in the MSH folder.
These folders should be located in data_ABC\Worlds\ABC

Load the editor and put them on a test map. Save and munge. Test your test map.

Notice that the ordnance is in fact impacting on the wall.
Also note that modeling to live scale isn’t user friendly because online players will feel that this is too small.
Especially if there were a roof at that height. Talk about claustrophobia!

## Modeling a complex object

Let’s make a flyable rocket, not too terribly complex, but more involved than a simple wall, door or not.

Start a new scene.
The first thing we do with a new scene is make a null and rename it to 'dummyroot' then hide it.

Now when we create the rocket, we will want to create it laying on it’s side, but when we place it on our map we will rotate it ninety degrees.
This is because rockets "lift off" but if we make it that way in the XSI Modeler, then it won’t fly correctly.

So we start, the biggest part of a rocket is the body. So we create a new primitive cylinder.

We want it round so change the Geometry U Subdivisions to at least 32.

We don’t need it sub-divided so change the V and Base Subdivisions to 1.

Now at a Radius of 1 our rocket will only be 4-6 feet in diameter, so we change the Radius to 3.

At a Height of 4 our rocket would look meager indeed, so we change that to 15.

Now we rotate the object on it’s X-axis by 90 degrees.

At this point, we won’t care about moving the object up out of the dirt, because when we place it on the map we need to rotate it anyway, so might as well move it then.

You may have to frame the selection at this point to view it all.

Now create a new Primitive > Polymesh > Cone with the following settings:
Height 4
U subdivisions 32
V subdivision 1
Base subdivisions 1

Now rotate the cone 90 degrees on the X-axis
Now translate the cone 8.8325 on the Z-axis

In the Explorer you can rename the cylinder to 'body' and the cone to 'nose_cone'.
So it should look like this:

Now for the Flash Gordon esque look, we will make the stabilizers / foils.

Create a new Primitive > Polygon Mesh > Cube with the following settings:
Length .5
U subdivisions 1
V subdivisions 1
Base subdivisions 1

Then scale the cube on the Y-axis by 6, and on the Z-axis by 6

Now translate it on the Z-axis by minus -6, and the Y-axis by 4.45

Now to shape it. Make sure this new cube is the only object selected.

Now from the Model module under Modify click Component and then select Move Point Tool.
Go to the Right viewport and hover over the upper right most point.
Right click on the upper right most point and move it by 3 grid squares to the right. ( left click is free hand move, right click is move left or right ).
It should look like this:

You will still see a point in the upper right corner of the square because it is a cube and only the surface point was moved.
Now select the second point and if you hold down the control key, it will enable snapping as long as it is held.
So while holding the control key down, right click and drag the point to the right and drop it on the point you moved first.

It should look like this:

Now right click and move the upper left point 3 grid squares to the right.

There will still be a point in the upper left, so hold the control key down then right click on that point and move it to the right by 3 grid squares.
It should look like this:

It’s ok, but doesn’t quite look pleasing to me.
We are going to translate both the lower left points, let’s say 3 grid squares to the left and make it look like so:

Ah, much better.

Now under the Explorer view rename this item to 'stabilizer'.

Then right click on it and select duplicate to make a second duplicate.
Select 'stabilizer1' then rotate on the Z-axis 120 degrees.
Select 'stabilizer2' then rotate on the Z-axis 240 degrees.
Translate both 'stabilizer1' and stabilizer2 on the Y-axis to -2.25
Translate 'stabilizer1' on the X-axis to -3.75
Translate 'stabilizer2' on the X-axis to 3.75

It should look like this from the front:

Now we can make the engine exhaust.

Create a new Primitive > Polygon Mesh > Cone with the following properties:
Height 2
U Subdivisions 3
V Subdivisions 2
Base Subdivisions 1

Then close the properties box.
Now rotate the new object on the X-axis by -90 degrees.
Move it on the Z-axis by -8.166

Now in the Model module under Modify click on Component, then select Move Point Tool.

Hold the left control key and right click on the point of the cone and move if left to the bottom of the rocket so it looks like this:

You can rename this object to 'engine_exhaust' and then move it under the 'dummyroot'
Remember, all objects being exported later have to be under the 'dummyroot'.

Make a note here, the co-ordinates of our engine exhaust are:
X = 0
Y = 0
Z = -8.15

( but for our purposes -8 will work better, more described later )

Now lets continue with our Flash Gordon rocket, lets make the laser mounts.

Create a new Primitive > Polygon Mesh > Cube with the following properties:
Length .5
leave all Subdivisions at 1

Close the properties box.

Scale the new cube on its Z-axis by 3, and it’s X-axis by 2
Translate the new cube on its X-axis by 3.4 and it’s Z-axis by 4

Rename this 'left_strut' and move under the dummyroot in the explorer.
Highlight the 'left_strut' and right click then select Duplicate.

Rename the 'left_strut1' to 'right_strut'.
Now translate the 'right_strut' on it’s X-axis to -3.4
It should look so:

Now for the lasers.

Create a new Primitive > Polygon Mesh > Cylinder with the following properties:
Height 2
U Subdivisions 32
V Subdivisions 1
Base Subdivisions 1

Rotate on it’s X-axis by 90 degrees.
Translate it on it’s Z-axis by 4 and it’s X-axis 4.25

In the Explorer rename this object to 'left_laser_housing' and move it under the dummyroot.

Right click on 'left_laser_housing' then Duplicate it and rename it 'right_laser_housing'.
Translate it on it’s X-axis to -4.25

Now for the barrels.

Create new Primitive > Polygon Mesh > Cylinder with the following properties:
Height 1
U Subdivisions 32
V Subdivisions 1
Base Subdivisions 1

Rotate on X-axis 90 degrees.
Translate on X-axis 4.25 and on Z-axis 6

Rename this object to 'left_laser' and move it under the dummyroot.

Duplicate the object then rename the duplicate to 'right_laser' and translate it’s X-axis to -4.25

The front and side should look like this:

Now for the cockpit.

I like to do things a wee bit different, so here’s one way of doing it.

Create a new Primitive > Polygon Mesh > Sphere with the following properties:
U Subdivisions 32
V subdivisions 32

Now translate it’s Z-axis 5.5 and Y-axis 2
Now change the size on it’s X-axis to .5

It should look like this:

Rename the object to 'windowglass' and move it under the dummyroot. It isn’t that big of a deal when objects intersect each other.

Ok now since this is a pilot-able vehicle, we need to add some labels to parts.

Create a new Primitive > Polygon Mesh > Cone with the following properties:
Height .25
Subdivisions 4
Subdivisions 1
Base Subdivisions 1

Close the properties box.

Translate the object on it’s Z-axis to 5.5 and it’s Y-axis to 2.75
Rename this object to 'hp_active' and move it under the dummyroot ( this will be used later )

Duplicate this object 6 times.
Rename the duplicates as follows:
hp_damage_1
hp_damage_2
hp_damage_3
hp_smoke_1
hp_laser_01
hp_laser_02

(these are used by the .ODF much the same as 'hp_active')

Select the 'hp_laser_01' and rotate it on it’s X-axis 90 degrees.
Now translate it on it’s Y-axis to 0, X-axis to 4.25 and it’s Z-axis to 6

Select the 'hp_laser_02' and rotate it on it’s X-axis 90 degrees.
Now translate it on it’s Y-axis to 0, X-axis to -4.25 and it’s Z-axis to 6

So our laser points are at X= 4.25/-4.25, Y=0 and Z= 6. Remember that for later.

Select the 'hp_damage_1' and translate it’s X-axis to -2.2, Y-axis to 2.2 and Z-axis to 0
Now rotate it on it’s Z-axis by 45 degrees.

Select the 'hp_damage_2' and translate it’s X-axis to 2.2, Y-axis to 2.2 and Z-axis to -3
Now rotate it on it’s Z-axis by -45 degrees.

Select the 'hp_damage_3' and translate it’s X-axis to -1, Y-axis to 2.9 and Z-axis to -6
Now rotate it on it’s Z-axis by 22.5 degrees.

Select the 'hp_smoke_1' and translate it’s X-axis to 1.7, Y-axis to 1.7, and Z-axis to -8
Now rotate it on it’s X-axis by -55 degrees, it’s Y-axis -20 degrees.

Now under the Explorer view, click once on the 'hp_active', then hold down the left control key and slowly click on all the other 'hp_*' objects ( 7 total ); when all 7 are highlighted press H to hide them. All 7 of these should now have a yellow 'H' on them in the Explorer view.

Now from the Explorer view, while holding down the left control key select these:
body
cockpit_glass
engine_exhaust
left_barrel
left_laser_housing
left_strut
nose_cone
right_barrel
right_laser_housing
right_strut
stabilizer
stabilizer1
stabilizer2

When these 13 objects are highlighted, on the Model module under the Create pane select Poly.Mesh and then click on Merge.

Close the properties box.
Rename the polymesh to 'collision' and move it under the dummyroot.
With 'collision' still selected press the 'H' key to hide it.

Right click on 'collision' and select Duplicate.
Rename 'collision1' to 'rocket_lowrez'.
With 'rocket_lowrez' still selected press the 'H' key to hide it.

Here is a good time to save your scene file, as well as export it and test it as a prop.

I exported this as 'any_fly_rocket.msh'

any = usable by any of the sides
fly = it isn’t hover or walker you know ;-)
rocket = well duh :-P

Then just whip a quick prop .ODF.

One thing, if you are using a different .ODF make sure you have 'metal_foley' and not 'stone_foley'.
Here’s how it looks in-game so far:

Coming along nicely.

## Texturing a complex object

Now it’s time to texture it so let’s first start with a blank 512x512 tga file.

You can then you use any graphics program you want to make the texture.
For starters I just used Microsoft Paint then ported it over to Photoshop.
I saved the file as 'any_fly_rocket.tga'

Now that we have something to work with, we can apply it to our model.

Select all of the body parts.

Change the 'Model' module to the 'Render' module either from the module header or by pressing the 3 key on the keyboard (not the numpad).

Under the Get section select Texture then Image.
Browse to your file and select it.
Then under the Texture Projection press the New button and select Planar XY

This is not complicated, but I’m not going to take 6 plus pages to explain. So here’s the short story.

Now select 'body' and press alt+7 to bring up a floating Texture Editor window.

In the upper left corner of the Texture Editor you will notice an icon like an arrow or pointer. This is the select tool.
Click it, then draw a box around all points of the object.
To the right of the Texture Editor tool bar you will see an S, R, and T. Yep you guessed it, scale, rotation and translation.
Now that the points are selected you can press the S button and scale it down then hit T and translate it to fit the area of the color map you want.

Here are the locations of the other items:

All Three Stabilizers, Engine Exhaust, Left and Right Laser

Left and Right Laser Housing, Left and Right Strut, Nose Cone

Select all objects except nulls and press Freeze all transforms then branch select (middle mouse click) dummyroot
Now you can use the Pandemic exporter to export the scene objects to a .msh file.
File>Pandemic Tools>Export Mesh

Now of course if you put more time in and had a hole in the cylinder you could put a cockpit interior and controls. But that’s a lesson for the Advanced Modeling Techniques

Since this only has two lasers and one engine, it most closely resembles a TIE Fighter.
So now that things are getting along, we need to fetch all the .ODFs regarding the TIE fighter from:
assets\sides\IMP\ODF folder

So we copy the contents of 'imp_fly_tiefighter.odf' to 'any_fly_rocket.odf'

First we have to change the mesh call out, so replace 'imp_fly_tiefighter' in both Geometry locations.

Next we put a // (2 forward slashes) in front of the 1st person view. ( Later on, when we make our own 1st person view, we can call it out )

Scrolling down to the weapons section, we have to change the 'hp_fire_1' to 'hp_laser_01' and change hp_fire_2 to hp_laser_02.

For the collisions, have one line state this
collision = "collision"
rem out duplicate call-outs by placing a // at the line beginning.

NOTE * you can make your own chunks and call them out instead of using the tie chunks. That will be discussed in Advanced Modeling.

Save the .ODF file

Here are the files that go into your test\MSH folder:
any_fly_rocket.tga
any_fly_rocket.msh
imp_fly_tiefighter_chunk1.msh
imp_fly_tiefighter_chunk2.msh

Here are the files that go into your test\ODf folder:
any_fly_rocket.odf
imp_weap_fly_tiefighter_cannon.odf
imp_weap_fly_tiefighter_cannon_ord.odf
imp_weap_fly_tiefighter_cannon_exp.odf

So move them there, load the editor and test, test, test !

Here is what she looks like at the start of the game.

And here she is in flight with weapons working;

And yes, on the ground you can see the quick and dirty snub fighter and the A-Wing I designed for the game.