Jump to content
Official BF Editor Forums

Creating A Simple Structure


Recommended Posts

Hey all,

[R-DEV]Outlawz wanted me to show him how I go about making statics structures so I'm going to show you some of my methods of working and all the steps to making a static while making this Garden Shed 8-)






In this tutorial I will be mainly showing you my methods of working although everyone has there own style that works for them, this one works for me. The important thing is you get a good quality model at the end of it but different ways of working are faster and give you a better result :)

I will also be taking you though all the steps of making a static object from start to finish.

If your brand new to Modelling then I recommend you read over these two tutorials:

3DsMax9 Introduction: http://images.autodesk.com/adsk/files/introduction.pdf

3DsMax9 Modelling: http://images.autodesk.com/adsk/files/modeling.pdf

After going though thous tuts you should be more than ready for this tut :D

I have broken this tutorial up into sections so that if you only need to refer on to how to export an object, you can simply go to the exporting step. The steps are:

  • Step 1: Setup
  • Step 2: Modelling
  • Step 3: Texturing
  • Step 4: Levels Of Detail (LODs)
    • LOD1
    • LOD2
    • LOD3
    • LOD4
    • LOD5

    [*]Step 5: Collision Meshes (COLs)

    • col0
    • col2
    • col1
    • col3

    [*]Step 6: Exporting

    [*]Step 7: Coding

    • Materials
    • Cull Distances
    • LOD Distances
    • The Anchor
    • Lightmaping test


Step 1: Setup

First of all I'm going to start off with a normal fresh max scene with its units set to Metric (Meters) (and yes even your Imperialists Americans need to set it up to Metric since BF2 is a Metric game and setting up your model to be made in Metric will mean it will import into the game at the same scale. Set it to Inches or something and your model will be miles to big or small and will need to be rescaled, which is totally shitty):


To setup your units go to Customize > Units Setup.


Now when ever modelling a static structure I would always advice your MODEL ON THE GRID! This is a very important lesson you should learn that will make it much simpler for you to model your statics and you should only come off the grid if you have to, but its better to make the static slightly less accruate than to come off the grid so I would only come off the grid if I'm making a curved edge or something but even then I would most likley stick a bit to the grid.

As such, its very important we setup our grid so that we can work with it easily with our static. To get our grid settings up, go to Customize > Grid and Snap Settings and click on the "Home Grid" tab, or alternatively you can right click on the "Snaps Toggle" button and then click the "Home Grid" tab and then you can set your grid to w/e measurements you want. Since this Static is fairly small I do not want my grid to be large, but then again I dont want it to be too small either although you can change your grid setup as your working if you need it to be more detailed or less detailed. Since my static is around 2m by 3m, I'm going to set up my grid to be 0.1m (ie, 10cm).


Next thing that I would advise you to do is set up your User Interface to have the "Snaps" bar:


To do this, right click on your normal bars and you will see a button called "Snaps", check that and you will have it apart and move it to a place you like :)


This bar will basically mean you can easily switch from grid snap to vert snap or any other type of snapping quickly without having to open your snapping settings the entire time, although for this static we will most likley be mainly using Grid snap, we might use a bit of vert snapping at some point.

Link to comment
Share on other sites

Step 2: Modelling

The first bit we need to model is naturally the foundation, go to your top view and zoom out far enough so your sub grid line can be seen (ie, 1m by 1m grids) and then drag out the box so that its around the size you want while keeping it as centred to the middle of the grid as possible, in my case, 3x2m so its not excatly centred but close enough.


Now normally here I would centre my box to the very middle of the grid but for this case of simplicity I will stay on the grid and we will centre the object to the grid later.

So here's my shed so far, not much to see but its roughly the right size we want it.


Now since we want this box to be just the foundation, it being 3m tall isn't really an option so change its height to -0.6m. Doing it by -0.6m because I want to foundation to be 1/2 a meter underground and we want the foundation to be 10cm about the ground, which then will ensure even on not 100% flat terrain it will all be fine but for now, we will keep the box where it is.


Convert the Box to Editable Poly like so:


And then select the top face with the face selection tool:


Now to make the walls we are going to use the Bevel tool, click the little window button to the right of the Bevel button and a window will pop up:


Set the Height setting to 0 and then set the "Outline Amount" to how thick you want your walls to be, in my case, I want my wall to be 0.1m thick, which is ye very thick for a wood wall but lets not go into that I want to keep things simple here :P


Now if we look at our foundation we will see we have a nice outline for a wall and a nice inside floor:


So what we want to do now is select the outside top faces and then extrude them up to form the walls of our shed :)



I'm going to set my walls to extrude 2m up so they are above the height of a player and that's around the height we need it, since we want our door to be between 1.8 and 2m high.


Click Ok and then we are going to make the front pointy bits under the roof :)

Select the front and back top faces like so and then we are going to extrude them 0.5m up:

tut_simple_structure28.jpg tut_simple_structure29.jpg

Click Ok and then click the edge selection tool and select the top edges we just crated.


Then hit the "Collapse" button and it will turn it into a nice point :)



Now if we take a look at the front view we can see that everything isn't yet perfect on the pointy bits, as the inside edges are not at the same angle as the outside ones:


To get this right, we need to select the verts of the inside side edges and move them up into position so they are at the same angle as the top ones.


Now there are a few ways of doing this, some very accruate but I'm going to show you the simplest way which is just to move them up. Turn off snapping as this will not work here and move the verts up until they meet the the other line as close as you can get it, zoom in as far as you can on a single vert and drag it up until its in the right place:

tut_simple_structure37.jpg tut_simple_structure38.jpg

Now if we look in the 3D view we will see everything is as it should be :D


Now with that done, lets start on making the doors and windows. Lets start on the Door, Select the edge selection tool and select the top and bottom edges on the face where we want the door to be, both on the inside and on the outside:


Then hit the "Connect" button and set the segments you want to 2.



Click Ok and we have the edges to our door :)

Small problem right now is that our edges on the inside are in a different place from our outside edges, and the edges aren't excatly where we want them to be.


Turn Grid Snapping back on and move the edges outside edges ontop of the inside ones since the inside ones are on the grid, then move both edges out to where we want them.


We want our door to be 0.8m wide so make sure each edge is 0.4m from the centre.


Now we have the sides of our door right, the top bit still needs a little bit of work as the inside top edge is higher than the outside one as what we did with the pointed roof. As such, just move down the inside top edge to meet the outside top edge :)


Now that the door is all lined out, lets select the front and back faces of the door and Detach them as a separate object as we can then make the door off them later.




Then once you have done that select the object you have just detached and hide it as we dont want to see it for now :)

tut_simple_structure53.jpg tut_simple_structure54.jpg

Which then leaves us with this:


As you can see right now we are missing the door frame and have a few missing faces we can see though. To correct this is quite simple, Select the Border selection tool, and select the inside and outside borders of the door that have been left like so:


Then hit the "Bridge" button and it will crate faces between the two borders, basically "bridging" them ;)



Link to comment
Share on other sites

Now with the Door Frame done, lets move onto the Window Frames where we will basically do the same things again as we did to make the door, although this time we are going to start off with selecting the side edges and connecting them:

tut_simple_structure59.jpg tut_simple_structure60.jpg

Like the Door Frame, the edges are not excatly on top of each other so we need to put them on top of each other, but this time none of them are on the grid to start off with so just move each one onto the grid to start with is the simplest way of doing this.

tut_simple_structure61.jpg tut_simple_structure62.jpg

Then move them up into where you want the windows to be, for me I want the bottom of the window to be 1.1m up from the floor and the top to be 0.2m off from the top, giving me a 0.7m high window frame :)


Now with thous edges selected, hit the Connect tool again and this time we want to give this bit 4 segments, as we have two windows.


And again, the edges are offset abit so put each one on top of the other and then move them to where you want them like so:


Now after checking the ref again I can see there is a nice frame around the window we should try and make, as such, we should move the borders of our windows out by 0.05m. As such I'm going to lower my grid down to 0.05m and then move all the outside borders out like so, but keeping the inside ones the same as the frame work is only on the outside:


tut_simple_structure68.jpg tut_simple_structure69.jpg tut_simple_structure70.jpg

Once you have done that, select the outside faces of your windows and then with the bevel tool, bevel your windows in by a height of 0 and an outline amount of -0.05m to crate your window frame :)


Now select faces around your window and we will extrude that by 0.025m to form your window frame


