The New Map Making Tutorial (Full Version)

All Forums >> [Current Games From Matrix.] >> [Discontinued Games] >> Panzer Command: Kharkov >> Maps, Models and Mods


Stridor -> The New Map Making Tutorial (8/19/2008 6:38:12 AM)

NB: This tutorial supersedes all prior map making tutorials which should probably now by unstickyed and deleted.

I want this thread to serve as a kind of "first pass" documentation for the operation of the new map maker program which is in open beta at the moment. Hopefully this will answer any technical questions you may have, as well as illuminating those who already use the map maker on any hidden secrets [;)]

Please don't post in this thread, any comments can be made in the map maker beta thread.

Before I continue I wanted to first explain some of the basics about maps for PCK.

Unlike CMx1 (? CMx2) maps in PCK are mesh/texture based, not tile based. This has pros and cons. A Mesh/Texture based system can have virtually infinite ground resolution precision in each axis. There are no graphical tile seams, objects can be individually placed to sub millimetre accuracy. LOS systems are usually ray casted so can be far more realistic than tile area based LOS systems. No more 45 degree road/river bends!

So far so good, but what about the downside. More complexity, more computations (faster hardware needed), and finally more difficult to make maps for (both designed and random).

This is why a map maker for PC has been a long time coming.

I think on balance it was a wise move to go with such a system (c/w tile based) at this stage, given that even modest computing hardware of today can render such systems at good speeds.

Ok enough of the tardy excuses, so how do you make maps in PCK with the new map maker?

First there are two things you will need.

1. Is the Map Maker program (which some of you will have)
2. A simple paint editor to "draw" your map (MS Paint will do).

Now whilst MS Paint will do, a better editor will help immensely. You can use whatever you are comfortable with. If you don't want to spend any money and want to get a well regarded useful extension to MS Paint, consider paint.NET which is what I will be using for this tutorial.

In overview here is how you make a map in PCK with these tools.


1. Draw your map in paint.NET
2. Import your drawn map into the map maker (MM)
3. Use MM to: adjust elevations, create water-ways, place fixed objects, autogenerate variable objects, adjust the look and lighting of the map, place labels and grids.
4. Build your map in MM
5. View your map in the Scenedit program (and make any final adjustments)

You map is now ready to be used in game scenarios. In reality you will probably repeat stages 3-5 several times as you incrementally improve your map.

How long does it take to make a map?

A really quick and dirty, basic job in about 20-30 minutes. Approximately a couple of hours for a good map. Of course you can obsess about the smallest detail and you can spend literally days making something really special if you want [:D]

On to Step 1

EDIT: I will be using MM build 0.9b which is a slightly more advanced version that the one you probably have right now. The new version will be out shortly. Many of these lessons will still be relevant. If something doesn't work with your version as I have described it here, it probably means it is not in your version.

Stridor -> RE: The New Map Making Tutorial (8/19/2008 6:47:52 AM)

Step #1: Draw your map.

(Get your map)

I thought I would use this map that I got from GE. My intention is not to replicate it precisely (although that would be possible if required), but rather to use it as an example of how you can convert GE maps into PCK maps.

Ok so this map is correctly scaled at 1km x 1km and is 1000x1000 pixels which is just the right format that PCK needs. Whilst the MM can make larger maps for future PC versions, the current PCK engine only allows a 1kmx1km playfield so that is the size to use for right now.

Load this map up into your paint editor (paint.NET).


Stridor -> RE: The New Map Making Tutorial (8/19/2008 10:49:07 AM)

I don't want this to be a tutorial on paint.NET. If you can use MS paint you can use this. The real advantage for this application is the ability to work with layers. The other important point to note is that you want to keep your color distribution as simple as possible so ensure that antialiasing mode is off (ie aliasing is selected).

The controls on the bottom of the Layers box allow you to work with layers. What we want to do is to create a new layer and "draw" our map on top of it just like tracing over grease paper when you were a kid [;)]. You can use whatever colors you want to represent different terrain elements, see the next posts ...


Stridor -> RE: The New Map Making Tutorial (8/19/2008 10:55:34 AM)

Ok here is my "Structures" and "Road Layer". I have reduced the transparency of the base map so you can see the overlay a little easier.

For the "Road Layer" I used 3 colors

Black - for the long (straight) paved road
Brown - for the major dirt roads
Grey - for the minor dirt trails and large cleared areas.

For the structures layer I used orange to highlight where structures (buildings) are on the map.


Stridor -> RE: The New Map Making Tutorial (8/19/2008 11:02:40 AM)

And here is the finished map with all the terrain elements which were identified on the original map now drawn in. I had about 9 layers in total (grass, tress, water, fields, etc, etc) some of which can be seen in the Layers box.

Notice that the final layer is called "Background" and is at the bottom and colored pure white. The original map is turned off at this stage.

Now it doesn't matter what you call your layers or what colors you use. Just make sure they make sense to you. Soon we are going to turn this cartoon into a real PCK map. The only limitation is that the map must be 1000x1000 pixels and you can use up to 64 individual terrain colors.

Just for reference it tool me about 90 minutes to draw up the base terrain map.

Save your map as a bitmap. You will be asked if you want to flatten (collapse all the layers) the bitmap. Select yes.

It is probably worth saving the map in paint.NET's native file format (*.pdn), so you can get back to working with your layers if you need to make any adjustments in the future.


Stridor -> RE: The New Map Making Tutorial (8/19/2008 11:35:16 AM)

