!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> SearchAndRescue Notes

SearchAndRescue Notes

Guilhèm BONNEFILLE


Table of Contents
1. Adding data
1.1. Creating a new scenery
1.1.1. Selection
1.1.2. Scene map and terrain textures
1.1.3. Height map
1.1.4. Registered location
1.1.5. Performance
1.1.6. FAQ
2. Ideas
List of Tables
1-1. Locations
List of Figures
1-1. Scene map
1-2. Height map source
1-3. Swap colors dialog
1-4. Levels dialog
1-5. First height map

Chapter 1. Adding data

1.1. Creating a new scenery

The goal: design a new scenery.

In order to present the way I use to do such a thing, I will present the job I do to create a scenery based on "La Reunion" island.

Note

In order to edit SearchAndRescue scenery (scenery/*.scn) you could use ScnEdit. Personnaly, I prefer to directly edit the file by hand with a text editor.


1.1.3. Height map

In order to render the height, I decide to use an height field (normal way for such job).

Looking for a correct heightfield map is hard part of the job. After a long search on Internet, I found a web site providing data with acceptable height resolution for SearchAndRescue data: Worldwide Airport Path Finder. The correponding data for La Réunion is shown in Figure 1-2.

The height resolution is acceptable as is for a game, but an height field must be a greyscale image. We have to convert this map to a greyscale one manually[1]. This job must be done with the Gimp application.

  1. Simplify the map.

    1. Remove the disclaimer messages in the sea ("not valid for navigation" and "fallingrain.com") and the airports location (here "FMEE" and "FMEP") with a pencil and a correct color.

    2. Select the sea with the Selection Color.

    3. Extend the selection by 1 pixel (in order to cover the black border).

    4. Replace the selection by pure black: the easy way is to invertblck/white foreground/backgroung and press Ctrl-K. .

    5. Reduce the map to the strict necessary. In my case (an island) I used the menu Image->Transformations->Autodécoupage.

  2. Convert each color to a grey level.

    1. Select a (foreground) color.

    2. Open the color swap filter: Filter->Color->Palette->Swap two colors...

      Tip

      To avoid searching the dialog in the menu, it is possoble to re-call it with Shift-Alt-F after a first call.

    3. Select a destination color where each component have the same value (ie: (0,0,0), (1,1,1), etc...). Take care that the (0,0,0) is the sea color. Select (1,1,1) for the coast, (2,2,2) for the color close to the coast and so on.

  3. We have a greyscale map, but as is, the terrain is plane. We have to extend the grey level in order the sea keep a black color, but the highest point should be white (255,255,255).

    1. Open the level dialog: Image->Colors->Levels...

    2. Set the Input levels in order that our clearest grey begin the greatest value. Personnaly, I changed the 255 to 18 (I used 18 levels of grey).

    3. Apply the changes.

Ok, we now have a great height map.

If we use it on SearchAndRescue we observe that the terrain is leveled with long stages. The reason is that the map is large (420x380) but the height resolution is poor. So, the map have lots of pixels representing the same altitude which is wrong.

To correct this, we have two solutions:

  • Use the Terraform application. With it, we will be able to smooth the relief.

  • The second is simplier: scale down the map. Then, it is possible to use blur in order to smooth.

I chosed the second (200x200). For information, in my map, 200 pixels represent 60 km.


Chapter 2. Ideas

3D objects with multiples textures. The goal is to make some object from heightfield with more precise cities, road, rivers...

Tool to simplify the altitude search.

sar_find_alt [-relative | -gps | -lon_lat] file.scn x y

First release could simply return the z coordinate of all intersection with objects.

Notes

[1]

Perhaps there an automatic way to do the job, but I don't know it.