Now I'm going to select the outside window faces and detach them and call them "Window Glass" as I will make the glass off of them later, then hide them to keep them out of the way, leaving me with some nice windows

tut_simple_structure79.jpg tut_simple_structure80.jpg

Now select the inside window faces and delete them.

tut_simple_structure81.jpg tut_simple_structure82.jpg

Then with the Border Selection tool, select the inside and outside borders and bridge them like we did with the Door Frame :)


Now your probably wondering why I've left this edge here that's at the moment useless and taking up unneeded tris:


Reason being if we look at the ref we can see each window has its own middle frame bit which we are going to make here by first with the edge selection tool, selecting the top and bottom edges of these faces and then connecting them with 2 segments, but also this time we are going to use the "Pinch" tool with a value of -75 to keep our segments closer together so that we dont need to manually move them later :)

tut_simple_structure85.jpg tut_simple_structure86.jpg

Then selecting the new faces, click the bridge tool and your form the middle bit of the frame :)

tut_simple_structure87.jpg tut_simple_structure88.jpg

Now with our window frame done we need to do a little bit of hand optimizing on them :)

Select the Vert selection tool and use the "Target Welding" tool, target weld all the unneeded verts into appropriate places :)

tut_simple_structure89a.jpg tut_simple_structure89.jpg tut_simple_structure90.jpg

Onto the Roof, and to do this the best way is just to make a new box, shove it to the top of the roof, put in the dimensions you want and give it 2 width segments and then covert it to editable poly :)


Once converted to editable poly, select the end verts and drag them down to meet the lower part of the roof while overlapping it a little :)

tut_simple_structure94.jpg tut_simple_structure95.jpg

Now we should have done this a little earlier before making the roof but I forgot since I was writing this tut, but before we go any further we should delete the hidden faces on the top of the roof of the main object that we are putting this new object over, as such, concealing them and making them wasted polys if we leave them there. Hide the roof you have just made and select all the top polys, make sure you dont select the top of the door frame or any polys you need and then delete the polys once you have all the ones you want selected.

tut_simple_structure96.jpg tut_simple_structure97.jpg

Then unhide your roof again and we can continue with that.

Right now your roof's smoothing groups are incorrect and as such its trying to smooth the top of the roof we dont want, simplest way to fix this is to select the entire roof and auto smooth it with a 45deg threshold and that should fix the smoothing :)

tut_simple_structure98.jpg tut_simple_structure99.jpg

Now lets make the front and back bits to the roof, select the front and back faces like so:


And then with the Bevel tool, set a bevel height of 0 and an Outline amount of 0.025m.


Click Ok then extrude it by an amount of 0.02m and we have formed a nice front bit


Now if we really want to make the Diamond thing on the front bits we can as well pretty simply by just making a Box and rotating it 45degs and then scaling it up like so:

tut_simple_structure104.jpg tut_simple_structure105.jpg tut_simple_structure106.jpg

Then clone it to the other side of the roof and attach them onto the roof:


With the Roof now complete, lets move onto the Door itself

Unhide the Door and the first thing we are going to do is select the inside face of the door and move it 0.05m closer to the front face of the door to make it thinner as having the door this thick isn't so good.

tut_simple_structure108.jpg tut_simple_structure109.jpg

Now with the Border selection tool, select all the borders of the door and bridge them, giving the door edges


Now lets move the pivot of our door, click the "Hierarchy" tab (right of the Modifier tab) and click the "Affect Pivot Only" Button.


And then move the pivot to the point where we want the door to be rotated around:


Now if we rotate the door, it will rotate on where its hinges should be (turn off affect pivot first)


Now to make the Hinge models.

First lets make a box for the Hinge base:


And then anouther box for the other bit of the hinge that will attach to the door:


And then a 3 sided cylinder for the join:


And then I'm going to modify the door's Pivot to match with the hinge using Vert snapping:


Now I'm going to select the end hinge bit and covert it to an editable poly:


And then I'm going to take the end face and vertically scale it down to 30%, also note I have the % snapping on with it set to snap at 10% intervals.


Also dont forget to delete the back faces:

tut_simple_structure122.jpg tut_simple_structure123.jpg

And when that's done you can clone them down into position:


Link to comment
Share on other sites

Onto the door handle which starts off with a simple box:


And then anouther box ontop which you extrude out and optimize into this (this is how pretty much all BF2 door handles are done) and make sure you delete the back faces off this handle and the box its on.


Which then should leave you with this:


Now the next step is attaching all these bits onto the door itself:

tut_simple_structure129.jpg tut_simple_structure130.jpg

Then hide unselected so all you can see is the door and we are going to fully weld up these bits too the door so there is no zfighting issues


First thing we want to do is weld up this side since the hinges are right on the edge and as such, we need to do this bit first before touching the front of the door. Delete the side of the door frame and then which ever way you prefer as long as it gets the job done right crate a new face there which has all the verts of the hindges included so you end up with 8 tris on that side. I'm using the face creation tool since I know it will get the job done right.

tut_simple_structure133.jpg tut_simple_structure134.jpg

Now onto the front, delete the front face and then we can weld up all the objects.


First thing we are going to do is manually bridge the edges. Select the edge tool, make sure no edges are selected and then click the bridge button, then kinda like target welding, click on one edge and then click on anouther edge you want to bridge a face too like so to all these bits:

tut_simple_structure138.jpg tut_simple_structure139.jpg tut_simple_structure140.jpg

Now with all that done with the border tool click the border of the face missing on the door and the border of the door handle's base and click the bridge button and it will complete the faces :)

tut_simple_structure141.jpg tut_simple_structure142.jpg

Also as I forgot to before, we should detach the Door handle and its base as a clone, and the mirror it to be on the other side of the door like so:


And then attach it to the door by delete the door's inside face and then selecting both the borders and bridging them :)

tut_simple_structure145.jpg tut_simple_structure146.jpg tut_simple_structure147.jpg

And then we have our finished door! :D


We do have one final task with the door, well more its hinges is to attach these bits onto the shed:


So hide unselected bits (after selecting the shed as well) and then attach the boxes to the shed:


Then we basically do the same thing as we did with the hinges on the door

tut_simple_structure152.jpg tut_simple_structure153.jpg tut_simple_structure154.jpg tut_simple_structure155.jpg

tut_simple_structure156.jpg tut_simple_structure157.jpg tut_simple_structure158.jpg

Then the final thing for the hinges is attaching these Cylinders onto the main shed object, we dont want them rotating with the door will look crappy.


So now the main part of our shed is complete:


Although I feel we should add a little bit more detail to it since the inside is pretty bear, so a few shelves and the odd tool might help a bit

Nice little box to start with:


Clean it up with deleting hidden faces:


And then for some simple brackets start off with a box:


And move the end vert to here to make it look more like a bracket and then clean up the hidden faces:


And clone the bracket into more places:


And then lets clone the whole shelf up so we have 2 sets of shelves


Now you could weld these up to the wall although you only really need to do it for the bracket since that's the only thing that will z-fight but since this is an interior object and will only be seen at any distance though the windows and will be deleted out in something like lod2 anyways there isn't really much point. As such, all I'm going to do is attach them and leave them as separate elements :)


Now I have an Axe lying around that matt.b made ages ago so going to put that in my shed as my first tool

tut_simple_structure168.jpg tut_simple_structure169.jpg

Now a quick spade, simple cylinder combined with a box to start with:


Then going to convert the handle into a poly, and going to use the quick slice tool to cut right though the mesh at the point I want with grid snap on too leaving a nice clean cut :)


Then I'm going to take this bottom face here and collapse to form a point:

tut_simple_structure172.jpg tut_simple_structure173.jpg

Then I'm going to move the point back and down to form a nice join.


Then for the tip of the spade sharp by collapsing the edges:

tut_simple_structure175.jpg tut_simple_structure177.jpg

And we end up with a nice low poly shovel:

tut_simple_structure178.jpg tut_simple_structure179.jpg

