GRHMEdit is a height map editor. It is a tool for editing height maps and viewing track files for a game called GeneRally (Copyright (c) 2001-2003 Hannu Räbinä, Jukka Räbinä). The game includes a complete track editor, which works in 2D. It is a good editor, but it is quite difficult to create an accurate height map using the 2D view. This program is an attempt to make the task easier using editing in full 3D.
Over time the editor was extended with additional features, such as global track manipulation and object editing.
See overview of versions.
Start the program and create a new track. The left side of the main program window shows a top view of the current height map and right side is a 3D view of it. Height map can be edited in both the top view and the 3D view - whichever is more comfortable. Vertical splitter bar in the middle can be moved to adjust balance between top and 3D view window sizes (if you only see one view, look for a vertical bar on the far left or far right and drag it).
The hand tool (button 1 on the edit toolbar) is used to change view (position, zoom, angle) in either of the two views. Use the mouse and keyboard as follows:
There is a 3d view toolbar, which toggles some visual options in 3D view. It looks like this:
A "center mark" is a small partially transparent white box in 3D view. It marks the place around which
the 3D view is rotated.
Height map may be alternatively viewed from a first-person perspective by enabling walk mode. Walk mode toolbar looks like this:
When in walk mode, camera position is controlled using the keyboard:
Edit toolbar looks like this:
For some editing tools GRHMEdit supports custom pen shapes. When you select any of these tools, a dialog will be displayed showing available pen shapes.
To define your custom pen shape, create a grayscale bitmap (BMP,PCX or JPG format, I suggest BMP) and copy it to the 'tools' subdirectory within GRHMEdit folder. Use white color for areas where the tool should be strongest (corresponds to tool strength selected in the toolbar), gray for areas where it should be weaker and black for areas where the tool does not effect the landscape.
Note that tool size is taken into account - size of the image which defines tool shape does not have any effect on area the tool edits. However, for better quality, I recommend you use bigger image sizes (~60x60) if you want to use big tool sizes.
By default, GRHMEdit loads all pen images stored in the 'tools' subdirectory (in unspecified order). If you like, you can specify your own order or store image files in subfolders. To do this, create a file 'tools_list.cfg' in the 'tools' directory and type in filenames of images which you want to load. Use one filename per line and relative paths if you want to use subdirectories. Images in the selection dialog will appear in the same order in which they are listed in this file. You can temporarily comment out a file (or add any comment into the cfg file) by starting a line with two slashes like so:
//file1.bmp - commented out, won't load
GRHMEdit now has a '-pen' command line argument which can be used to generate various circular-shaped pen bitmaps. Many of the default bitmaps supplied with GRHMEdit were generated using this method (see the tools\CreatePenBitmaps.bat file).
The command line argument has to be followed by multiple values:
GRHMEdit.exe -pen filename type startAngle endAngle rampInAngle rampOutAngle inRadius outRadius surfaceCurvature contrast
Meaning of most of the arguments is shown below (purple areas denote the cursor shape):
The red parameters are given directly as numbers in degrees or pixels as appropriate.
The green parameters are all either 0 (for minimum, i.e. black) or 1 (for maximum, i.e. white) and they are all embeded in the single number 'type'. Type is constructed by adding the codes for those parameters, which should be set to 1, where the codes are:
Surface curvature is a floating point value, either 1.0 for linear fade or any other value >0 for a curved fade (values <1 give curvature one way and values >1 the other way).
Contrast should normally be set to 1.0, values <1 will result in gray cursor and values >1 will create fades "brighter than" white which get clipped to flat white. This can be used for creating a flat area in the pen center or on the outside of banking.
You can access several advanced editing options from menu->edit landscape.
HMap height range is a tool for global height map modification. You can set the overall height of the hmap data and control the used height range (emphasize or flatten global height differences).
HMap shift is a tool for global height map shift. This tool is useful if you made wrong placement assumptions and need to move the whole track a little in some direction to make more room near some edge. You should be warned though, that all data including the AI line and objects wrap to the opposite edge when they are shifted out of track area. With AI line this may produce really wild results, so I recommend that you check the AI line in GR track editor if you use this tool.
Hmap gradient tool is a flexible tool for creating smooth gradients and slopes.
Object edit toolbar looks like this:
While object editing tool is active, objects can be
Most functions operate on selected objects (orange) and may require a reference object (red).
The 'menu->straighten along line' will snap object positions to a line passing through the reference object and a selected object furthest from the reference object.
NOTICEDon't hold me responsible for losing your favorite tracks because of an error in the editor. I tried to avoid errors, but I can not guarantee anything. You are on your own. |
Main toolbar looks like this:
Other view refresh when editing controls how often the other view is being redrawn while hmap editing takes place in one view. The "all the time" option is more user-friendly, but it is more processor-time expensive and will probably slow down editing.
Top view rendering lets you choose between 3 different top-view types. Classic views are not rotated. Fine-rotated raw view is rotated together with 3D view and is probably the most user-friendly choice, but it consumes more screen space.
Screenshots save dir is the directory where screen shots will be saved.
3D view bk col lets you select background color for 3D view.
Light src fixation selects whether light source comes from a direction which is fixed or moves with the hmap as it is rotated.
Objects
Not all available functions are listed above. Feel free to experiment with the program (but make a copy of files for experiment purposes or back up important files!). Any suggestions, comments, bug reports, etc. are welcome: send me an e-mail or visit the GeneRally forum.
Have fun creating tracks and have fun playing GeneRally.