Now it is time to move on to Step #2.

Loading the map into the MM

First a little introduction to the main MM UI.

To the left is the left of the MM screen (hilighted in blue) is the main control pane. Here you can import height maps, terrain maps (which you drew in Step #1). Set the elevation points of the map to known real world elevation points, apply different ground textures, add structures (both fixed and autogen) to your maps, set the map lighting and skybox controls, add labels and control the color mapping between your terrain map and the AI map that the PCK engine uses (this section is off screen).

Note as this control pane is rather large, it can be scrolled with the mouse wheel or by left clicking and dragging on a clear area of the pane UI to shift the pane up and down to allow you to get to the controll that you want.

Next up in red is that main map area. This is where you will interact with the terrain map (pan + zoom), place map objects + labels, and also where you will sculpt your heightmap.

Below in green is the map loading (reload an older map) and building pane. You can also read the games log files here by pressing the aptly named Log button. To the right of the Log button is the MM status bar. Although clear at the moment, here is where you can see details about your map which is under the mouse cursor (terrain type, map heights, building messages etc).

Finally in yellow-orange to the right is the heightmap sculpting tools. Use these tools to control the map elevation contours (which we will get to later).


Stridor -> RE: The New Map Making Tutorial (8/19/2008 11:48:23 AM)

At the moment the only button which you can really access is the little folder button next to the H/Map: control in the top left corner. Press this button now to import a heightmap. Now for this tutorial we are going to use the default "flat" heightmap which comes with the MM. It is called "LoRes_HM.bmp" and it can be found in the root PCK directory (which is the default directory which gets opened when you press that button). Please select that file now.

Notice that the map area now is loaded with a large Grey Box. This is the default heightmap. It is 100% flat! At the moment we don't need to worry about the heightmap until later. You should also notice that the little folder button is now available to press next to the T/Map: (was AI/Map:) control. This will allow you to import your terrain map which you worked on during Step #1. Please find that bitmap and load it now.

Ok just a few quick tips first.

When you are loading your terrain maps, it takes the MM a little bit of time to classify all the colors on the map (it needs to build a visual picture). Please be patient. The staus bar will keep you informed of the import progress. If an error message pops up telling you that there is more than 64 colors in the image, you will need to go back to paint.NET and see what is going on! It is also important that you let the map load into visual memory for a few seconds before moving away from the MM window to do something else whilst it is loading. The MM takes a screen snapshot of the map and if another window if overlying the MM when that occurs you will get a > 64 color error. It only takes a few seconds, so please be patient.

If you have done everything right your MM screen should look like this ...


Stridor -> RE: The New Map Making Tutorial (8/19/2008 12:36:10 PM)

Now we are ready to really start doing some interesting stuff [:)]!

There are any number of ways in which you can work on your map. I personally like to start by defining the ground textures so that is where we will start here as well.

The goal is to make our map look as close as possible to the original source map. Whilst we could simply paste the original map texture onto our map to get it looking exact, there are several problems with that approach. The first is that it would require a huge amount of video memory to do properly and it would kill the performance of most computers today. Secondly there would be problems with aligning accurately in game assets to the "mega" texture.

It is for these reasons that most graphics engines today attempt to recreate real maps by a mask and texture technique. Now you don't need to know any of those details as the MM basically does all that work for you. All you need to know is that you are going to link texture patches to each of those terrain colors you worked so hard in getting right.

To do this we use the texture control which I have enlarged below. The controls are as follow:

1. Texture auto "Name" button. You can press this button to autoname your texture to the selected terrain color. I suggest you don't it is better to give your textures names that are meaningful and it take but a moment to do so.

2. Texture name box. Type your texture name here (also shows the currently selected texture name). You would normally associate the texture name with some meaningful terrain structure like "Roads" or "Trees", etc.

3. Browse textures. Click this button to browse all available textures on the drive. New textures are being added to PCK by the modders and as the texture library grows so too will the quality of the maps. As a tip, when browsing for a texture select the explorer option (Views -> extra large icons). This will give you a little thumbnail of the texture so you can see exactly what it is that you are searching for.

4. Add / Modify texture. If you want to add a new texture define click here. If you want to update an old texture define also click here, otherwise your changes will be lost (trap for new players)!

5. Delete selected texture.

6 & 7. X and Y tile values. Here you can define how many times a texture tile gets repeated across the entire map. This setting controls how "stretched out" the texture will be on the map. Values of 50x50 are common (this implies that the texture is repeated 50 times in both ground axis). If you want more ground detail increase these values. If you want to have more of a blurred look, decrease these values (minimum is X:1 Y:1)

8. Texture Rotation (0 - 360 degrees). In order to prevent texture tiling pattern artefacts you can rotate a texture to help break up symmetries. Zero is north (top of the map) facing.

9. Texture blur value. This controls how blurry the edges of you texture masks will be. Commonly set to 1.0 but can vary. Example a paved road is very defined at the edges so will have a low blur value (eg 0.5). A patch of grass is likely to have a very indeterminate border so will have a higher value (eg 2.5).

A. Texture transparency. This controls how dense the texture is draw onto the map. With lower values the texture will be semi transparent and allow underlying textures to show through. Use this to create merged terrain effects (eg sand under grass).

B. Terrain color value the texture is to be applied too. Click on this box with the mouse and the cursor will turn into an eyedropper. Next click on one of the map colors. This will then define which map color the texture will be associated with.