And then I made this rake pretty much in the same way, was tempted to make the spokes via a plane and an alpha map but went with poly ones since they aint that much and can delete them off in the lods pretty easily, can give the lod1 a flat poly one. I also made the spokes by making one, did a basic on UVing it (so I didn't have to UV each one sepratetly later) and then used the Array tool to clone them in both directions.

tut_simple_structure180.jpg tut_simple_structure181.jpg

Think that's going to be all the tools I'll make.

One last thing we need to do for this model thou is to delete the very bottom face of the foundation as that's not going to be seen.

tut_simple_structure182.jpg tut_simple_structure183.jpg

Another last thing is the glass, which first of all I'm going to move a little bit towards the camera by 0.01m and then going to clone as a copy, then going to apply the Normal modifier to flip the clones faces so the glass can be seen on the inside of the shed as well as the outside, then take the normal glass, attach the clone with flipped faces, weld the verts and redo the smoothing, then I'm going to for now apply a max material with 50% opacity:


Then our shed model is done at 711 tris, one of the lowest poly models I've made for a long time hehe.


Link to comment
Share on other sites

Step 3: Texturing

Now I'm not going to re-write a tut I've done so please make sure you read this tut here on how to texture static objects using texture pallets: [static Object Tutorial] The Very Basic of Texture Palettes

Textures I've Used:

[u]Material 1:[/u]
Colour: objectsstaticobjectsprtexturesboards_v2.dds
Detail: objectsstaticobjectsprtexturesnull_de.dds

[u]Material 2:[/u]
Colour: objectsstaticobjectsprtexturesboards_v4.dds
Detail: objectsstaticobjectsprtexturesnull_de.dds

[u]Material 3:[/u]
Colour: objectsstaticobjectsprtexturesboards_v3.dds
Detail: objectsstaticobjectsprtexturesnull_de.dds

[u]Material 4:[/u]
Colour: objectsstaticobjectscommontexturescommon_01_c.dds
Detail: objectsstaticobjectsprtexturespainted_metal_de.dds
Detail Normal: objectsstaticobjectsprtexturespainted_metal_deb.dds

And the end result:

tut_simple_structure199.jpg tut_simple_structure197.jpg tut_simple_structure198.jpg

I have made a few model edits from before as well like I modelled some new edges so I could put in a door frame with the textures and also chamfered the top of the inside roof so I could put a beam up there but other than that model has pretty much not changed :)


Link to comment
Share on other sites

Step 4: Levels Of Detail (LODs)

for anyone who isn't familiar with LODs I will go over them quickly.

Basically a LOD or Level Of Detail, are basically a sub objects which involves decreasing the complexity of a 3D object representation as it moves away from the viewer or according other metrics such as object importance, eye-space speed or position. Level of detail techniques increases the efficiency of rendering by decreasing the workload on graphics pipeline stages, usually vertex transformations. The reduced visual quality of the model is often unnoticed because of the small effect on object appearance when distant or moving fast. And yes I did nick that from the wiki :P

To put it more simply, they are basically simpler models that are seen at a distance so your gfx card dosen't have to work so hard on rendering tiny little details like in our case, the door hinges when you can't even see them as your so far away. I will go into more detail on them when I make them.

We will first start by completing our main mesh, aka "LOD0" so that its ready to go ingame. First we want to rotate our door so that its open so people can get into our shed, so select the door, and with the rotate tool, and rotate it to where your happy with it, for me 155degs seems good. Small tip, I always rotate my objects with 5degs snap on (with a few exceptions) so that if so its easy to find the exact rotation I rotated it later. Rotating a door in free rotation can make it pretty much impossible to find out how much you rotated it which aint good if you want to do something to do the door later.


Next select your main model, and then go to the "Attach list" button and attach all the items except your Window Glass model, that needs to stay separate and I will go into why later. If it asks about Attaching options, make sure "Attach Material IDs to Material" the "Condense Material and IDs" is also checked and then click Ok.

tut_simple_structure208.jpg tut_simple_structure203.jpg tut_simple_structure204.jpg tut_simple_structure209.jpg

Hide unselected and then lets rename our main shed model to "LOD0_garden_shed01" and then I'm also now that my model has a texture on it, going to set its colour to black so that all the lines on the edged faces or wire are black and as such, nice and easy to see :)



Clone the object as a copy and make sure its called "LOD1_garden_shed01", it will try to rename it as "shed02" so make sure you call it shed01 again and rename lod0 to lod1.


Once you have done that, hide unselected and we can start working on our LOD1 model. LOD1 is the first lod seen when moving away AND, more importantly its the LOD that low gfx users see even up close so you can't remove anything from the LOD that will fundamentally change how its viewed up close and could impact on gameplay so you can only really remove little details and optimize bits.

So making sure you have your LOD1 model selected and then the first little bit of detail we can easily remove to start with are these little bit on the hinges, select and delete them:


With both door handles, select the inside edges and then collapse them like so:

tut_simple_structure214.jpg tut_simple_structure215.jpg

Next point of call, collapsing these edges on the top of the shovel:


On the shelve brackets, select all the inner edges and collapse them, small tip, select on edge on each bracket then hit the "Ring" button to select the other edges, more about this subject in this tut here: http://www.realitymod.com/forum/f189-modding-tutorials/80751-modelling-tutorial-smoothing-un-smoothing-cylinders.html

tut_simple_structure217.jpg tut_simple_structure218.jpg tut_simple_structure219.jpg

Select the edges on these front bits and collapse them, can use the ring selection tool again here:


We can collapse these front/back bits of the roof too:

tut_simple_structure221.jpg tut_simple_structure222.jpg

Just after you do this since is quite a large bit of the object, select the front faces (starting with the front, once done the front do the same on the back), unhide the lod0 model for a sec and move the front bit (then the back bit) to there front (/back) of the lod0 face like so:

tut_simple_structure223.jpg tut_simple_structure224.jpg tut_simple_structure225.jpg

Hide unselected and then on the back side of the middle window frame bit, select its back edges (you can't use the ring tool here btw would select more than you want) and then collapse them, as this will look the same from the outside (which the high gfx user is going to see from a few meters away) just the low gfx user who might be inside will have a little less dimension to it, but if he's worried about that, he should buy a new computer :P

tut_simple_structure226.jpg tut_simple_structure227.jpg

For the Rake I'm going to select one edge of all the 3 sided spokes, and collapse them like so, and since some after it have a few smoothing problems, reselect them all and re-auto smooth them :)

tut_simple_structure229.jpg tut_simple_structure230.jpg tut_simple_structure231.jpg

Also anouther thing we can do to the rake's spokes is delete the downward facing faces as they can't be seen unless your under the floor, so selecting them all then deleting them, only leaving the top faces will work well :)

tut_simple_structure232.jpg tut_simple_structure233.jpg

One other large optimization we can do is turn our 3D hinges into 2D hinges by just target welding all the verts back on themselves like so :)

tut_simple_structure235.jpg tut_simple_structure236.jpg tut_simple_structure237.jpg

One problem with doing this thou is that it leaves quite a big gap between the door and the shed so I'm going to bring back thous round hinge bits we deleted off the lod1 at the very start as that will close up the gap. To do this, unhide LOD0, select the round hinge bits, detach them and make sure you detach them as a clone, hide selected, select lod1 again and then attach "Object01" or w/e you called your round hinge bits back onto lod1.

tut_simple_structure238.jpg tut_simple_structure239.jpgtut_simple_structure240.jpg

As we can see now its filled up the gap nicely, but I still think we need to optimize these round bits by deleting there top and bottom faces so select them and then delete them, even thou it leaves a missing face, lod1 people wont notice it as its such a small face and it wont even effect gameplay :)

tut_simple_structure241.jpg tut_simple_structure242.jpg tut_simple_structure243.jpg

And we should also do the same with the door handle base, with target welding the verts back so its 2D :)

tut_simple_structure244.jpg tut_simple_structure245.jpg

One small problem with this is that now the door handle itself is floating off the door so we will want to select the back edges with the border tool and move them back onto the door :)

Now if you select it as it is, since the door has been rotated 155degs you can no longer drag it back along an axis, to solve this, change your transformation method to "Local" and then you should be able to drag it back over the axis :)

Also you will want to change it back to View afterwards so other stuff dosen't get screwed up since local transformation dosen't work for everything, epically not verts.

tut_simple_structure246.jpg tut_simple_structure247.jpg tut_simple_structure248.jpg tut_simple_structure249.jpg

We can optimize is this axe head, we can collapse the end here:


And about the last thing I can see we can do is removing these top verts on our tool handles by selecting them and hitting the "Remove" button (or the back space button on your k/b for short), but then we also need to give the top faces there own smoothing group:

tut_simple_structure251.jpg tut_simple_structure252.jpg tut_simple_structure253.jpg tut_simple_structure254.jpg

In all we removed an impressive 200tris, getting it down from LOD0's 709tris to 509tris without changing the object that much visually.



Like LOD1 we will start off by cloning the last LOD we made as a copy, in this case LOD1. Select LOD1, clone it as a copy and make sure you call it "LOD2_garden_shed01", then hide unselected so your just left with your LOD2 model.

