EA official tutorials: Terrain editor Leveleditor Custom Mod Setup Understanding Heightmaps Build the Bunker - 3ds Max Build the Bunker - Maya Import the Bunker Build the Car - Maya Import the Car Create new team - Maya Create new team - 3ds Max Create new kits - Maya and Max
Mapping - General
Mapping - Texturing
Mapping - Heightmaps
Mapping - Lightmapping
Mapping - Downloads
3D modelling/texturing
Coding |
Battlefield 2 Modding Tutorial 5 - Importing the Bunker by [EA]Lawrence Brown Set-Up:
This tutorial assumes that you’ve followed “Battlefield 2 Modding Tutorial 3 - Custom Mod Set-Up” and created the custom mod “MyMod”. If you haven’t, you should do this now or you won’t be able to place the files in the correct places.
This tutorial also assumes that you have completed “Battlefield 2 Modding Tutorial 4 - Building The Bunker”. If you haven’t, either do this now, or alternatively you can follow the ReadMe in the “Tutorial Files” folder of tutorial 4. This is necessary because those files have to be placed correctly in order for the import to work.
If you haven’t done tutorial 4 and are just going to place the tutorial files, then after you’ve placed them in the correct places, rename “My_Bunker_Complete.mb” to “My_Bunker”. (The name of the file you import is what you’re object is called, so we want to make sure this is correct now.)
The best way really is to follow the tutorials in order.
Importing:
We are now going to import the bunker from tutorial 4 into the editor.
After you click “OK”, several things will
happen. First, a command-line window will open and a lot of text will flow by.
You will also see lines of text being printed to your output window if it’s
open. Next, an error message will pop up that says “Import
The important thing is that once the importer has finished all this, you should see the following folder and file appear:
If this file doesn’t appear, then scroll through your output window for clues as to what may have happened. It could be something as simple as forgetting to triangulate your collision meshes, not setting up the hierarchy correctly, misnaming an important node, or not setting up the shader correctly.
Note: As I discussed in “Battlefield 2 Modding Tutorial 2 - Creating a Basic Level”, you must drag the actual file to the window, not the folder!
You should now see something like this:
Note: If you don’t see the grid, you can
click on the “Draw
Testing
the Bunker:
Now that we’ve got it in the editor, we obviously want to do something with it.
Another feature of the editor is the ability to test many things without actually having to quit and launch the game. This includes the ability to run around your map without leaving the editor.
You should now be able to run around and “test” the bunker. Most, but not all, things act the same as the actual game.
A word of caution: The editor tries to mimic the game for testing purposes, but because of the nature of the program, it can’t do everything quite as well as the game does. Because of this, you may get random crashes from doing certain things. Usually this has to do with effects, such as when firing a weapon. The editor is good as a first look at things and for doing basic testing of vehicles and so on, but for hard-core testing, you will still have to obviously launch the game itself. This is why you should always do a “Save all” just before entering this mode.
Here’s another nifty trick: You probably noticed that under “Soldier” in the camera menu, there was a listing for “Vehicle”. Here’s how you use it:
Note: This only works for testing. Once you are done you will have to delete the vehicle again because it won’t show up in the actual game unless it’s an object spawn.
Note: When it first switches to vehicle mode, you may be able to drive around. You may wish to hit the spacebar again because this actually switches to control mode. Once you do this, you will be able to toggle the chase camera of the vehicle and so on and also switch positions just like in the game. Remember that like the soldier view, doing things like firing the weapons can potentially cause a crash, so be sure to do a “Save all” before switching to vehicle camera to prevent losing any of your work.
Evaluating
the Bunker:
So now that you know the nifty tricks for testing in the editor, we need to go back and take a serious look at our Bunker.
The first thing you’ll notice is that when trying to enter, if you’ve just placed the Bunker in the scene without adjusting it, the steps will be too high. This is because I made it so the bottom would stick through the ground a little bit to allow the terrain to slope a little. You will have to jump to get inside.
Once inside, notice that the ceilings seem a bit low. You can go back and change this if you like, but I want it to have a kind of cramped feeling.
Unlike the game where your soldier is restricted to first-person view, in the editor you can toggle through the other “vehicle” cameras by pressing “C”. (Remember that you may have to press the space bar first to get into control mode.)
When in third-person view, I can actually see that there is a bit of room above the soldier’s head. It’s just the camera that’s giving it that cramped feeling:
The last thing we need to test is the stairs. Running up the ramps, I notice that I can’t quite get up the second one. It seems that the angle is just a bit steeper than the lower one, so there are two ways you can fix this: either apply a different material to the ramp (there is probably a “stairs” material that has more friction), or just remodel a bit to change the angle of the ramp.
In this case I’m going to choose the second option and go back to my original model and remodel a bit to make the ramp less steep. Now that I’ve confirmed that the rest of the model basically “works”, I’ll also go back and add the details, like the windows and so on. I’ll cover these techniques more in a later tutorial.
You’ve now created your first staticMesh object and imported it into a map. You can now either continue with “Battlefield 2 Modding Tutorial 6 - Building the Car” or skip ahead to “Battlefield 2 Modding Tutorial 8 – Refining the Bunker”. |
|