C. Texture selection box. This box contains the list of currently active textures. Textures which you add will be in black and at the bottom of the list. Note that there are 5 default "common" textures which every map must have (they are in grey). Whilst you can change the values of these default textures you can't delete them. The defaults are:

skymat - This is the texture which repeats to the horizon outside the play area. You can only change the texture graphic, the other values are meaningless.
terrain - This is the base "bottom" texture of the map. Every map must have one. You can change everything except blur and transparency.
wall - This is the texture the map edge "walls" have. Every map must have one. You can change everything except blur and transparency.
water - This is the texture the map any water will have. Every map must have one. You can change everything except blur and transparency.
grid - This is a special texture for those of you who like terrain grids on your maps. You can change everything. The grid color is taken from the color dropper box. The texture itself is meaningless for the grid. The normal texture blue setting controls the Grid Width, and you can change the Grid spacing with the X: and Y: tile controls.

D & E. Move texture up and down the list. Textures are drawn on the map top down. That means the last texture defined on the list is the last to be drawn. Depending on your texture transparency values re-ordering the list can dramatically change the look of the map. In general order the list as you logically would. Roads go on top (eg later in the list) of grasses. But snow may go on top of roads ,etc.

F. The actual texture image (thumbnail).

Playing with the texture controls can be a lot of fun as you can really change how your map looks by just changing a few of the control parameters. I accept that when you start out it may seem a bit daunting, so I suggest just try adding one texture at a time and then building your map to see how it looks in the. As you better understand what each option does, you will be able to added textures faster and with more control on the final output.


Stridor -> RE: The New Map Making Tutorial (8/19/2008 1:10:05 PM)

Ok let's define the base texture layer.

The default is set to tiled_grass02 which really doesn't represent the base layer of the real terrain. That is ok we can browse for another texture ...


Stridor -> RE: The New Map Making Tutorial (8/19/2008 1:36:49 PM)

The only problem is that I don't see the exact texture that I want, a sort of dirty splotchy greeny brown is what I need.

Ok so what to do?

I can combine two textures to get the exact effect I am looking for. In this case I will combine the tiled_grass02 default terrain texture along with the tiled_dirt01 texture to get exactly what I want.

To do this type "base" into the texture name box. Click the open texture button and load up the tiled_dirt01 texture. Next click the C:[] box to get the eye dropper and click on a "white" area of the map. Now remember before when I told you that colors don't matter. Well I lied. There is *one* special color and that is pure white ("#FFFFFF" in hex). This color is considered "Clear" in the PCK engine and mixes with the base terrain texture regardless of how much of it is showing on the map. This provides us with a very handy loop hole. By setting the base (white) texture value we can mix it with the terrain default texture to get exactly what we want!

Next type 2 in both the X and Y tile boxes. I want the dirt texture to be stretched out a bit so it looks a bit "blotchy" rather than dense and "noisey". Type 0 in R. Set Blur to 1.0 and set the transparency to 0.4 or ~ 40% transparent. This means that 60% of the base textures will be the greeny tiled_grass02 texture and 40% the browny tiled_dirt01. Perfect!

Now press the Add texture button and the "base" texture should appear in the list.

Ok now to build your first map [8D]!

Type the name of the map you want to build in the Name box at the bottom of the screen. In this case we will use the name "Tut". Now press the build button and ... The MM complains that we haven't defined a Sky Box!. For now press the Sky Box: browse button (you can find it under Lighting) and pick one of the sky boxes, we will get back to skyboxes later, for now just pick any one.

Ok now press the build button again. After a few moments the MM should inform you that it has built the map and ask if you would like to view it in the scene editor (SE). Press Yes and then wait a few moments while the SE loads the map. If the SE screen goes blue it means there was a problem at some stage (check the log file via the log button). Once it has loaded you will need to drag the map with a left mouse click and drag action. (Note the map may appear off screen top left at the start of the SE session, you may need to drag it back to see it!) The SE can be a pain at times. I don't have any control over it, it was an internal development tool and is quite rough. It serves the purpose of reviewing your maps however, and much faster than opening them in the game. Documentation for the operation of the SE can be found in the Manuals folder of the PCK install (Map Editing Addendum.pdf). We will discuss the SE in more detail later in the tutorial.

For now you should have your flat single "merged" muddy brown map on the screen like this ...


Stridor -> RE: The New Map Making Tutorial (8/19/2008 1:46:56 PM)

Next I did my roads and I had

dirt road
paved road

This was probably excessive. I should have combined tracks and dirt road together. In general whilst lots of textures look good they can affect performance so it is a good idea to use the bare minimum needed to get the map to both look good and run faster on a large range of hardware.

When I rebuilt the map this is how it looked in the SE.


Stridor -> RE: The New Map Making Tutorial (8/19/2008 1:51:51 PM)

And finally with all my textures defined ...


Stridor -> RE: The New Map Making Tutorial (8/19/2008 2:01:14 PM)

And here is a direct comparision between the GE original and the MM reproduction. I probably could have done an even better job if I had more time (by this stage I was at the 2 hour mark since starting the project), but I think this shows well enough what the MM is capable of producing.

You will be able to produce maps in the MM which are far far better than those which came stock with the game. That is because the original map developers had to do all the old maps the hard way, by hand. The next step is to start adding stuff to our map!


Stridor -> RE: The New Map Making Tutorial (8/21/2008 10:51:12 PM)