First we should delete all little bits that wont be seen, at a mediumish distance from outside of the shed, like these brackets:


and the head of the rake:


and the back faces of the Axe, since no one is able to get at an angle without being inside the shed to see these:

tut_simple_structure258.jpg tut_simple_structure259.jpg

Can collapse the edges on the shelves:

tut_simple_structure260.jpg tut_simple_structure261.jpg

Can collapse the end of the door handles:

tut_simple_structure262.jpg tut_simple_structure263.jpg

For the tool handles we can make them 3sided by collapsing 4 of there edges:

tut_simple_structure264.jpg tut_simple_structure265.jpg

We can also delete this end vert on the shovel:

tut_simple_structure266.jpg tut_simple_structure267.jpg]

Can collapse these edges on the Axe:


and then can select these edges, remove them, then remove the verts that are left to make it a nice strait handle

tut_simple_structure270.jpg tut_simple_structure271.jpg tut_simple_structure272.jpg

Then we can remove these top faces of the handles:


And also going to remove these faces of the axe (forgot to remove the back ones, thought I might leave the top ones but changed my mind).


Going to remove the following edges so then I can remove the following verts:

tut_simple_structure276.jpg tut_simple_structure277.jpg tut_simple_structure278.jpg

Next thing is to target weld the window frames back on themselves like so:

tut_simple_structure279.jpg tut_simple_structure280.jpg

Then we want to make the middle part of the frame 2D so first remove these edges off of each one:


Then remove these verts

tut_simple_structure183.jpg tut_simple_structure184.jpg

We can collapse these edges on the end of the hinge arms to make them pointed

tut_simple_structure286.jpg tut_simple_structure287.jpg

We can now remove these hinge bits too


And think there isn't really much else we can remove from LOD2 so here it is at 318tris.


Link to comment
Share on other sites


So again like we did for LOD1 and LOD2, we are going to clone the last LOD (LOD2) and call it "LOD3_garden_shed01" then unhide selected, leaving only your LOD3 model to work on.

First thing we can do for LOD3 is remove all these elements:


Then we can remove all these elements off the door handles:


Remove all these edges:


And then remove all these verts that are left over:


Remove all these edges:

tut_simple_structure296.jpg tut_simple_structure294.jpg

And then remove all the left over verts again:

tut_simple_structure297.jpg tut_simple_structure298.jpg

Select the faces of the middle parts of the window frames and delete them and then select and delete the left over verts since this part of the frame wont be seen at a distance.

tut_simple_structure299.jpg tut_simple_structure300.jpg

We can now select the edges of this top beam bit I crated in the texture process and collapse them and then we can optimize the verts by target welding them on the front and back:

tut_simple_structure301.jpg tut_simple_structure302.jpg]

We can also remove the edges for this door frame:


And I would also crate some new edges to the corners to make sure it dosen't screw up later on export or anything:


And then that should be it for LOD3, coming out 162tris :)



So again like we did for LOD1, LOD2 and LOD3, we are going to clone the last LOD (LOD3) and call it "LOD4_garden_shed01" then unhide selected, leaving only your LOD4 model to work on.

So first lets make the door flat by collapsing its edges (will probably need new smoothing groups after that):


Target weld the roof verts onto the end bits:

tut_simple_structure308.jpg tut_simple_structure309.jpg

Select the edges of the window (note, you can select one edge on each then use the loop selection tool to select them all) and then we want to pull the frame back to be level with the rest of the wall so when we optimize, the wall is still fat.

tut_simple_structure310.jpg tut_simple_structure311.jpg

Select the outer edges of the window frame like and remove them, then optimize the verts up by removing unnecessary verts left over.

tut_simple_structure313.jpg tut_simple_structure315.jpg tut_simple_structure316.jpg

Now lets make the window frame 2D by target welding the inside verts onto the outside ones:

tut_simple_structure317.jpg tut_simple_structure318.jpg

And the same with the Door Frame:



So again like we did for LOD1, LOD2, LOD3 and LOD4, we are going to clone the last LOD (LOD4) and call it "LOD5_garden_shed01" then unhide selected, leaving only your LOD5 model to work on.

Normally I wouldn't do upto 5 lods, epically for a smallish object like this but I feel its kinda needed.

First of all I'm going to delete the door:


I'm then going to collapse the roof:


and then I'm going to delete the interior:


then I'm going to remove the verts for the windows and the door although for the door I'm going to start with the top verts then remove the bottom verts so it removes them without any UV errors.

tut_simple_structure326.jpg tut_simple_structure327.jpg tut_simple_structure328.jpg

Then select the edges that separate the shed from the foundation and remove them:

tut_simple_structure329.jpg tut_simple_structure330.jpg

And then our final lod is finished at 22tris :)


Link to comment
Share on other sites

Step 5: Collision Meshes (COLs)

For anyone who is not familiar with cols I'll go over them quickly.

Collision Mesh or COLs basically control what your bullets will hit, what you walk over and what you drive over. Without them your bullets would pass though objects and you would walk and drive though buildings.

There are 4 main types of collision mesh.

The first, "col0" is the decal col, this collision controls what your bullets and other projectiles like missiles hit and what effects are triggered when they hit the object and even how much damage the projectile dose on them (if the object takes damage).

The second, "col1" is the Physics col. This collision controls what vehicles drive over, or hit, or even crash into. This col is normally very simple.

The third, "col2" is the player col. This col controls what the player walks on, walks into etc. This col is also pretty low detail but has more detail than col1.

The fourth, "col3" is the AI col mesh, this col basically helps "bots" navigate around a map.


col0 as I mentioned before is the "decal" col, the col mesh that projectiles hit etc. This col is very important to get right, too detailed and it will lag the servers, not enough detail and bullets will be passing though objects they should be hitting and maybe a player is trying to take cover behind.

One of the big reasons why I make my lods before the cols is I make my cols off the lods, where you can't do it the other way round since with cols, UVs are not a worry. As such, for col0 I think I'm going to make it off of LOD1. Sometimes I make them off lod2 but most of the time, lod1 is best :)

Clone LOD1 as a copy and call it "col0". Sometimes if I'm working with lots of different objects in a scene I might call the cols something like "col0_garden_shed01" but in this case no need. once cloned, unhide selected leaving just your col0 model to work on.

First thing we need to do is setup our col materials. Looking at our model I would say we would have about 3 different materials here:

Wood Solid

Wood Thin (penetrable)

Metal Solid

So to make them in max, all you need to do is name a standard max material the name you want the material to be, and give it a nice colour so you can tell which col is which on what part of the model :)

Name goes at the top, material type is the button right of the name (default is standard so no need to change it) and the diffuse colour box is where you define the material's colour :)


Now I'm going to teach you a nice simple way of apply materials to already defined materials on your model. Select your object and go into face selection mode, then scroll down on the right to polygon properties, same place you define smoothing groups. There you should find a drop down box, which if you drop down will have a bunch of "No Name - 1" etc bits in there, each one being a material you have defined to polys on your model. Select one and you will find a load of faces with that material are selected, then apply the correct col mesh to that selection. For me the only real selection that matters is material 4, which is the metal material which I'm going to apply my metal_solid col material to like so:


Then I'm going to hit Ctrl+I to invert my selection and to the rest of the model I'm going to apply wood thin:

tut_simple_structure416.jpg tut_simple_structure337.jpg

Now that's done I'm going to automatically optimize my model, although use this tool that I'm about to tell you with grate care as if not used with care, it will screw up your model big time. Now I only really use this modifier on col meshes and objects before I've UVed them since if you use it on objects with UVs, it will screw up UVs but in the case of cols, UVs are irrelevant so can use it, just gotta watch out it dosen't screw up your model.

Drop down your modifier list and find the "Optimize" modifier in there and apply it to your model like so:


Make sure you check the "Material Boundaries" option otherwise it will optimize bits that you have defined as metal etc which we dont want.

As we can see, the modifer has screwed up our model a bit, deleting some bits like the diamond bits on the roof etc and hasn't really optimized the model much so its not really worth using, we can easily do what its done by hand without the risk of screwing anything up. Sometimes its worth using and if it dose delete some bits and is worth using, undo it and then detach the bits you dont want it to affect and reapply. But for us, just undo and we can optimize by hand :)


Now we really should have done this before trying to use the optimizing modifier on our model but we need to apply the floor and foundation of our model with wood solid, so that bullets dont go flying though and out the floor, so select the floor and apply the wood solid material to it:


Now we can delete these spokes on the rake, they are pretty pointless for the col:


One more thing we can do is turn these tool handels into 3 sided cylinders :)

tut_simple_structure344.jpg tut_simple_structure345.jpg

and we can also collapse these faces on the end of the door handles:


And I think that's pretty good for our col0, 457tris :)



Yes I'm doing col2 before I'm doing col1 with good reason, normally I make my col1 off my col2 and as such, its better if you do it this way around although for this model I think I'm going to use LOD5 for col1 but can cross that bridge when we come to it.

As I mentioned before, col2 is the player col, which defines where the player can walk and what he stands on. Materials are also important in col2 since they define what sound the players foot steps are etc.

I'm going to make my col2 off of LOD3 so clone LOD3 as a copy and call it col2 then hide unselected.

First of all I'm going to apply wood_thin to the whole model:


Then again like last time, to the floor and foundation I'm going to apply wood_solid:


Lets now get rid of the windows since the player isn't going to be able to jump though them or w/e, like we did for LOD4, select the edges of the window and move them back:


Then remove the outer edges and the verts that are left:

tut_simple_structure351.jpg tut_simple_structure352.jpg

Then unlike before, we are going to delete the edges inside the frame like so:


Then with the borders that are left, select them and collapse them and then remove any verts that are left like so:

tut_simple_structure355.jpg tut_simple_structure356.jpg

At 106tris, so far so good but now we need to add a few things so that players dont walk though stuff etc:


Unhide LOD0 and we can clearly see, the player is going to walk though the shelving, and the tools, the door handle I'm not so worried about and we can add a col mesh to that later if we find probs in the editor.

Select LOD0 and then select the shelving with the element selection tool, and then detach them as a clone:


Select your new "Object01" (or w/e you called it) and I've changed my mind on detaching both bits of shelving, I'm going to delete the top bit, then going to move the top face of the one under it right up into the roof.

tut_simple_structure360.jpg tut_simple_structure361.jpg

Although after doing that I do have a bit sticking though the roof, so now I'm going to delete the top face, and then move the vert down on the bit sticking up down so its under the roof :)

tut_simple_structure362.jpg tut_simple_structure363.jpg

Then I'm going to apply a Wood Thin material to it, then attach it to col2 :)


Another thing we need to do is make a col for for our tools so the player dosen't go walking though them like they aren't there :)

For this, I'm going to make a new plane in the right viewport with gridsnap on and draw it over the area the tools are like so:


Then going to move it closer to the tools and then covert it to an editable poly.


Then I'm going to move the verts around so they fit nicely over the tools and optimize as you go :)

tut_simple_structure368.jpg tut_simple_structure370.jpg

Then apply materials to it and attach it to col2:


One last thing we need to do is make a little "ramp" for the door way so that players can easily get in without having to bunny hop to get in like you do for some doorways.

To make my ramp first I'm going to connect these edges with 2 segments:


weld up the unneeded verts to the bottom of the door frame and move the bottom ones right under them:


Crate some new edges:


and then move out the bottom edge by 0.5m to form the ramp :)


Then I'm going to make a new col material called "col_stairs_wood" and apply it to my ramp :)


Then that's our col2 finished with 134tris :D



As noted before, col1 is the physics col which vehicles etc drive over / hit.

Right now col2 is done I think I'm not going to use it for col1 and use LOD5 instead. So clone LOD5 and call it col1 and the apply the wood thin material to it :)


One critical thing this col is missing so far is the door, so going to take the door off of LOD4 and put it on here, like so :)


Then thing that's done, at 26tris it aint bad. It also if your wondering dosen't really need a col on the underside of the roof as all that would do is if a vehicle was jumping up in the air from under the roof, it would hit it on its way up and since that happening is very unlikely, not worth the extra tris :)


col3 as I mentioned before is the AI col and there is a few main points to consider here when making your col3. For starters it needs to be as simple as you can get it, all this col is used for is bot navigation and the more complicated it is the worse it is for the bots so only include key bits to where they can walk etc. The mesh needs to be 100% closed as well so the underside face can not be deleted and everything has to be welded onto the main model. Also you can't have any self-intersecting bits which you wont get if you weld everything up too.

As such, I'm going to use col2 as the base for our col3, so clone col2 and call it col3 and then hide unselected :)

First thing I'm going to do is weld the verts of the foundation right down to the base as they aren't needed, then I've applied the wood thin material to the entire model as you only want one material on the col3 mesh.


Next thing to do is to cap the bottom, select the edges with either the edge or border tool and then hit the cap button to cap it. This only really works on simple objects like a square like we have here, too many complicated verts and it will most likley screw up:

tut_simple_structure401.jpg tut_simple_structure402.jpg

Next going to delete these bits, they aint needed for AI to work out they can get inside and they are not closed meshes either:


Now we need to delete the roof as we are going to make a new one:


Now we need to make a new roof, first make a new edge here then delete these faces of the inside of the roof and then bridge thous to sections to make the ceiling like so:

tut_simple_structure390.jpg tut_simple_structure391.jpg tut_simple_structure392.jpg

Then bridge the outside of the roof:


Now we need to delete the door as this being a separate mesh will conflict with the bots


Now unhide lod0, select this face and extrude it out to abouts where the max point of the door is like so:


Now snap this edge to the edge of the door:


Weld the verts up like so:


and then delete these two faces and crate 2 new faces in there place:


Then after looking at it we might as well weld this vert to here:


Then that's our col3 done apart from we need to do one little check on our col to make sure we haven't messed up anywhere. select your col3 and then scroll down in the modifier tab until you find "STL Check" and apply it to your model, this is a little tool to check your mesh is all closed etc and there isn't any errors although it shouldn't be relied about 100%. With it applied you get a load of options, default options are good but you need to check the "Check" box and then it will say if your model has any errors under it in a little status box, if it has no errors, it will say "No Errors" in there.

tut_simple_structure413.jpg tut_simple_structure414.jpg

If everything is good, delete it by right clicking on the modifier and click delete and then your col3 is finished with only 58tris.


Link to comment
Share on other sites

Step 6: Exporting

Before you can start this stage you need the BF2 Max Tools installed into 3DsMax9 (needs to be Max9, not 2009, not 2010, Max9, although Max8 (not 2008 ) is ok too but not as good as Max9) I would strongly advise you get the POE2 Max Tools as they are much better than the standard BF2 Max Tools, which I will be using in this tutorial and you can download them from here: PoE2 3dsMax Tools - Point of Existence Forum

When you have them installed (and 3DsMax restarted) go to BF2 > Export


The Export window will popup and in the top right hand corner of it will be a small button called "Run Setup", click that.


A new window will popup and in it, we need to define a bunch of settings. The output directory is to what modification all your exports get exported to, I would advise you to export to PR_EDIT but export to w/e mod you like, but export to the "bf2" or "pr" mod at your own risk. I have filled out in it: C:/Program Files (x86)/EA GAMES/Battlefield 2/mods/pr_edit/ Thou this will most likley be different on your PC since I'm on a 64bit system, hence the "Program Files (x86)" in the file path and you might have your BF2 installed onto a different hard drive than C: or in a different location. All in all, its best to just browse to the mod folder and select it by clicking the Browse button :)

In section 2 you need to list all the mods you might be using textures etc out of, so in my list I have:


Thou you can include as many mods as you like etc. The first 2 lines, /rawData/ and /mods/bf2/ are 100% critical, as well as a bunch of others if you are exporting to pr / pr_edit.

Your settings should look like this by then end:


Now your exporter is setup and everything should be good for exporting and with any luck you wont need to do this again, unless you reinstall etc :D

We have now reached the stage where are model is almost ready to go ingame but before it can, there is a few little things we need to do.

First, unhide all your lod and cols so you get something like this:


Now select your LOD0 and go to your Hierarchy tab and click on affect pivot only, and then click on the button "Center Pivot to Object". This will show you where the very centre of your object is and for now I would only use that as a reference as I like to keep everything on the grid. As we can see for my shed, its needs to come 1m down and go forward by about 0.5m.


So I'm going to undo that pivot change I just did, select all my lods and cols and then move them 1m down and 0.5m forwards to centre them to the grid like so.

tut_simple_structure419.jpg tut_simple_structure420.jpg

