The New Map Making Tutorial

Please post here for questions and discussion about unit modeling and general game modding. You can also post your new units and modifications here.

Moderator: EagleMountainDK

User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: The New Map Making Tutorial

Post by Stridor »

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.

Image
Attachments
ss21.jpg
ss21.jpg (184.02 KiB) Viewed 554 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: The New Map Making Tutorial

Post by Stridor »

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.


Image
Attachments
ss22.jpg
ss22.jpg (146.26 KiB) Viewed 554 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: The New Map Making Tutorial

Post by Stridor »

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 ...


Image
Attachments
ss24.jpg
ss24.jpg (154.92 KiB) Viewed 554 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: The New Map Making Tutorial

Post by Stridor »

And here are the views from SE.

Looking South ...



Image
Attachments
ss25.jpg
ss25.jpg (210.12 KiB) Viewed 554 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: The New Map Making Tutorial

Post by Stridor »

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.


Image
Attachments
ss23.jpg
ss23.jpg (160.93 KiB) Viewed 555 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: The New Map Making Tutorial

Post by Stridor »

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.


Image
Attachments
ss28.jpg
ss28.jpg (52.15 KiB) Viewed 559 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: The New Map Making Tutorial

Post by Stridor »

“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.



Image
Attachments
ss29.jpg
ss29.jpg (237.22 KiB) Viewed 559 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: The New Map Making Tutorial

Post by Stridor »

"The last night on maudlin street ..."

Here I turned the gothic up to 11.

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



Image
Attachments
ss30.jpg
ss30.jpg (106.02 KiB) Viewed 559 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: The New Map Making Tutorial

Post by Stridor »

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.


Image
Attachments
ss31.jpg
ss31.jpg (125.37 KiB) Viewed 559 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: The New Map Making Tutorial

Post by Stridor »

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 ...

Regards

S.


Image
Attachments
ss32.jpg
ss32.jpg (35.96 KiB) Viewed 559 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: The New Map Making Tutorial

Post by Stridor »

Tutorial Update:

On the 9th Dec 2008 MM version 0.9f was released to the public. This version added new terrain models (courtesy of SAF_Biffa, benpark & Mraah), support for animated smoke plumes, better label support, better mod support (now the MM tells you which nonstandard mods you used and you no longer need to copy over MM support files for your map distributions) as well as support for better minimap colors.

The new map structures/vegitation can be found in their own subdirs off the Map Maker structure directory. The smoke plume can be found under the particles directory. This smoke plume is treated by MM as a normal structure so you can place them individually or even use them in autogen to make a field of fire and smoke.

The color translation and mapping system has changed slightly between what was descibed above and in the new 0.9f. This is what the new terrain mapping control looks like.

Image

1. Is a dropdown list of the hex value of the map colors found in the terrain map.
2. Is a eye dropper to select a color. Simply click on this box then click on the map to select that color into the selection box.
3. Is the PCK engine terrain AI map color you want the particular terrain map coor to map to.
4. Is a color selection which allows you to map the terrain map color into a color used for the minimap.

Normally for the minimap you will want to keep your colors simple and few to prevent the map from appearing too busy.

So in operation this is what you would do.

First select your terrain color either from the dropdown box in 1. or by using the eyedropper in 2 and select a color from the map.
Second from the PCK terrain box select the terrain you want to map to (3).
Lastly click on the minimap color selection box and pick a color (4).

MM will remember the translation links you have made.

With this system you can have multiple terrain (and texture and autogen) layers which map to the same PCK terrain and have cool looking minimaps as well.
Attachments
Untitled-2.jpg
Untitled-2.jpg (35.62 KiB) Viewed 561 times
Post Reply

Return to “Maps, Models and Mods”