Page 1 of 1

Stridor's Map Making Tutorial Part #1

Posted: Sat Apr 26, 2008 11:11 pm
by Stridor
EDIT: THE WHOLE MAP MAKING PROCESS HAS BEEN REVAMPED BY THE NEW MAP MAKER TOOL WHICH IS CURRENTLY IN OPEN BETA!
THIS THREAD NO LONGER APPLIES



Hello,

Basic concepts first

Maps in (at least this version of PC) are 1000m x 1000m. At least the "play area" is. You can make and render bigger maps but not be able to give orders to move your guys to these off play area, areas! So it is best to keep things at 1000m x 1000m for the time being.

Maps are nothing more than textures meshes which the engine displays. There are the placeable objects like houses and trees which can be manipulated with the scenedit program provided (and documented elsewhere) and then there is the underlying ground mesh upon which everything else is placed. This mesh needs to be edited in a 3D program of your choice and then exported into directX format which is what the game engine uses to display 3D objects. In this tutorial we will use a number of tools to achieve this.

As all maps will start conceptually with the underlying ground geometry let's start there.

To begin you will need to have some idea about what sort of map you want to make. Inspiration can come from many places (photos/maps/google earth/etc). I was going to try and model something on the eastern front to begin with, then I released it didn't really matter what I did, so long as I go through the whole process, anyone else should be able to replicate it with their own specifics.

So, I grew up on a farm in country NSW on the Colo River. Below is a GE SS. Unfortunately GE is not very accurate but I hope this will show you the rough idea that I want to achieve.

Image

RE: Stridor's Map Making Tutorial Part #1

Posted: Sat Apr 26, 2008 11:34 pm
by Stridor
In order to make and edit the underlying geometry I am going to use 2 tools

The first is Nem's Terrain Generator (NTG) which is free and can be found here http://nemesis.thewavelength.net/index.php?p=8. This is a terrain "sculpting program and is very good at what it does" There are several tutorials on Nem's site on how to use his terrain generator. You can even use it to generate random terrain of your choosing it you so wish.

So install NTG on your system, start the program and select File->New. You will then be presented with a New Terrain dialog box. Select X Triangles = 64 Y triangles = 64 Triangle size = 256 (which is in fact the default) and press Ok.

You should now see a large flat map of the stated size. To move the camera around in NTG hold down the right mouse button to rotate the map. The arrow keys move the map (hold down shift + arrows to move fast). Also ensure that the View option View->Walk on Terrain is turned off for the moment. This is a useful option to allow you to walk around on your map to see what it will look like in the game, but for the moment turn it off. I have posted a SS below of what it should look like zoomed out. Notice the "origin" marker in center of the map.




Image

RE: Stridor's Map Making Tutorial Part #1

Posted: Sun Apr 27, 2008 12:12 am
by Stridor
The main tools you will be using in NTG are all on the top tool bar. With a tool and tool size selected simply left click and drag to the desired effect you want. These tools "sculpt" the terrain for you

From left to right:

. Raise/Lower tool - raises or lowers the selection
. Mountain/Valley tool - raises or lowers but in a way which looks like a valley or mound rather than a trench (equivalent to soft selection in 3DSMAX)
. Smooth tool - smooths out harsh angles in the mesh
. Noise tool - introduces Gaussian noise onto smooth areas of mesh, the ground is not normally totally flat but has undulations.
. Flatten tool - the inverse of the noise tool, this flatens out the underlying mesh undulations. Use this to "grade" roads if you like
. Copy tool - Admittedly I haven't found a use for this tool yet [;)]
. Touch up tool - this allows you to just grab one vertex and move it around. Best used if viewing the map in one of the wireframe views (which are accessible from the View menu). Use this to make minor touch ups obviously
. Paint tool - use for painting textures onto the map, something which we will not need
. Locking Tool - use this to "lock" vertices on the map so that other tool manipulations don't modify them. This is useful for say drawing a road through mountainous terrain. Draw (with the lock tool) the road you want (this will lock these vertices) and the you can use the Mountain tool to lift a mountain around the road you just drew.
. Unlocking Tool - use to unlock locked points as needed. In combination with the Lock and Unlock tools you can use the Tools->Locking menu option to allow you to do all sorts of cools things with lock/unlocked points. Draw a "river" with the lock tool, then select Tools->Locking->Inverse Locked Points. Now everything else but the river vertices are selected, so now use the lower tool to cut a river through the terrain.

. Grid Snap To Size - just leave this at the default for the moment
. Effective Tool radius - Allows the selected tool size to be small, medium or large. This is effectively the size of your "sculpting brush"

Lastly there is a tools options selection which allows you to control all sorts of cool tool parameters. You should only fiddle with these things if you know what you are doing. It is not necessary to change any of these settings to make maps for PCK.

Below is a SS of the tool bar.

I think it would be a really good idea at this stage to just get in and start playing with all the tools in NTG to get a good feel for how they work [:D]

Image

RE: Stridor's Map Making Tutorial Part #1

Posted: Sun Apr 27, 2008 12:28 am
by Stridor
Ok I am using the tools to sculpt my terrain. The view below roughly corresponds to the view in GE from post #1 above.

However even at this stage, I have realized that what I want is only going to be "based" on the GE map. For a start GE doesn't tally from my memory (it has been years since I have been back though). Also the terrain is probably too mountainous for the effect I want anyway so I am going to tone it down just a little [:)]

Image

RE: Stridor's Map Making Tutorial Part #1

