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.