Now it time to start adding some stuff to our map.
This is a *BIG AND IMPORTANT SECTION* so please take your time in reading it.
For that we need to look at the “Structures” Box as this is the control which allows us to do that.
Firstly a quick note about structures. They come in two types. Fixed structures which are fixed where you place them on the map and autogen structures which are randomly placed on the map depending on the parameters you set. Anything which is map place able (including animals for example) is called a structure in MM parlance.
A particular farm house you want placed is an example of a fixed structure. A forest of trees (which you wouldn’t want to place tree by tree by hand) is an example of an autogen structure.
The structure controls are as follow:

1. Structure auto “Name” button. You can press this button to autoname your structures, recent changes to the MM has may this function redundant. A structure (fixed or autogen) must have a unique name as that is how the MM tracks them.

2. Structure name box. Type your unique structure name here. Eg “Large Farm House”

3. Browse structures. Click this button to browse all available structures which you can place on your map. Due to the large number of objects which are available these are sorted by name (eg Vegetation, Bridges, Small structures, etc). Many more structures are being added to the library all the time by dedicated modders like SAF_Biffa and Benpark.

4. Add / Modify structure. If you have made any changes to a previously placed structure and press this button those changes will be saved. If this is a new structure then press this button and it will allow you to add the structure to the map (by clicking on where you want it). A recent change to the MM means that there is a new, easier and much faster way to add structures (see below).

5. Delete selected structure.

6. Building Type. When you choose to place a building in which squads can mount, you need to define the building type. This is coded as follows
None, Foxhole, Trench or
Light / Heavy and then the number of squads which can fit into the building and the number of stories.
Eg. Heavy / 1 / 2. This defines a heavy (brick/stone) building which can house one (1) squad and is two (2) stories tall.

7. Structure image. When you browse and select a structure you will see a thumbnail of it here. If a 3D version of the model has been defined (which it is for most) then you can left click and drag to rotate the thumbnail image in 3D, so WYSIWYG! If a 3D thumbnail model is not defined then you will only see a static image and will need to build then map to see it in 3D. In this case the “structure” is a cow.

8. The structure alpha value. This mostly applies to vegetation structures and defines how “full” or “thin” the image is. To experience the effect it is worthwhile trying it out with different trees. Essentially you can use alpha to turn a tree which is nice and plump in summer (alpha = 1) to a tree which appears to have lost all its leaves in winter (alpha = 255). This value can range between 1 .. 255.

9. H: or “Has Height” check box. Check this box if you want game units to be able to move on-top of this structure. The classic example would be a bridge. If this isn’t checked for a bridge then game units will “fall” through.

A. N: or “Normalize” check box. In graphics parlance a Normal is a vector which is perpendicular to the plane. Say what! Imagine a cow on a hill side. Note how the cow tilts or “stands on” the hill. A house whoever (unless it is badly built) is always level. So use this check box for things you want to conform to the terrain (like cows and craters etc). Things like buildings (and even trees which tend to grow pointing straight up) should have this check box turned off (unless you wanted to use the effect for damage or rubble).

B. B: or “Billboard” check box. Check this box if you want the structure to always face the camera (like the CMx1 trees of old). Don’t know why you would, slightly saves on graphics processing time but not much, probably leave this option off.

Ok now we move on to the autogen specific part. Autogen structures share the same main parameters as their fixed brethren (as above) but they also have some extra options which are:

C. Density (dens) value. This is the density of the autogen object in number per square kilometre. Example, let’s say you wanted to build a forest of a particular tree type and you knew the historical (or otherwise) tree density for that tree. Type than in here and when the MM builds the map it will produce this tree in numbers consistent with the entered density. For a fixed structure the density = 0. If you change the density of an already placed autogen structure to zero it will in effect become a fixed structure. As a quick tip shortcut if you click on the label “dens” it will reset the density back to zero.

D. Random Orientation select box. Here you can select how the structure is orientated. The options are 0 = fixed. Z = random rotation 360 rotation (ie rotate around Z axis), XY = fixed direction but variable pitch and roll (ie rotation around X + Y axis) and XYZ = variable rotation and variable pitch and roll. Although this is in the autogen section it applies to fixed structures as well. Example would be to autogen a forest of trees. By setting this option to XYZ then each autogen tree model will have a random rotation, and have a random pitch + roll. This will give your new forest a lot of variety and produce a more realistic looking forest than if all the trees looked identical. There a lots of uses for this control.

E. The terrain color which is associated with the autogen structure. Click on this box then use the eye dropper to pick a color area off the map you want the autogen structure to be associated with. This way you can define different autogen rules to different parts of the map. Note a new way has been developed to do this much faster (see below)

F. The structures list box. You can select previously defined structures from here by clicking on them. Note autogen structures are present in a grey color with a little indent like this “ o “ + name. They also have a tilde “~” and a number which represents the “ballpark” number of structures of that type which will be generated. In the following example screen shot it decodes as

“ o cow01_245312 ~ 21” This means that this cow model will be randomly repeated to the selected terrain color approximately 21 times. The guess number is usually accurate to about 10% and is updated automatically when you change the density or the terrain color. Use this knowledge to get the number of objects roughly to what you want before you build your map.

The other defines for this structure are:
Building type = None (It is a cow man), you can’t walk on it (H = clear), it is normalized to the terrain (N = checked), it is not billboarded (B = clear) there are 250/sq Km and each model should be rotated on the ground. Note how I didn’t define XYX in the random orientation select box as that would give a series of cows which would appear to be listing on the ground!