Now with all objects selected, go back to your Hierarchy tab, click on "Affect Pivot Only" and then in your X, Y, Z boxs at the bottom type in 0,0,0 (make sure the offset box isn't checked and your move type is view) and your pivot for all your objects will move to the very centre of your scene.


Now select your LOD0 and rename it to "garden_shed01". Then select that and all your cols and and your LOD0 model you just renamed to "garden_shed01" and with them selected, go to the BF2 > Utilities and a new window will pop up.

tut_simple_structure422.jpg tut_simple_structure424.jpg

In that new window, in the top right hand corner under Wizards will be a button called "StaticMesh", push it and it will setup the basic export structure for your staticmesh :D


If you push "H" you should now see this (make sure the "Display Subtree" button is checked). This is the basic export structure of a staticmesh, although now we are going to make it a little more complicated :D


Push the "H" key and select the helper called "lod0" (not the object LOD0_garden_shed01, although you shouldn't have one called that any more).


Clone it as a copy and call it "lod1" (note, not "lod01"), repeat this until you have get to lod5.


Now select your "LOD1_garden_shed01" object and then click the button "Select and Link" button in the top left hand corner, right of the Redo button:


then hit the "H" key, select the "lod1" helper object and click the link button to link your LOD1 mesh to the lod1 helper :)


Then select the "Select Object" button which its icon is the mouse cursor ("Q" button for short) and press the "H" button and you will now see that your "LOD1_garden_shed01" is now linked to your "lod1" helper like so :)


Repeat this cycle for all the rest of the lods, linking them to there correct helpers until they are all done like so (note, you need to go back to "select object" mode after linking an object in order to link a new one, and dont do anything other than linking in link object mode).


Now our static is ready for export. With any part of the static selected, go to BF2 > Export


The export window will pop up and there are a few boxes that need to be filled out.

First box called "Objects sub-folder path" is the location you want to export the object to, in the case of this static I want to export it to "\staticobjects\pr\russia\" so I put that in (without the quotes).

Next option is the "Objects Name", which is what the object will be called when we export it. It should already be defined as "garden_shed01" if you have done everything right which it is for me although it if aint, you can change it to that or w/e name you like for a static object it will be fine, for more complicated exports like vehicles etc, the name of the object and the mesh names in the max scene gets a little bit more complicated.

Under that you have a few options, leave them unchecked.

Under that you have a little "StaticMesh" area, with a drop down box and under it a check box called "Custom Lightmap UVs (No Samples)". Leave that box unchecked and the drop down box is all we are concerned about about here. This drop down box basically defines the size of how big the top lightmap is generated at when "Final lightmaps" are crated. The default setting is "Auto" but you really should never put it on Auto as its really bad and you should define the size of the lightmap on the size and complexity of the object itself. For a really large object like an apartment building you will want to use a 1024x1024 lightmap, in very rare cases, possibly also 2048x2048 but that is seriously pushing the limit, for a small prop, 32x32 or even 16x16 might do it. Since this static is pretty much and medium complexity (for its size) I would go with a 128x128 lightmap for this, possibly a 256x256 lightmap but we will first try a 128x128 lightmap and see how we go so select the 128 lightmap size in the drop down box, then the other options are not relevant to us so when your ready, hit the export button and it should only take a few secs to export this and when its done you should have a new "garden_shed01" folder in your \objects\staticobjects\pr\russia\ folder which then should have a .con file in it and a mesh folder, with the mesh folder having a .staticmesh and a .collisionmesh, as well as a bunch of .samp files :)

tut_simple_structure439.jpg tut_simple_structure440.jpg tut_simple_structure441.jpg

Once exported, load up the editor and you should be able to find your static in the place you exported it to :)

tut_simple_structure442.jpg tut_simple_structure443.jpg tut_simple_structure444.jpg

And although the static might look ready it still needs some work yet before its totally finished.

Link to comment
Share on other sites

Step 7: Coding

Yes even a staticobject needs some coding in order for them to work fully with the game and this is an imporant step often missed by staticmodellers that is very imporant so make sure you do this step fully, along with the others :P


First of all we need to define all the materials this static uses. In the modifier box, expand the default tab and click on the "..." next to the Materials bit, a new window will pop up where you can define the materials for all the materials you put onto your col mesh. Each material name you put onto your col mesh will show up on the right, ie "col_Metal_Solid", then to the right of that there is a drop down box with all the materials in the mod, and select the one you want for that material (ie, for a Solid Metal material you will most likley want to give it metal solid ;))

tut_simple_structure445.jpg tut_simple_structure446.jpg tut_simple_structure447.jpg

Once you have setup all your materials, hit Ok and save your object. There will be a little message in the conceal saying in blue text "You may need to reload geometry to see your changes!", so hit the "Reload Geometry" button to reload it, may ask if you want to save your object again click yes if it dose and then your materials will be able to be seen in the editor :D


Now if you go to Camera > Solider you will be able to view your object from a players perspective and should also have a weapon in your hands to be able to shoot at things (if you dont have a weapon in you need to add a weapon to the SF kit for your pr_edit) :D



Now if you have added a stair material correctly onto the ramp going upto your door way, even thou this building is miles up in the air (from what it will be when placed on a map) you can still easily walk up though the door way, where before without it having a stair material on it, you wouldn't be able to.


Next comes something I like to call the shooting test, you basically spray bullets round the entire object at everything you can and make sure the right effects are popping up on the right parts of the object. This may seem pointless but I have discovered many bugs on objects doing this test, like Grass materials being applied to Glass etc. So first I'm going to shoot the walls, floor, roof, ceiling etc then going to shoot all the little bits of metal etc just making sure my bullets are hitting what they are meant to.

tut_simple_structure453.jpg tut_simple_structure454.jpg tut_simple_structure455.jpg tut_simple_structure456.jpg

tut_simple_structure457.jpg tut_simple_structure458.jpg tut_simple_structure459.jpg tut_simple_structure460.jpg

As we can see everything looks fine :)

Now I like to check the col meshes themselves to make sure none of them are off scale or anything like that since all you can really test in the object editor is the col0 and col2 cols, not col1 and col3 since you can't drive any tanks or have any bots in the object editor :P

To do this, go to "Render > Toggle Draw Collision Meshes > *and the col of your choice". The cols are listed in order so if you can't remember what one is what, off is as it says, off, Decal is col0, next one is col1 (Physics), next is col2 (Player) and the last is col3 (AI) so if you can't remember what name is what col, just remember they are in order from col0 to col3 :)


Here is my col0 toggled, as we can see each material has its own pretty colour, but also note, the colours match the colours that where in the same window you defined each material against:

tut_simple_structure462.jpg tut_simple_structure447.jpg

Everything looks fine for col0 so lets see about col1, where everything looks fine again, note you can't see the door or roof col because they are inset into the model, to see them you can always stop rendering the main mesh itself by going to "Render > Toggle Draw Static Mesh" and uncheck it to hide it and check it to view it again :)

tut_simple_structure463.jpg tut_simple_structure464.jpg

col2 also looks good, you can see the nice little ramp etc too :D


and col3 looks good too, make sure to check the bottom to see if its closed :)

tut_simple_structure466.jpg tut_simple_structure467.jpg

Then go to "Render > Toggle Draw Collision Meshes > Off" once you have finished looking at your cols to hide them again :D

Cull Distances

This is one of the areas most Static modellers always forget to do and its something that should also really be done by the Static Modeller since coders never get the cull distances right, but can't blame them since it shouldn't be there job either. As such, its really important that we get this bit right and then make sure it stays right.

The first thing we need to do is define our objects Cull Distance. The Cull distance is basically the max distance from when an object stops drawing even if its in the players view distance. This is quite important since you dont want to be drawing something that is so far away and as such, so small, you can't even see it, but get this distance too low and having a big object vanish 100m away from you will not only look like sh*t, but will also have a huge impact on game play where a player think he has a clear shot of anouther player, but in fact that other player is sitting behind an object that is between you and him, not to also mention being able to see other players though objects you should be able to see is really bad too. As such, like I said its important we get this value just right, so it dosen't have an impact on gameplay but dose mean your gfx card no longer has to draw the object when it dosen't need to any more.

The size of the object is the thing that mostly determines how far you need to draw it for balled it culled, so for a big apartment building, you will want that object drawing for a huge distance, something like 2kms but for a small sack of rice or something you would only want drawing for a few hindered meters or something. For a shed like this, probably somewhere around 500m, maybe more we will have to see.

First thing we need to do is turn off the Fog so it dosen't obstruct our view, so go to "Render > Toggle Draw Fog" and make sure it hasn't got a tick by it, if it dose, click it and it should take the tick off (turning the fog off).