Posted: Sun Apr 27, 2008 12:55 am
by Stridor
Ok here is the finished map. It took me about 30 minutes to do from scratch. I have used the lock tool to allow flattening a road pathway through the terrain (shown). I have to use almost every tool on the tool bar to do it. The touch up tool which allows you to move individual points was helpful for getting the river bed just right.



Image

RE: Stridor's Map Making Tutorial Part #1

Posted: Sun Apr 27, 2008 1:04 am
by Stridor
NTG has a neat view mode where you can walk on the terrain. To select this view mode, check View->Walk on Terrain. Now zoom the camera down to the ground level and you will find that you stick to it. Below is a view from ground level South East corner looking across the river to the North West corner. Remember to reset your camera mode to default after you have admired your work from ground level.

I should note at this point the the contour colors chosen by NTG have no bearing on anything at this point. They are only there to help show you the elevation changes. If you want to, you can turn them off and view the map in a Grey scale (see View->Light Map options).


Image

RE: Stridor's Map Making Tutorial Part #1

Posted: Sun Apr 27, 2008 1:17 am
by Stridor
Ok now you have finished with NTG it is time to save your work (remember to do this often). It is also a good time to talk about where you are going to put your map and workflow files.

Your map needs to reside in:

<Kharkov Install Directory>\Media\Your Map

Where you put your workflow development files is up to you, I put them in the same directory as the final map so that everything it kept together. For the purpose of this tutorial I have made a new Map Directory under Media called:

\Media\Colo_River

As this will be the name for my map. Incidentally you can see the other game maps in the media directory as well, we will be making use of them shortly.

Ok time for another concept. NTG allows you to sculpt terrain to ultimately make a thing called a heightmap see http://en.wikipedia.org/wiki/Heightmap for more information. This heightmap is then "fed" into a 3D modeling program to allow us to move onto the next phase of map making. Now you could of course use a 3D modeling program from the very begining to make your maps without needing to use NTG, however NTG has tools perfectly suited to the task and is really easy to use. Most 3D modeling programs (because they do so much) have much steeper learning curves.

Alright so now we need to export our NTG mesh as a heightmap. To do this go to File->Export->Heightmap. you will then be presented with a save dialog box and a default filename called image. Save your heightmap to wherever is most convenient for you (I saved mine in <PCK>\Media\Colo_River as image.bmp)

RE: Stridor's Map Making Tutorial Part #1

Posted: Sun Apr 27, 2008 1:40 am
by Stridor
Alright the next step is to open up your heightmap in your working graphics editor. You could theoretically use MS Paint, but I wouldn't recommend it. Any quality editor (including many free ones) will suffice. I happen to use photoshop but it is not required. This tutorial will not teach you the finer points of 2D graphics editing as that subject is so vast. I will assume that the reader has at least some basic understanding in this regard.

You will notice a few things straight away.

1. The heightmap is 65x65 pixels. This is because you specified a 64x64 grid when starting your mesh in NTG remember? so to define 64 squares you actually need 65 points at least in one axis. This can cause some confusion depending in what way you view your height map so please keep it in mind.

2. 65x65 is SMALL, that is ok [;)]

3. The orientation of the heightmap is probably not the same that you were used to in NTG, to fix this you will need to rotate and flip the image until it matches your perspective.

This is demonstrated below. Note that the heightmaps have been scaled up 400% for clarity in this SS.

Image

RE: Stridor's Map Making Tutorial Part #1

Posted: Sun Apr 27, 2008 1:56 am
by Stridor
After you have re-oriented your heightmap to your liking, make sure to save it again. Now the next thing to do is to start some preliminary work on the map.bmp. This is a 1000x1000 pixel bitmap (1 pixel = 1 meter) which the game uses to identify structures and terrain, for path finding and LOS. It is colour coded, each colour corresponds to a given terrain element. You can have a look at the map.bmp files which are found in other game maps to get a general idea of how they are structured.

Erik has the colour code guide and should probably make it a sticky on this forum.

So to make a start on your map.bmp, take your heightmap and resize it in your editor to 1000x1000. This will make the map blurry as the source was 65x65 but that is ok.

Now on a new "Layer" start to paint on some basic terrain elements. For the moment I am going to concentrate on the river, the river banks, and roads as these will effectively allow me to have "calibration" points for the next phase of the map design.

See the colour guide for more details, but essentially blue = river, black = roads, brown = mud, note the muddy river crossing. I recommend that you save your map.bmp as an internal format (eg psd) with layers intact as you are going to be coming back to it later on. Also use a hard edged "pencil" when drawing on the map.bmp. The rest of this map will be filled in later, the background heightmap will also go but it is useful for the moment.

Ok will now be moving this to Part #2 where will will be importing all our work so far into Milkshape [:D]



Image

RE: Stridor's Map Making Tutorial Part #1

Posted: Sun Apr 27, 2008 1:24 pm
by Mraah

Another well done tutorial!! Thank you. We should crown you king ... King Tut ?

I do have a request ... Using my tutorial on Real World Height data, could you go back to your secret farm in the hills and post a screen shot of the end results through MS3D. I'm curious as to how you remember those hills compared to what the image spit out.

Thanks again. I appreciate your time spent in educating all of us ... including those humans who smell worse than me!

Rob


RE: Stridor's Map Making Tutorial Part #1

Posted: Sat May 03, 2008 10:06 pm
by Stridor
As an addendum to this process it is worth mentioning that you might want to smooth out your height map prior to importing it into MS3D. NTG offers many terrain modifying algorithms, but I never found any of them really suitable for my purposes. I found it was best to open the height map in photoshop (or you graphics editor) and apply a blur (Gaussian 1-2 pixels) to your liking. This will help smooth out any bumpiness in the heightmap which was left over from editing in NTG.