G. Move selected structure up the list. Helpful to keep related structures grouped.

H. Move selected structure down the list. See G.

I. Sort structure list. Puts all autogen structures at the top and sorts by name alphabetically. Is a godsend if you have a lot of structure defines.

Well that’s it. There is a lot to the structures section and you can use it to do lots of interesting things. The next section will show you the exact steps needed to start putting stuff on the map.


Stridor -> RE: The New Map Making Tutorial (8/22/2008 11:20:44 AM)

Let us now place out first object.

I want to place a tractor in a little clear patch near the centre of the map. The easiest way to do this is as follows.

First ensure that you are in Navi (Navigation) mode (see SS). This is the default mode and will be set unless you fiddled with it.

You can add stuff to the map at the default zoom level, but if you roll the mouse wheel whilst the mouse cursor is over the map then you can zoom the map into the next level to help you place your structures more carefully. So do this now.

In zoomed in mode you can pan the map around by holding down the middle mouse button (wheel) and dragging. Pan to the selected area which is near the middle of the map.

Now we need to get a tractor structure. Click on the browse structure button and you will see that you can choose from a range of subdirs. Try the Misc subdir. Set windows explorer views to show Large Icon thumbnails. Under Misc find the tractor thumbnail Kharkov_tractor01.bmp. Select this object. You should now see a little tractor image loaded into the display box. You can left click and pan + spin this object around to get a better view of it if you like.
Time to place the tractor. Make sure Building Type is set to None, alpha to 1. H should be clear. N should be checked (a tractor will conform to the terrain contours). B should be clear. Make sure density and random orientation are set to 0. Great. Before (probably the build you have now) you needed to give the structure a unique name and then click on the little tick mark and then click on the map. Pain. Now all you need do is simply shift left click on where you want your object to go and it will be named and placed for you on the map immediately. This makes it really fast to make lots of copies of similar objects (eg trees, fences, telephone poles, etc). Another nice Shift click feature is that the structure box will also pick up the terrain color for you automatically which will help with autogen structures.

Anyway if you did it all right it should look like the screen shot below (the name will be slightly different). You will see a little tractor placed on the map (you only see the little thumbnails in zoomed in mode). If you are familiar with my Scenario Editor working with map objects is easy. The little direction carat allows you to click and drag to change the objects direction as you need.

Ok press the build button and in a few moments you should see your new map, with a tractor!


Stridor -> RE: The New Map Making Tutorial (8/22/2008 1:38:16 PM)

And here it is our lone tractor!

Of course it would be a major PITA if we had to place very single structure individually by hand. Luckily we don't and that is where the autogen system comes in really handy [8D]


Stridor -> RE: The New Map Making Tutorial (8/22/2008 2:09:58 PM)

Next I want to place some grass in my grass areas. But I want lots of grass. So I press the browse button, look for some vegetation under the vegetation subdir and choose the grass model I want.

Now as the grass is going to be an autogen structure I need to type in a density. Hmm what to type. Well I start with a value of 10000 (= 10000 structures / sq km), I chose the Z option from the orientation list as I want the grass structures to be randomly rotated, next I shift left clicked (remember Navi mode must be active for this to work) on a green grass area. This put a little grass Thumbnail on the map to remind me that it is an autogen object. Note how autogen objects have a dashed border to remind you that they are not fixed (which have solid borders). Ok the selection box is telling me that with a density of 10000 the MM is expecting to make ~ 850 grass structures. This really isn’t enough, so with the grass structure still selected I type 40000 into the density box and press the little tick mark to update the values. Now the selection box is telling me it will make ~ 4300 grass models. Much better.

Next I want to add some wheat to the wheat fields (colored pink in the terrain map). To do this I browse for a wheat model which will fit in with my map (thanks Benpark). Select it and type 20000 into the density box. I leave the normal option selected. I use an alpha of 32 because I don’t want the wheat to appear too plump. I also set the orientation box to 0 not R. Why? Well if you look at my map textures above, note how the wheat fields are all ploughed in nice neat horizontal rows? My wheat model is a long strip of several wheat bushes. If I randomize the orientation the wheat won’t align with the furrows. So by setting orientation to 0 all of the random models will take on the direction I set by the autogen prototype which I place on the map, and I place and rotate it so that it aligns with the texture. Now I just shift click on a wheat field color on the map and there you go a whole what field(s). The autogen box tells me it is going to produce about ~ 5500 models which sounds about right.

Press build and let’s see what we get.

You will notice that it takes slightly longer to build the map (and load it in the scenedit program now) as it is getting more and more complex.


Stridor -> RE: The New Map Making Tutorial (8/22/2008 2:16:47 PM)

And here is the view from the South looking North. In the foreground you can see the grass and the large wheat fields to the rear. In the distance you can see the little lone red tractor.


Stridor -> RE: The New Map Making Tutorial (8/22/2008 2:34:11 PM)

I continued to place autogen structures and a few fixed structures and after about an hour of tweaking the map was starting to take shape.

Almost everything you see here was autogenerated. Very little of it required placing fixed structured in the MM (including busted trucks and cows [;)]). Obviously for mission critical stuff you will still need to place things by hand now and again, but the autogen really does most of the work for you.

Here are some selected SS of how the map is turning out.

1. Looking from the south


Stridor -> RE: The New Map Making Tutorial (8/22/2008 2:38:10 PM)