Next we need to turn off the "Draw Marker" and "Draw Grid" buttons, which are located in the Editor tab to the right and make sure the buttons are not pressed in, if they are, press them to turn them off.


One more thing we need to do is to bring up the "Object Info" Tool Window, by clicking the "[Object Info]" button at the bottom, middle of the screen and the toll window will pop up, giving you lots of very useful information like the current active LOD, The distance you are away from the very centre of the object (in meters), its Triangle Count (Says poly count but it is tri count), its Vertex count etc. This infomation in here is critical for us to get the cull and lod distances right :)


With all that off it should then look something like this up close:


Now fly away from your object while still looking at it until it disappears from view. With the default cull radius scale (1), my shed disappears at 78m away, first screen is 77m away, 2nd is 78m.

tut_simple_structure474.jpg tut_simple_structure475.jpg

Now having our shed disappear at 78m away is really, really bad for the reasons stated about so we really need to increase our cull distance. To do this, expand your default tab in the tweaker bar and you will see at the very top a setting called "CullRadiusScale" with its default setting of "1" next to it.


What we need to do is turn the value into a value where it then draws the distance to where we want it. If we turn the cullradiusscale value to 2, the shed now draws to 123 meters, so we need to keep on turning it up to a point where its drawing far enough where we can still see it, but culling it when its no longer relevant, so its all about trial and error until you get it right :)


For this shed, I've found a CullRadiusScale of 15 seems about right, where it then draws for 139 meters before it gets culled and at that point, all it is is a little pixel on the screen and at 140m, you can hardly notice a difference since it was so small :)

tut_simple_structure478.jpg tut_simple_structure479.jpg

Save your changes and then we can move onto getting the LOD distances right :)

LOD Distances

This is again one of the areas most Static modellers always forget to do and its something that should also really be done by the Static Modeller since coders never get the the LOD distances right, like the cull distances, but can't blame them since it shouldn't be there job either. As such, its again really important that we get this bit right and then make sure it stays right.

First thing is to check out all your LODs and make sure there is no issue with any of them.

First of all in your recoures bar, scroll all the way down and you should see a "Geometry" tab, expand it and you will find a "geom" tab that you need to expand, followed by a "geom0" tab which when you expand you will have a load of sub objects, each one being one of your LODs named from "lod_0" to your final lod w/e it may be (in my case, "lod_5").


As you select each one, you should notice the mesh in your viewport change and it show the LOD you have selected, as well as in your Object Info tool window it change its active lod to the one you have selected and its tri count go down to the tris of your lod, etc:


Checking my lods now and, lod0 looks fine at 705tris, lod1 looks good at 509, lod2 how ever has a slightly smoothing error on the side but its tri count is fine at 318, lod3 has the same smoothing error and is at 162trsi, lod4 looks fine and dosen't have the smoothing error with 90tris and lod5 also looks fine with 22tris, so now I'm going to go back into max and quickly fix thous smoothing errors and reexport, then reload my geom to update the changes :)

I would also like to note I did check the rest of my lods not just from one view angle to make sure everything was ok and you should too with your model.

tut_simple_structure484.jpg tut_simple_structure485.jpg tut_simple_structure487.jpg

tut_simple_structure488.jpg tut_simple_structure489.jpg tut_simple_structure490.jpg

And after fixing my smoothing problems on lod2 and lod3 here is how thous lods look now :)

tut_simple_structure491.jpg tut_simple_structure492.jpg

After you have checked each lod to make sure they all ok and fixed any issues, select the "geom_0" tab in the Resources window and if your right up close to your object it should now be showing you LOD0 again. If you also look down to your tweaker bar you will notice that near the bottom you have a bunch of settings called "LodDistance*" where the * is the LOD number, ie, if its 1 its lod1. To the right of these bits you will notice a value, these values are in meters and they basically define at what distance dose the engine switch the model to what lod. So right now with its default values, it switches to LOD1 at 25m, LOD2 at 50m, LOD3 75m, LOD4 100m and LOD5 at 125m. These values need to be changed as right now, they suck as switching to lod5 at 125m, you can clearly see all the windows etc disappear which isn't at all good, both visually and for gameplay as if there was a guy in the building shoot out at you and you where 130m away, you wouldn't be able to see the player in the building if it was showing lod5.

tut_simple_structure482.jpg tut_simple_structure483.jpg

With LODs you want them changing as fast as possible to the next LOD up, but visually you dont want the player to be able to notice the change and you also dont want the LOD change to happen to soon as it could inflict on gameplay was well, like the above. You also dont want the LOD to be changing too late as doing that will put unnecessary strain on the GFX card trying to render the object so you want it just at the right distance where your changing the lod as soon as you can, without being able to notice the change nor the change having a big impact on gameplay (although if you can't notice the change, its very unlikely there will be any impact on gameplay).

Also one thing to note is these LOD distances dont include when your looking at a object though any optics like binoculars etc. When looking though Optics it will change to the best LOD suited for them based on the distances you define here so lets say if we set the LOD5 to 500m or something and the player was 600m away, if he looked at the shed though optics from 600m away, he would no longer be seeing lod5 but something like lod4 or even lod3 if the optics where very powerful. These distances are only for when the player is looking at a object though his own eyes, the engine will do all the optic work itself :)

Like with the Cull distance setting, its all trial and error to get this just right. Basically the way to do it is with one LOD at a time, starting with LOD1 and working your way up to the top until they are all good.

The way to do this is kinda like what we did with the cull distances with flying back and see where it stopped drawing, except here, we are flying back and forth and seeing if we can see any noticeable lod change and pushing the distance down as far as we can on each lod.

So make sure your "geom_0" tab is selected in your resources window so your not forcing any LOD to draw and the LODs are only going to draw at there set distances, and then fly back to just before your lod1 change so at the moment for me, lod1 changes at 25m so I'm going to fly back to 24m. Then I'm going to fly back quickly past 25m and see if I can see any change. Also make sure that in your Object Info tool window that it says lod1 is drawing after you fly back past the distance, if it aint then you probaly dont have the "geom_0" tab selected in your resources window.

tut_simple_structure493.jpg tut_simple_structure494.jpg

As we can see you can't see any change there which signifies the distance is either just right, or more likley that the distance could be lowered some what still so lets change the lod1 switch distance in the tweaker tab to 10m and see if we can see it then. Also when watching for changes, try and watch for bits you know are less detailed in the next lod from the last, like from lod0 to lod1, I know lod1 has 2D door handles, hinges, its tools are slightly less detailed and the roof is slightly optimized etc so try and watch to see if you can see thous changes.

tut_simple_structure496.jpg tut_simple_structure497.jpg

With the lod1 switch distance at 10m I can just see the door handle turn from 3D to 2D so going to try 15m to see if that works any better.

tut_simple_structure498.jpg tut_simple_structure499.jpg

At 15m I can't see the lod0 to lod1 change so going to stick with that value, then going to do the same for lod2, which I know its main differences are is the window frame so going to see if I can see that change at all. With it at its default switching distance of 50m for lod2 I can't see any real change so going to try 30m and see how that dose. 30m seems good so going to try 25m and see if that's any good. 25m seems a little too small so going to stick with 30m for LOD2 :)

tut_simple_structure500.jpg tut_simple_structure501.jpg

Did all the others the same way and ended up with the following:

LOD1: 15m

LOD2: 30m

LOD3: 60m

LOD4: 100m

LOD5: 300m

Once you have got all your lod distances done make sure you save them up and then browse to the folder your static is in (in my case, \objects\staticobjects\pr\russia\garden_shed01\) and you will find a new ".tweak" file in there which has been crated by the editor when you saved changes for materials, cull distances, lod distances etc.


Open that .tweak file up with your favourite text editor like notepad, in my case, the Crimson Editor that I use in pretty much all my tuts.


Once open we can see the code the editor has saved, but always keep in mind the BF2 editor is a total retard of a program that can never do anything right, and this is no exception. If we look at the top of the file we will see a bunch of lines of code starting with "GeometryTemplate.setSubGeometryLodDistance". These lines of code define the LOD distances we just put in and the numbers after them the first number (in this case 0 for all of them) is the geometry which for a staticobject like this is always going to be 0, this number is only relevant in destroyable objects and more complicated objects like weapons and vehicles. The next number is the lod, well not quite the same lod as in the editor, -1 of the lod it had in the editor so instead of starting with 1, it starts with 0. The next number is the distance in meters. Now if we look carefully, you will see where the BF2 editor has messed up on its save. Yes that's right, there is only 4 LOD distances there when there should be 5, its missing LOD 3 (or 4 in case of the editor).