A view of the main street and SAF_Biffas haystacks. All autogened.


Stridor -> RE: The New Map Making Tutorial (8/22/2008 2:47:42 PM)

Looking from the North. Maybe I overdid if with the shell craters? [;)] No matter easy fixed just drop the autogen density.

Ok, that is enough for now.

Our map is moving along quite nicely. There is only one problem though. It is flat as a pancake! We need to fix that and introduce the heightmap sculpting tools in the next lesson.


Stridor -> RE: The New Map Making Tutorial (8/24/2008 3:06:33 AM)

Now we turn our attention to sculpting the terrain “heightmap”. There are multiple references on the net including on Wikipedia which describes what a heightmap is so I won’t bother repeating that here.

Before I continue this is another BIG AND IMPORTANT section, so get comfortable before you start. You may want to print it to make it easier to refer to.

If you are coming from designing CMx1 maps, then think of heightmaps as a more refined way of setting the elevation at each tile. However instead of just 20 different terrain elevations which you can have in CMx1 you can have 256,000 giving a far more realistic looking and behaving terrain.

One important difference from CMx1 however is that instead of editing the height of a particular “tile” (= 20sqm area) you are editing the height of the corner points of the base terrain triangle mesh. Imagine the mesh landscape of PCK as the surface of a trampoline. By editing the heightmap you are adjusting the height of numerous “poles” which are pushing up under the surface of the trampoline giving the terrain height. This provides for more realistic terrain but obviously at greater complexity. Don’t worry about that too much right now, the HM editing tools really make the whole thing pretty intuitive.

So far in the MM we have only looked at the color coded terrain map. MM has another mode in which we can work with the gray scale coded heightmap. Each change of gray represents a different elevation (which you can individually define). In general the darker the gray color the lower the elevation (although this can be inverted). The MM supports importing of heightmaps from an external source, or you can edit your heightmap entirely from within the MM, and this is probably the best option now.

As always I will give you a brief overview of the UI before proceeding with the example. We will start with the map height controls.

1. M_Ht0 which is the Map height point 0 in meters above sea level.

2. M_Ht1 which is the Map height point 1 in meters above sea level.

3. M_Gp0 is the Gray Point for M_Ht0 in hex (00 = black, FF = white)

4. M_Gp1 is is the Gray Point for M_Ht1 in hex.

5. Is the actual gray color which is reflected by M_Gp0. You can change this color by typing in a new value or by clicking in the box and then using the eyedropper to pick a gray scale color off the heightmap.

6. Same as 5. But as for M_Gp1

These controls allow you to set your elevation scale. To do this you need two known height points above sea level and then map those to two gray scale points which represent those height points. Once that is done the MM will have an accurate height scale for the map.

Example. Let’s assume that you have a map with a body of water on it (sea level) and a known hill at say 55 meters tall. Type 0 into the M_Ht0 box. This is our sea level. Next click on the M_Gp0 color box and then use the eyedropper to click on the map at the site of the water. This will associate the height of 0 meters (sea level) with the gray scale for the water. Next type 55 into the M_Ht1 box. Click on the M_Gp1 color box and then click on the very tip of the known 55 meter hill on the map. Now the MM will have established a real world height scale to the heightmap gray scale. When you edit the heightmap any gray colors which fall under 0 meters will be underwater. You can change these values at anytime you want and the map will be rescaled.

Let’s move on to the actual heightmap (HM) sculpting tools.

7. The Navi button. If the navigation mode is selected you can place structures in this mode using the shift click method described previously. This mode also prevents you from making accidental HM changes, so is not the best mode to do any HM editing.

I should add at this stage that if you want to see your HM you can do so by holding down the shift key and rolling the mousehweel whilst over the map. This will fade the terrain map out and the heightmap in, in steps. This is handy as it allows still seeing some of the terrain map showing through, so that when you make HM changes you can do so around the known terrain. Remember mouseswheel by itself = map zoom. Hold shift + mousewheel = control HM opacity.

8. The Adjust mode. All the following modes allow you to make HM changes, the first is the adjust mode. In the Adjust mode if you left lick on a gray value it will lighten (make it more white hence raise the elevation) and if you right click on it, it will darken it (lower it). How much of an area it will affect and by how much (the intensity) will depend on your brush settings (see I & J). You can make very subtle changes or very large changes with this tool. You can also click and drag on the map to make changes quickly. Let’s say you want a quick mountain range. Select Adjust. Set the appropriate brush size and intensity and then just left click and drag the range on the map. Made some of it too high? Simply use the right click and drag to lower it again. It really is very simple and quick. This is the main HM editing tool. With it you will be digging trenches and river beds and raising hills in no time!

9. The filter mode. The problem with just using the adjust mode will be evident when you come to review your map. You will find that the terrain elevations produced look a bit blocky or jagged and unnatural. To fix this problem we can smooth away these imperfections with the filter tool. Much like the adjust tool the filter tool size and strength depends on the brush settings (I & J below). Hold the left mouse button down and drag the mouse over the problem areas and you will see the heightmap elevations will start to blend or smooth together. More smoothing = more blending. There does come a point of maximum smoothness when doing more filter smoothing won’t get you any additional benefits. Now sometimes too much smoothing also produces artificially smooth terrain. You can fix this with the right mouse button in the filter mode as this adds Gaussian noise to the HM to make it look like your terrain does have some normal random fluctuation on the surface. You best bet is the experiment with the smoothing and noise functions and see for yourself with subsequent map builds.