As such, we need to manually put in LOD3. Copy any of the other lods, make a space where lod3's value needs to go (in-between 2 and 4) and then paste it in, changing the lod value to the correct one (3) and then putting in the distance we found was good in the editor (100m) and then save the .tweak file.

Ie in total you want:

GeometryTemplate.setSubGeometryLodDistance 0 3 100


Everything else with the .tweak should be fine but now we have made that edit to the .tweak it is important that you dont save this object with the editor again and if you do, its important that we redo what we have just done and make sure all the LOD switching distances are in there, otherwise it will screw up big time in game and next time you load the object with the editor.

The Anchor

Right now if we place our static in our map the static will be placed with the very bottom of the foundation sitting on the very top of the terrain, which we dont want we want our foundation to be sunk into the terrain as soon as the mapper places the object on his map. To do this, we need to add an Anchor to our model.

Now its important we understand the differences between a Pivot and an Anchor. The Pivot is the very centre of your object, unless exported for it not to be the centre (which it shouldn't be its very bad for the object if it is). For our shed if we turn on "Draw Marker" we can see the Pivot being displayed as an X,Y,Z gizmo in the very middle of our object:

tut_simple_structure509.jpg tut_simple_structure508.jpg

The pivot dosen't control where the object is snapped to on the terrain or anouther object etc. All it is is the middle of the object to be as simplistic as possible.

The Anchor on the other hand is an optional thing you can add (and really should add to all your statics) that controls where the object is snapped to the terrain, optional position for the object to be rotated around etc and a mapper can also do a snap pivot to pivot option. The Pivot has no purpose other than to make it easier for mappers to place there objects correctly as we, the static modeller intended them to.

For our shed, we need an anchor to ensure the shed is placed on maps with the foundation sunk into the ground.

First things first, we need to find out what the X,Y,Z coordinates we want our Pivot to be placed in. If we go back into Max we find a nice little handy helper in our Hierarchy called "*object_name*__Anchor" that serves no purpose but we can use it to find out where we want our Anchor to go.


Select it and we can move it about without it having any impact on the model or the export. Move it to where you want your anchor to be ingame, in my case, 10cm below the floor of my shed like so:


Now we can tell from its x,y,z coordinates that its 1.1m below the pivot location (aka, the centre of the max scene) and as such, I want my pivot ingame to be 1.1m below the pivot.


Go back to your .tweak file and at the very bottom we want to add this line of code:

ObjectTemplate.anchor 0/0/0

like so:


Now we know we want our anchor to be 1.1m below our pivot and the "0/0/0" bit after than anchor is its x,y and z coordinates although here's the catch, the BF2 editor is so screwed up, Z isn't the vertical axis, Y is, they basically swapped places in the BF2 editor for some odd reason I have no idea why, you would have to ask DICE :P

As such, even thou in Max the coordinates for our anchor is "0/0/-1.1", in BF2 since Y and Z are the opposite way round its "0/-1.1/0" so put that at the end of your anchor code in your .tweak file and save it up and reload the editor.


With the editor reloaded or you have told it to load the updated .tweak if it recognises it (if it was there when the editor started up, it should recognise it, if not, needs a restart) you should then have an "Anchor" under object in the recoures tab, select it and with Draw Marker on, you should see its location like so:


Now if you quickly load up a test map (I would recommend you make a very small, 256x2 map just for testing new statics on if you dont already have one) and place your object in your map, you should find when you place it it now snaps to where the pivot is and the foundation is sunk under the ground :D

tut_simple_structure516.jpg tut_simple_structure517.jpg tut_simple_structure518.jpg

Lightmaping test

Its amazing in the past how many statics have gone into the mod that have had serious lightmapping issues, although back then we didn't know what was causing the issues where we do now, it is still important we test every static to make sure it lightmaps 100% fine and there is no issues, rather than have the static be placed on a load of maps then find out when the map's lightmapped that it has issues.

As such, you need to place your static onto a test map and lightmap it. Make sure you have some 1/2 decent lightmap settings to work with too for your map, if you dont here's a basic one that should give you an ok result.


rem ******** Lightmap Generation Settings ********
if v_arg1 == BF2Editor

LightMapGeneration.GILightsBaseDir 0/0.33/-0.66
LightMapGeneration.GILightsIntensity 0.33
LightMapGeneration.GILightsShadowIntensity 1
LightMapGeneration.GILightsFov 45
LightMapGeneration.UseGITopLight 1
LightMapGeneration.GITopLightIntensity 0.1
LightMapGeneration.GILightsViewDistance 10
LightMapGeneration.skyWhite 0.3
LightMapGeneration.numberOfGILights 8
LightMapGeneration.sunLightShadowIntensity 1
LightMapGeneration.sunLightFov 2
LightMapGeneration.sunLightIntensity 1


TerrainLight.con (although this isn't needed to be setup to test the object's lightmaps are working fine).

rem ******** Lightmap Generation Settings ********
if v_arg1 == BF2Editor

LightMapGeneration.GILightsBaseDir 0/0.33/-0.66
LightMapGeneration.GILightsIntensity 0.33
LightMapGeneration.GILightsShadowIntensity 1
LightMapGeneration.GILightsFov 45
LightMapGeneration.UseGITopLight 1
LightMapGeneration.GITopLightIntensity 0.1
LightMapGeneration.GILightsViewDistance 10
LightMapGeneration.skyWhite 0.3
LightMapGeneration.numberOfGILights 8
LightMapGeneration.sunLightShadowIntensity 1
LightMapGeneration.sunLightFov 2
LightMapGeneration.sunLightIntensity 1


With your test map's lightmap settings setup, select your object, go to Compile > Lightmaps > Generate Lightmaps.


A new window will pop up and press the "Trace Selected" and "Final" options are selected, so that it it traces only the shed we have selected and it traces them on there final setting, then hit the Generate button to start lightmapping your static.


Now I have to restart my editor after doing object lightmaps since the editor has problems with my gfx card but you should be able to see the results strait away once its finished and if everything is ok it should look something like this:

tut_simple_structure522.jpg tut_simple_structure523.jpg tut_simple_structure524.jpg

As we can see the lightmaps are working fine, but they are really low rez which isn't very good at all. As such I'm going to re-export my object with 256 lightmaps instead of 128 as I thought I might but it was still worth a shot with seeing if 128 lightmaps would be large enough and once re-exported with higher rez lightmaps, redo the lightmaps and see how they look.

With 256 lightmaps we can see a vast improvement and looks about right for this object, even thou some of the lightmaps have slightly jittery edges, that more down to bad LM settings with no soft edges than the size of the lightmap, as such, going to stick with 256 lightmaps.

tut_simple_structure525.jpg tut_simple_structure526.jpg tut_simple_structure527.jpg

One last thing to check with the lightmaps is the LOD lightmaps are all good too as it can happen where a LOD has a screwed up lightmap so just fly away from the object and make sure the object dosen't suddenly turn black or anything :)


And now the static is finished, YAY!!! :mrgreen:

I hope you have all found this tutorial useful and hope to see a few new statics appearing, hopefully more than just garden sheds ;)

Cheers! :D

Frequent Asked Questions & Answers:

Q: Will this static be available for us to use?

A: Yes this static will be included in the next release of PR (v0.95) for anyone to use them in there maps as they wish, how ever the static is not avliable for use outside of the Project Reality mod.

Q: What happened to the Windows?

A: I decided not to complicate this tutorial any more than it already is so I decided to not go into how to export them, add them to the model etc. How ever in the ingame model that will be released with PR v0.95, they are there and included with the shed



Link to comment
Share on other sites

really good work rhino :) ...glad it was you making this tut..lol.


thought i'd better mention you missed "material names"...BaseDetailNDetail and so on.

Why wouldn't it be me making the tut? :P

Also for static object materials, you dont need to do the "BaseDetailNDetail", if you leave it blank the exporter will work it out for itself (unless its meant to be an alphatest material or w/e, then you need to put its name in. And also 2 of my materials are only "BaseDetail" so your "BaseDetailNDetail" would mess them up :P


' date='07 September 2010 - 06:53 AM' timestamp='1283838784' post='100579']

To avoid the 'is a per-pixel material' error in the console i often use a new material with only Base texture and apply that to the lods 2 and up. Requires possibly a bit of uvmapping on the lods , though.

Ye thou the error is tbh meaningless, its on many vBF2 statics as well and as such, better to just ignore it :P

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...