A. Lock mode. This mode doesn’t make any HM changes, but essentially is used to mask of an area of the HM to prevent accidental editing of it during HM editing on other parts. Use the left mouse button (you can drag) to lock a HM area. Use the right mouse button to clear a locked HM area. Locked areas are shown in RED. You can also shift + left click on an area to do a locked flood fill. Example, you want to lock out a river bed you just cut because you want to raise the nearby fields and don’t want to inadvertently damage your riverbed work. Draw a red lock circle around the river bed. Shift left click inside that circle and all of the river bed will be lock. Shift right click will do a flood fill unlock. See also (D & E). This is a useful tool for accurate heightmap editing. The brush size setting applies to this tool (see J)

B. Level mode. Sometimes you want to be able to level a particular area (say for the placement of buildings). In this case the level tool is your friend. To use it left click and hold on the map over a reference (gray) level spot on the map. Now whilst still holding down the left mouse button drag the mouse over the areas you want level with your reference spot. This is useful for cutting out roads on the side of a mountain or levelling fields or industrial areas etc. The brush size setting applies to this tool (see J)

C. Erase mode. This tool allows you to erase any heightmap changes you have made back to the original heightmap. The brush size setting applies to this tool (see J)

D. Zero Lock. This clears all map locks.

E. Invert Lock. This inverts all map locks.

F. Smooth. This function does a smoothing pass on the whole map. The intensity of the smooth is controlled by the brush intensity (see I). HM areas which are locked are not smoothed.

G. Noise. The opposite of smooth, also applies to the whole map.

H. Map tilt controls. In real life terrain on the km scale tends to be slopped in a particular direction. “It was uphill fighting all the way ...” This tools allow you to “tilt” the map in the appropriate direction, usually prior to making any other HM editing changes. This tool in combination with the lock tool can allow you to create interesting terrain topologies very quickly. Here is just a simple illustration. Let’s assume we want to make a river valley with a river running East – West and with hills to the north and south of the river (which is kinda what I want to do with my tut map actually). Well then on the default heightmap draw a red lock line with the lock tool EW across the length of the map. To the north of this line shift left lick to flood fill it so that the top half of the map is locked. Next press the tilt “up arrow” button a few times to raise the southern bank. Now press the inverse lock button (E) so that the bottom (southern) half of the map is now locked. Press the tilt “down arrow” button a few time to raise the northern bank and then clear all the locks. Set your sea level point to a lowest point in the river valley and water should flow in. There you go a complete river valley in about 10 clicks!

I. Brush Intensity. The little water droplets from smallest to largest allow you to adjust the intensity of the HM changes you make with the various tools which use this setting.

J. Brush Size. From smallest to largest this tool allows you to change the brush size of the HM changes you make with the various tools which use this setting.

K. & L. Undo/Redo the last HM change you made. Only one level of undo/redo I am afraid. Useful if you just made a mistake. Applies only the HM editing, not to any other areas of the MM operation.

M. Reset. Resets any HM changes back to the original bare HM. Doesn’t affect locked HM areas.

N. S&L checkbox. This checkbox allows you to toggle on/off the on-map structures and labels icons for a better view of the HM.

That was a big section. Congratulations for making it through. The good news is that there are no other really big sections. If you can understand the above, then you can understand map making in PCK. Whilst it appears complex on the surface, HM editing is actually the most enjoyable and quickest aspect of the whole map making process. The next lesson will go over a practical example.


Stridor -> RE: The New Map Making Tutorial (8/24/2008 3:59:24 AM)

Whilst GE is great for at least some form of topology information for areas within the US, it is still lacking for areas outside the US. So my original MAP in GE is flat!

So for the purposes of this tutorial I am going to use some creative license on how I want me terrain to turn out. In reality if you are aiming to create historical maps, then hopefully you will have a elevation map details to go along with your base terrain map.

The first thing I did was to turn off the display of the map structures by clearing the S&L checkbox. I made sure I zoomed out to max (mousehweel) and then rolled the mousewheel whilst I held down the shift key to set the opacity of the HM so that the terrain map was just showing through. Next I employed the little trick I explained in the last post and made a little river valley running EW. I then used the adjust tool to “digout” the pond area so that it looked roughly like my terrain map. I added some gentle rolling hills to the north and south parts of the map.

At this stage I set my map height scale to 0 meters = 5F and 25 meters = B8 (the highest point on the map). This showed the pond filled in with water quite nicely. I then smoothed the edges of the pond some that they looked natural on the build. Added some background noise and there you go a elevation HM in about 10 minutes.

I wanted to create a gentle rolling farm land like scene. With the tools provided you can create the Himalayas if you want!

This is what the MM looked like just prior to the new build ...


Stridor -> RE: The New Map Making Tutorial (8/24/2008 4:00:58 AM)

And here are the views from SE.

Looking South ...


Stridor -> RE: The New Map Making Tutorial (8/24/2008 4:16:09 AM)

Looking West.

It is probably worth noting that it is worthwhile doing a final height map scale just prior to your build to ensure that your real world elevations remain true to life. This is just in case you did a global smooth or noise operation which may have changed these values.


Stridor -> RE: The New Map Making Tutorial (8/27/2008 12:34:35 AM)

Now we move on to map lighting.

This is the area that can make the greatest atmospheric (character) changes to your map.

The lighting control box is shown below.

The controls are:

1. Skybox Browse button. You can choose from different skyboxes (horizons and skies) from here. Hopefully more skyboxes will be coming in the future!

2. Skybox tint color control. Click on this control to choose a color to tint your skybox. You can darken and lighten with black and white respectively. The MM will use this information to do a realistic mid tone color tinting of the skybox. Use this to adjust your sky color to the prevailing light conditions

3. Skybox tint intensity. Select from a tint intensity from (0 – 1). A (default) setting of zero will produce no tinting.

4. Skybox simulated image. The results of the base skybox and applied tinting are simulated here to give you some idea what the final sky will look like. Note, this is an approximation only, the generated skybox should look a good deal better as better (read slower more complex) tinting algorithms are applied to the finished product.

Note about skyboxes

The tinting system is designed to extend the useability of the existing skyboxes to allow them to be adapted to different lighting conditions only. Whilst the tinting system can produce some nice color effects, it would be foolhardy to take a base late sunset skybox and try to tint out the red to make it look like a clear blue sky, for that you need to create your own base skybox.

5. Light Strength (Light Str). This is a byte value (0 – 255) which determines the strength of the map light source (eg the sun or moon). 0 = No light. 255 = Maximum light intensity.

6. Light Direction (Light Dir). Looking at the map as one might a compass rose; this control determines the position on the light in the sky on the horizon plane. 0 = Due north. 90 = Due east. 180 = Due south. 270 = Due west. Accepted values (0 – 359).

7. Light Altitude (Light Alt). This is the angular altitude of the light source from the horizon. 0 = Horizon. 90 = Zenith, 180 = opposite horizon, (180-355) = light source below horizon. Accepted values (0 – 359).

8. Diffuse Light color. This sets the light color for all “directly illuminated” faces. Example:

Light source --------------- > |||| (object)

The front face of the object which is being “hit” by light rays will be illuminated with this color light.

9. Ambient Light color. This sets the light color for all “indirectly illuminated” faces. In the example above all of the other faces of the object except for the front face will be illuminated by this light color.

Note, you can use diffuse and ambient light colors to achieve some impressive lighting effects. These are both tied into the Light strength. If you find the illuminated faces of map objects to be too bright compared to the non illuminated faces, you can slightly darken the diffuse lighting (or lighten the ambient) to get the exact effect you want. By default these are both set to white. Obviously these lights should both come from the same color type (that is if you want to be realistic)

10. Zfar. This is the visual clipping plane and also applies to in game sighting limits. Value in meters. Use this if you want to extend or limit sighting (eg fog or snow). Default is 750.

In the next few posts I will demo the differences that lighting can make to the map. I should note at this point that several of the game models have a bug in them which prevents correct lighting to be applied to them. This issue is being sorted out and hopefully will be fixed in an upcoming patch.


Stridor -> RE: The New Map Making Tutorial (8/27/2008 1:51:43 AM)

“A dreaded sunny day so I’ll meet you at the cemetery gates, Keats and Yates are on your side, while Wilde is on mine ...”

Here I used some yellow lighting and a base skybox which was already quite bright to liven things up a bit.


Stridor -> RE: The New Map Making Tutorial (8/27/2008 1:54:51 AM)

"The last night on maudlin street ..."

Here I turned the gothic up to 11.

Note: Lighting errors on haystacks & Trees (to be fixed).


Stridor -> RE: The New Map Making Tutorial (8/27/2008 5:25:51 AM)

If you want to add text labels to your map that is pretty easy to do via the label UI control. You may need to scroll this control onto the main screen by left clicking and dragging the main UI pane.

This control should be quite self explanatory. Press the Label button to set a font style and color (size is not used). Then type your text label into the provided text box. The H: box allows typing in a height in meters. The S: checkbox means the height you typed in was above sea level (ASL). If you clear the check box it means the height is above ground level (AGL). The ASL option allows specing your labels to all be at the same relative height if you want to do that.

Press the tick button and then click on the map where you want the label to go. The cross (x) button deletes a selected label. If you click a pre-existing label on the map, you can edit the height and font provided you press the tick button again to confirm your changes.

Here is an example SS with some labels showing what is possible (stylistically of course it is better to use only one font type) [;)] You will also notice I have added a white grid via the grid control as well.


Stridor -> RE: The New Map Making Tutorial (8/27/2008 5:45:24 AM)

The very last thing we need to do before we are finished with the MM process is to map our custom terrain color schema into the legal AI map colors that PCK understands.

Once again this control is at the very bottom of the main UI pane so you may need to left click and drag scoll the control into view.

The list of colors contained in the Map: selection box are the terrain colors that the MM identified on the terrain map during the load process. The list of colors (and terrain tags) found in the To: selection box are all the legal PCK AI map colors.

To make a mapping simply select a terrain color either from the Map: list or by clicking on the color swatch tool and then using the eyedropper cursor to click on a color from the terrain map. This selects the terrain color. Next simply select an AI color from the To: box which this terrain color should map to.

And that’s it. When you build the map next time the MM will make a custom AI map which is based on your mapping choices. If you elected to use the default PCK AI map colors for your terrain then these will get mapped automatically by default.

That is the entire extent of the MM as of beta 0.9c, I doubt there will be any major changes to the operation of the UI between now and MM release.
The next phase of map editing is to load your map into the SE and make any last minute polishing changes as needed. The details of which can be found elsewhere.

I hope to see some really great maps in the next few weeks ...




Page: [1] 2   next >   >>

Valid CSS!

Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI