Introduction

This software is a specialized track editor for GeneRally: all the features are based on the layout of the track. It can also generate land map and hmap, that can be directly imported in 'GeneRally TrackEditor'.

At the moment, the objects are not managed (except 'start' objects, automatic 'flat briges' and one optional 'gate' at the start line). They must be created within the 'GeneRally Track Editor'. But SnakeDitor can manage existing GeneRally files that contains objects, without modifying them.

SnakeDitor provides almost all the steps to design a track. The quality of the images produced by SnakeDitor is good enough to get a quick feedback from driving in GeneRally. So, the user can quickly swap between SnakeDitor and Generally to design the layout, and to test it.

The AI lines are easier to set than with 'GeneRally TrackEditor', so it is possible to use AI drivers sooner in the design process. The 'GeneRally TrackEditor' has to be used at the end of the process (or in the middle) to add all the objects of the track, and perhaps to customize more precisely the AI lines (only by the experts, I feel). The land map and the hmap must be modified in a classical image editor to add details. The new land map and hmap could then be imported directly in SnakeDitor, or in 'GeneRally TrackEditor'.

Figure 1: example of a land map that was produced by SnakeDitor.

sample

SnakeDitor contains some other minor additional features that were quite easy to develop, but a little boring to do manually in a normal graphic editor. The better example is the kerb creation.

SnakeDitor is now able to manage GeneRally properties (world size,level water, ...).

The main features of the land editor are:

  • the graphical primitives used are the most basic ones: lines and circular arcs
  • automatic closed road
  • pit road and pit area
  • initial land hmap, that can be imported or pasted from the clipboard
  • kerbs
  • start area
  • French and English language
  • drag & drop of snr files
  • 'snr' extension can be associated with SnakeDitor in the windows explorer.

The main features of the hmap editor are:

  • definition of the heights of the layout in several places
  • left and right height of the layout can be different
  • in case of crossroad, the hmap is modified automatically to put a bridge, and the bridge can be created automatically in the GeneRally file
  • initial external hmap
  • area out of the layout can be filled automatically
  • gaussian filtering
  • save a hmap in 64x64 pixels, or in a 512x512 pixels

The main features around race configuration are:

  • definition of the AI lines with bezier curves
  • definition of the checkpoints, centered on the layout.
  • ghost lap management: comparison of 2 ghost laps, quick import from a GeneRally file

The AI line feature could be used without having a layout. It is interesting because it is much more powerful than the equivalent tool in TrackEditor. So, to be more clearly, SnakeDitor could be used only to define the AI lines of a track. The other elements of the track will remain unchanged.

SnakeDitor stores the track parameters in a file with the '.snr' extension.

This documentation describes in first the user interface, then it explains the details of the features. 

Installation

Unzip the package in a directory. You will find the executable file and some configuration files.

SnakeDitor uses 3 configuration files:

  • SnakeDitor.ini: this file contains the SnakeDitor settings used by the last launch (language, display options,...).
  • last.snr: this file contains the track that was edited when SnakeDitor was closed last time. It is a kind of an automatic save, in a permanent file. It is a security, and it is comfortable because this track will be automatically loaded next time the software will be launch.
  • default.snr:this file contains the track that will be loaded each time you will use the feature 'New track'. If you want, you can put your own default track.

Another snr file is delivered, to start quickly using SnakeDitor: 'demo.snr'.

In general, there is no need to edit manually these files.

The executable file is ready to be used. A default 'last.snr' file is provided by the installation. It is a copy of the demo.snr file. So, when SnakeDitor is launched the very first time, you will have already a track loaded. You can play with it to understand on your own the main behavior of the software.

Getting started

Before reading the rest of the documentation, you should know the meaning of the terms that will be used.
A track is made of 2 roads (see Figure 1):

  • the main road: this is the road where the race takes place.
  • the pit road: this is the road used by the cars to go to the pit stops, located in the pit area.

test image

Figure 2: track details

This screenshot shows the main road (in gray), the pit road (in yellow), the start area (in red) and the four pit stops (in orange).

Each road is made of lines and circular arcs. These basic primitives will be called "road parts". Some parts could be generated automatically by SnakeDitor. They are used to connect the 2 roads, for example.

The main road is automatically closed. To connect the first part to the last part, SnakeDitor generates automatic parts. When the other parts are modified by the user, the automatic parts are adjusted to maintain the closure.

test image

Figure 3: road details

This screenshot shows some parts of a road:

  • the current part is shown in red, and in this case, is a linear part.
  • the next parts are circular arcs, with different radius values, and difference direction: one turns to the right, and the other ones turn to the left.
  • A yellow triangle shows the origin of each part. It is used to know where are the previous part and where is the next one. It is useful when a part is inserted.
  • Blue parts are automatic parts, used here to close the main road. in this case, the last circular part is very small, and seems to be linear but is really a circular arc.

User interface

General

SnakeDitor has a main window, and a setting dialog box.

The setting dialog box is used to set general parameters (tooltip, language,...). The main window is used to do all the other features.

This chapter describes quickly the features available through the buttons. More details on complex features will be found in later chapters.

Main window

Presentation

The main window allows user to:

  • set GeneRally properties (world size, water level...).
  • manage files.
  • set road properties.
  • manage road parts.
  • set the display options.
  • manage kerbs.
  • define the heights of the road
  • manage AI lines and checkpoints

It contains 4 tabs:

Figure 4: user interface of the main window. The red rectangles show the new features.

sample

General features

This chapter describes the features attached to the 'General' group:

Icon Title Description
New track Erase the current track and replace it with a new one. In fact, creating a new track loads the track 'default.snr'.
Background image This image could be a photography, for example, to help designing the layout.
The format of the image could be 'bmp' or 'jpeg'.
It is not saved in the final land image. It is just a 'work image'. It is different from the 'initial land map', used by the paste feature, and in the 'general tab' (around the background color).
Load a SnakeDitor track file SnakeDitor stores the parameters of the tracks in a 'snr' file. This function allows user to load such files.
The current track is erased.

Load a GeneRally file
Import some data from a GeneRally file:

  • track properties (world size, water level,...)
  • land map (as the initial land map)
  • hmap (as the initial hmap)
  • ghost lap
Copy the bitmap Copy the land map (or the hmap) in the clipboard, as a 'bmp' image. Then, this image could be pasted in a graphic editor.
This image is the copy of the final image.

paste as the land map
Paste the clipboard in the initial land map. It could come from a image editor.
The best usage is to import a 512x512 16-color bitmap. If the image is a 24-bit image, SnakeDitor will convert it to a 16-color bitmap with a very simple algorithm (no dithering), but it is much more better to do this conversion in a real image editor.
This image could be exported direcly in the GeneRally file, without being modified by SnakeDitor (see display/hide layout).

paste as the hmap
Paste the clipboard in the initial hmap. It could come from a image editor.
The bitmap is automatically converted to grey scale.
Save the land map Save the bitmap in a 'bmp' file, that can be directly imported in 'GeneRally TrackEditor'.
This image is the copy of what is displayed in the preview mode.
Save the hmap Save the hmap generated by SnakeDitor. The size could be set in the settings dialog box (64x64 or 512x512). A 64x64 image could be imported directly in TrackEditor.
Save the track in a SnakeDitor file Save the parameters of the track in a SnakeDitor track file (snr extension).

Save the track in a GeneRally file
The GeneRally file can be directly used in GeneRally for driving. It is possible to keep some data unchanged, and to override some other data. For example, if the AI line was modified in SnakeDitor, it is possible to insert the new AI line in an existing GeneRally file, without modifying the other data (land map, hmap, objects,...).
Undo Undo the last action. Don't registered the action of loading or unloading the initial maps.
Redo Redo the previous undone action.
Settings Open the dialog box describes in the next chapter.
About SnakeDitor Open the 'About box' of SnakeDitor.
Quit Quit SnakeDitor, after asking a confirmation to the user.

Figure 5: Import data from a GeneRally file.

import trk

import trk

Figure 6: Export a GeneRally file.

If a feature is unchecked, the data that already exist in the GeneRally file will remain unchanged.

GeneRally properties are always exported.

Modification features

This chapter describes the features attached to the 'Modification' group:

The buttons of this group are 'two states' buttons. Only one button can be active at the same time.

Icon Title Description
Select Used to select a new part or a new kerb. A shortcut exists for this feature, that makes this button not very useful.
Move In general, moves the current road, but in fact, moves the current part and the parts associated with it. See details in chapter Move, Rotate.
Rotate In general, rotates the current road, but in fact, rotates the current part and the parts associated with it. See details in chapter Move, Rotate.
Scale Scaling modifies all the parts of the current road. It modifies the radius of the circular arcs and the length of the lines.
It doesn't modify the width of the road. Some parts could have a locked position (see the chapter Part locking). Such positions are not modified by this tool.
Length Modify the length of linear parts, or the open angle of circular arcs.
The automatic parts are not modified by this tool.
Radius Modify the radius of circular arcs. Radius of automatic parts can be modified too, but SnakeDitor could use a smaller radius if needed. Because a too big radius could prevent connecting 2 parts.
Roll Roll or enroll a circular arc. It is not applicable on automatic parts, because it modifies the open angle.
Radius and open angle are modified at the same time to get a constant arc length. Sometimes the user modifies alternatively the radius and the open angle, without finding the good result easily. So, this tool should be more efficient and give the good result faster.

Display options

This chapter describes the features attached to the 'Display' group:

The buttons of this group are push buttons. Several buttons can be active at the same time, except the 2 first ones.

Icon Title Description
Draft mode The track can be drawn in draft mode or in preview mode. Draft mode is a technical view. The 2 modes are shown on the Figure 4.
The draft mode displays the icons used to set the pit area, the pit stops and the kerbs.
The road that is not selected is drawn in light gray. The parts of the selected road are drawn with different colors, to make distinction between them:

  • red color: the selected part
  • blue color: automatic parts
  • light gray: other parts of the current road (this gray is darker than the gray used for the non-selected road).
Preview mode Preview mode displays the final result.
Of course, these 2 buttons can't be pushed at the same time.
No icon is drawn, and all the parts of each road are drawn with the same color: the road color.This mode is automatically used when the 'general' tab or the 'race' tab are active.
Background image Display or hide the background 'work' image, if one was loaded. This image is not displayed in preview mode, and is not used in the final land map.
Track Display/hide the layout (roads, pits, kerbs, ...)!
It could be interesting to hide the layout at the end of the work, when the land map is modified in a external software. For example, when the layout is ok, you export the land map in an other software (with a bmp file, or by copying it in the clipboard). Then you modify it in the other software. Then you import it in SnakeDitor (with a bmp file, or with by pasting it from the clipboard). If you have modify the tarmac (add noisy texture, ...), you want to see you modification in the final TRK file. So you hide the layout, and when you will export the TRK file, you will get the land map you just have imported (without modification).
It can also be used with the initial hmap.
Blank line Display or hide the 2 blank lines that are drawn on the sides of the 2 roads.
Available only in preview mode.
Kerb Display or hide the kerbs.
See more details in the chapter Kerbs.
Pit Display or hide the pit data (pit road and pit area).
See more details in the chapter Pits.

General tab

This tab displays the properties of a GeneRally file, and the properties of a SnakeDitor track.

Figure 7: Screenshot of the 'General' tab

The group 'GeneRally properties' contains the properties shown in TrackEditor. The meaning is exactly the same.

There is just one remark on the usage of the sliders: if you drag the cursor, the value is modified every 10 values. If you click outside of the cursor, the value is increased or decreased about 1 unit. It is not a classical behavior, but this behavior allows user to choose a precise value.

The other properties are specific to SnakeDitor.

If 'start gate' is checked, a GeneRally 'gate' object will be added at the location of the start line.

The table above describes the options of the land map background.

Icon Title Description
load hmap Background color picker This is used to choose the color of the background. This color is used only if no initial land map is used.
load hmap Load an initial land map This initial land map is stored in the SnakeDitor file, and it will be used in the final land map. The best usage is to load a 512x512 16-color bitmap. If the image is a 24-bit image, SnakeDitor will convert it to a 16-color bitmap with a very simple algorithm (no dithering), but it is much more better to do this conversion in a real image editor.
load hmap Use the initial land map Use the initial land map that was already loaded or pasted. In this case, the background color will not be used any more.

It is possible to export this land map directly in the GeneRally file, without any modification. You just have to uncheck the button , in the display options, at the top of the window.
load hmap Erase the initial land map If the initial land map is not used, it is still stored in the SnakeDitor file. This button erases it from the data.

The next properties are relative to kerb display. These properties are obvious, except the length, that is the length of only one color. There is just one new thing: if the 'world size' is modified by the slider, the kerb sizes are updated to be consistent with the new 'world size' value, but then, the user can adjust the values manually.

Layout tab

This tab is used to create the land map (roads, kerbs, pits, ...).

Top view

Figure 8: Screenshot of the 'Layout' top view

This screenshot shows the different features that can be used in this mode:

  • main road
  • pit road
  • part selection
  • kerb management
  • pit management
  • start area management
  • bridge detection

Tab view

Figure 9: Screenshot of the 'Layout' tab

All the fields are described in the next chapters.

Road properties

This chapter describes the features attached to the 'Road properties' group.

The fields contain the property values of the current road.

Field Description
Linked This push button is only available for the pit road.
If it is pushed, then the pit road is linked to the main road with automatic parts. The user just needs to define the link points.
If it is not pushed, the pit road is totally independent from the main road
Width This is the width in pixels. It can be modified with the mouse by clicking on the 'up' and 'down' arrows associated with that field.
Length
(in pixels)
This value is computed automatically. This is the sum of the lenght of each road part (line or circular arc), measured in the middle of it.
Length(in 'real' unit) This value is approximatively the length displayed in 'GeneRally TrackEditor'. This is the previous length (in pixels) multiplied by a coefficient that depends on the world size (see Settings).
Color This value is the color of the road. Clicking in the color area will open the color picker.

Part properties

This chapter describes the features attached to the 'Part properties' group.

Icon Title Description
Insert before Insert a part before the current part. The inserted part is a circular part. Then the user can modify the type of the part, and the other properties.
Insert after Insert a part after the current part. same remark as before.
Delete Delete the current part. SnakeDitor opens a dialog box to get a confirmation about this operation.

The fields contain the property values of the current part (displayed in red in the image, in draft mode).

Field Description
Origin position That is the position where the current part is drawn. If it is locked, this position is absolute and independent from the previous parts.
This position can be modified with the mouse and the 'Modification' features.
: to lock/unlock the position.
Origin angle That is the angle which the current part is drawn with. If it is locked, this angle is absolute and independent from the previous parts.
This value can be modified with the mouse and the 'Modification' features.
: to lock/unlock the origin angle.
Type This is used to modify the type of the parts:
: line
: circular arc
Radius This field shows the radius value of circular arcs. For automatic parts, this value is the value set by the user. SnakeDitor could use a smaller value to connect the parts, because a radius too high could prevent a correct connection.
: Available for normal circular arcs, or for automatic circular arcs that have this value locked (see the next button). This is used to set the direction of the arc (turn on the right side or on the left side).
: Only available for automatic circular arcs. This button enables the previous button.
Open angle That is the angle of circular arc, in degrees. This value can be modified with the mouse and the 'Modification' features.
Length For circular arc, the length is computed according to the open angle value and to the radius value.

See more details about locking parts at the chapter Part locking.

Kerb management

This chapter describes the features to manage the kerbs.

Icon Title Description
Automatic kerbs Erase all the existing kerbs, and create new ones. SnakeDitor asks the user a confirmation.
The kerbs are put at the interior of each circular part. If there are consecutive parts, only the first one gets a kerb. If the length of a circular arc is too small, no kerb is created for it.
Then, these kerbs can be modified like kerbs that are created manually.
Insert Insert a new kerb. It is initially put in the top of the image, and is not attached to a part. Then, the user has to put it (with the icons) in the right place.
Delete Delete the current kerb. SnakeDitor asks the user a confirmation.

Hmap tab

This tab is used to create the hmap by setting height points. When a crossroad is detected, the hmpa is modified to prepare adding a bridge in TrackEditor.

The user has to set height points along the layout. Then, he can save the hmap as 64x64 BMP, and then import this BMP in TrackEditor with the "Import hmap" feature.

Top view

The top view (on the right side of SnakeDitor window) is modified to show the height parameters of the track:

Figure 10: Example of the top view in height mode.

The background color is now light blue. If an initial hmap is loaded, it is displayed over the background color, but under the roads. The selected road is drawn in light yellow, with a wide border that shows the height value all along the layout, and a thin border: in red for the right border, and in blue for the left border. The user can quickly see where the hmap is high (white color) and where the hmap is low (black color) by looking at the wide border.  

The height points (created by the user) are displayed on the layout. The selected heighpoint is displayed with a bigger icon (here, in the bottom of the graphic). Each height point is displayed with it two height values (left and right value), and the profile (flat, bumpy, ...) of the layout is also drawn. While the cursor moves over the layout, the height parameters of the mouse position are displayed (see the 'Mouse' text on the bottom of the graphic).

If the pit road is linked to the main road, SnakeDitor creates automatically one height point on the beginning of the pit road, and another one on the end of the pit road. These height points are put at the same height at the main road height. So, with simple cases, there is no need to define height points on the pit road.

In case of crossroad, a bridge is drawn (red rectangle). It orientation is computed automatically according to the height values around the intersection.

Tab view

This chapter describes the content (graphic area, buttons, fields) of the tab.

Figure 11: Screenshot of the 'height' tab

This tab displays the parameters of the selected height point. The button and the fields are described in the table below.

It contains 2 graphical areas:

  • The area on the right is called the "front view", with it 3 associated fields under it. These fields contains the left and right height value, and the centered field can display the height value of the initial hmap (if any).
  • The area on the bottom is called the "side view".

The two views contains a blue area in the top and in the bottom of the area. It shows the minimum and the maximum height value of the road.

The front view is used for several things:

  • It shows the profile of the road, between the right side and the left side. The example shows a road that has a left side lower than the right side, and with a curved profile.
  • The icons and can be moved with the mouse to adjust the height values. If the CTRL key is pressed while moving an icon, the other one is moved at the same time. The left and side values are also displayed in the fields under the front view. The icons are moved every 5 values. If the SHIFT key is pressed, they can move more precisely (every one value).
  • The two other little icons are used to modify the tangents of the profile. 
  • If an initial hmap is loaded, the value of this hmap under the cursor is displayed as a green horizontal line (see 'BackGnd' text on the image above). This only applies if the cursor in on the top view. This value is also displayed in the centered field under the front view.
  • The profile of the layout under the mouse is drawn while the cursor moves over the layout on the top view. In case of a crossroad, it is possible to see the second profile by pressing the CTRL key.

The side view is used for the next things:

  • It shows the height values of the road along the layout. The example shows the profile just before a bridge. The left profile is drawn in blue, while the right profile is drawn in red. In this sample, there is no differences between the two profiles.
  • When the cursor is not on the top view, this area is centered on the position of the selected height point.

The table below describes the fields and the buttons of the tab view:

Icon Title Description
load hmap
Load a initial hmap
This hmap will be used in the background of the hmap generated by SnakeDitor. The hmap is stored in the 'snr' file.
Use the initial hmap Use the loaded initial hmap. Only available if one initial hmap was previously loaded. This hmap is stored in the 'snr' file even if it is not used for the final export.
Delete the initial hmap
Unload the initial hmap from the 'snr' file. So it can not be used any more in the exported hmap.
Insert Activate/deactivate the insert mode. In the insert mode, when the user clicks on the top view, a new height point is created. The height parameters are  initialised with the current height parameters at the position of the cursor. The insert mode could be quickly activated while keeping pressed the Shift key.
Delete Delete the selected height point.
Field Description
Margin The hmap generated should be a little bit larger than the layout from the land map, because of the precision of the final hmap (64x64). This value is the distance on each side between the land map width and the hmap width. It is modified by the mouse.
Left side
&
Right side
The profile of the road is defined by setting a left tangent and a right tangent. It is possible to use an absolute angle or a relative angle. See more détails in the Tangent angles chapter.
: to work in relative angle mode. The field below this button contains the relative angle value.
: to work in absolute mode. The field below this button contains the absolute angle value.
Filling
If checked, SnakeDitor will fill the undefined areas of the hmap by using triangulation. See more details in the Filling chapter.
Filtering
If checked, SnakeDitor will apply a gaussian filter on some areas of the hmap computed. See more details in the Filtering chapter.

See more details about hmap at the chapter Hmap.

Race tab

This tab is used to manage the race parameters of a GeneRally file: AI lines and checkpoints.

Top view

Figure 12: Screenshot of the 'Race' top view

This screenshot shows the different features that can be used in this mode:

  • checkpoints
  • main AI line (in yellow)
  • pit AI line (in purple)
  • human ghost lap (in blue)
  • AI driver ghost lap (in red)

Tab view

Figure 13: Screenshot of the 'Race' tab

Icon Title Description
AI mode
Active the AI line mode
This mode displays the AI lines and the ghost laps, and hide the checkpoints. It allows the user to manage the AI lines.
checkpoint mode
Active the checkpoint mode
This mode displays the checkpoints and hides the AI lines and the ghost laps.
race auto
Create automatic data
Generate automatically AI lines or checkpoints. The previous data are erased, but can be retrieved by using the 'undo' feature. The algorithms used are very simple. See more details in the chapter AI lines, or checkpoints.
insert a AI line point or a checkpoint
insert a AI line point or a checkpoint
Insert a AI line point, or a checkpoint when the user clicks with the left button. This mode can be activated temporarily by holding the 'Shift' key.
delete a AI line point or a checkpoint
delete a AI line point or a checkpoint
Delete the current point.
load the ghost lap
Load the ghost lap 1
Load the ghost lap from the last used GeneRally file, and put it in the ghost lap 1. This ghost lap should be a AI driver ghost lap, because a shortcut is associated with this button. So it could be loaded quickly, more often than the ghost lap 2.
The name of the best driver, and his time are displayed below. This name is really the name of the ghost lap, if the ghost lap was the fastest lap (the ghost lap time must appear at the top in the fastest lap list).
load the ghost lap
Load the ghost lap 2
Load the ghost lap from the last used GeneRally file, and put it in the ghost lap 2. This ghost lap should be a human driver ghost lap, so it could be used as a reference.
The name of the best driver, and his time are displayed below.
display/hide the ghost lap 1
Display/hide the ghost lap 1
display/hide the ghost lap 2
Display/hide the ghost lap 2

Settings

Figure 14: user interface of the settings dialog box

The settings dialog box is opened by clicking on the icon .

It allows the user to modify general settings.
Two language are available:

  • English
  • French

The hmap saving size indicates which size will be used when saving or copying the hmap. The 64x64 size is the size compatible with TrackEditor.

Detailed features

Automatic parts

Main road closure

Automatic parts were introduced to close automatically the main road. They are displayed in light blue.

To connect the first part to the last part, SnakeDitor generates 3 automatic parts:

  • 1 circular arc, to get the tangent of the last part
  • 1 line, to join the 2 circular arcs
  • 1 circular arc, to get the tangent of the first part

Automatic linear part can't be modified.

It is possible to adjust the radius of automatic circular arcs. If the radius value is too high and make impossible the closure, SnakeDitor takes the highest usable radius.
To connect 2 parts, there are 4 solutions. These solutions are obtained by combining the 2 possible directions of each automatic circular arcs. SnakeDitor chooses the solution with the smallest length, but the user can force the direction for one or for the two circular arcs. This feature is interesting when the user doesn't like the solution chosen by SnakeDitor.

To force the direction of a circular arc, the user has to select it, then he has to lock it (with the button, that is located on the same line as the 'Radius' field), then he can choose the direction like with any other normal circular arc.

Figure 15: full automatic closure of a road. The selected part is an automatic one.

test image

Figure 16: closure with a direction forced by the user, to create a cross road.

test image

Automatic parts are also used to connect the pit road to the main road.

Part locking

Locking a part is made by clicking on the lock buttons that are on the same lines as the "Position" field and as the "Origin angle" field. A locked part doesn't depend any more on the previous parts.
It is possible to cut a road in several pieces. Then these pieces are linked together with automatic parts. So each piece could be adjusted without modifying the other ones, and SnakeDitor modify at the same time the automatic parts.

test image

Figure 17: a road before the modification.

We will modify the open angle of the current part. If no other part is locked, this modification will modify the position and the angle of all the next parts. It could be disturbing because temporarily, the road seems to be very different from what the user wants.
If we decide to lock the long linear part, in the right of the screen shot, modifying the open angle leaves the linear part in the same position and with the same angle. The next parts remain the same too. It is more comfortable.

Figure 18: no part locked.

test image

Figure 19: linear part locked.

test image

Figure 20: the radius of an automatic part was adjusted.

test image

Figure 21: the current part was moved near the linear part.

test image

Partial locking

We have seen in the previous sample a full locking: the position and the angle of the part were locked at the same time. This should be the case that will be most used. But it is possible to lock only the position, or only the angle. Perhaps it will not be used very often but it was easy to make these cases available. So users will test and decide if it is useful for them.

Part unlocking

Of course, it is possible to unlock a locked part. The user has just to click on the associated "Lock" button.

The "Ctrl" key links the 2 lock buttons. A little chain is displayed when the mouse moves:

So, clicking on a "Lock" button while pressing the "Ctrl" key is understood as clicking on the 2 buttons at the same time.

locked part

Figure 22: current track is locked.

There is 2 solutions to process automatic parts (created at locking time) when unlocking a part:

  • the automatic parts previously created by SnakeDitor can be destroyed,
  • they can be converted to normal parts.

If they are destroyed, the current part is then moved and rotated to be connected directly to the previous part. It will modify the design of the whole road because all the next unlocked parts will be modified too.
If they are converted to normal parts, the road remains unchanged, but the current part will then depends on the previous parts.

Figure 23: automatic parts were destroyed.

unlock destroy

Figure 24: automatic parts were converted.

unlock convert

Move, rotate

These actions modify in general the current road, but in fact, they modified the current part and the previous associated parts.

For example, moving a part is modifying it origin position. That means that only the parts that have a locked origin position can be moved, because the position of the other parts depend on the parameters of the previous parts and are computed automatically. So moving a part is moving the first previous part that have a locked position.

The first part of a road has automatically a locked position. If no other parts are locked, moving a part, is moving the road.

This is the same behavior with the rotation.

Start area

The start area displays six car positions and the start line. It can be put everywhere (on linear part, and on circular parts). This area is set by moving 2 flags: and .

The first one is the most important:

  • it allows the user to choose the first part,
  • it position is the start line position,
  • it width position in the part set the width of the start area.

The second flag is used to set the length of the start area.

Figure 25: area with a big length and centered positions.

test image

Figure 26: area with a small length and lateral positions.

test image

These car positions are exported in the GeneRally file. A 'gate' object can be put automatically at the location of the start line (see the chapter 'General' tab).

Pits

Pits can be added to the track. They are made with 2 components (see Figure 2 for a typical use):

  • the pit road: this road is normally linked to the main road and is used by cars to go to the pit stops.
  • the pit stop area: this area could contain up to six pit tops.

It is also possible to ignore this road and the pit stop by disabling the pits with the display options.

Pit road

This road is not closed, but it can be linked to the main road at 2 points. This road can have it own parameter values (width, color).

If it is linked to the main road, the user has to set the location where the they are linked. Automatic parts are computed in order to maintain tangent continuity between the two roads at link points.

If the roads are not linked, the user can do exactly what he wants. For example, he can define manually the link between the roads, or he can use this second road for another type of road which is not managed in SnakeDitor.

The user can set the two points by moving the icons .

test image

Figure 27: Pit road.

The anchor point position tells SnakeDitor which side to use to align the automatic parts. The figure shows each anchor point attached to a different side of the road.

In the two display mode (preview mode and draft mode), the selected road is drawn over the other road. The difference is shown in the next figure.

Figure 28: Pit road is selected.

test image

Figure 29: Main road is selected.

test image

The features available for the main road can also be used on the pit road (move, rotate, scale, part management, kerbs,...).

Pit stop area

Typically, there should remain some space between the 2 roads: this space (the pit area) should be used to put the pit stops. The number of pit stops is computed according to the pit area length and in order that the pit stops will not be to close to each other.

The pit area can be set with 2 icons: and .

There are 2 ways to define pit stops:

  • The simplest: the direction of the pit area is given by the 2 icons.
  • The other way allows user to align the pit area on the direction of a linear part. This method should be the most useful. The start icon (with the green arrow) has to be put on the linear part that will be taken as the reference. The second icon is used to set the distance between the pit stops and the linear part. If this part is moved or rotated, the pit stops are moved of rotated too. That is not the case with the first method.

Figure 30: 3 pit stops and no automatic alignment.

test image

Figure 31: 4 pit stops and alignment on the linear part.

test image

Pit positions are exported in the GeneRally file.

Kerbs

Graphical kerb parameters can be set in the settings dialog box of SnakeDitor.

Kerbs are set with the position of 2 icons: and . These icons must be put within parts, because kerbs are drawn along parts, so SnakeDitor has to know which ones to use. The first icon is used to select the side of the road where to put the kerb.

The order of the icons is very important, because it is used to select the area with the smallest length or with the largest length.

Figure 32: Kerb sample (smallest length).

test image

Figure 33: Opposite order of the flags (largest length).

test image

A kerb can be drawn along several consecutive parts, automatic or not.
Automatic kerbs are not created on the pit road, but manual kerb can be created on it.

A kerb is selected with the select tool. The user has to click on the middle of the kerb. The cursor is updated when the mouse is over a kerb. When a kerb is selected, the user can move the start and the end icon to adjust the kerb position.

Hmap

Tangent angles

This chapter explains the angle type meaning (relative or absolute), and which angle to lock.
The relative angle represents the angle between the segment (between the left and the right side) and the tangent segment. If the relative angles are set to 0, then the road is flat.

Figure 34: flat road
relative angles = 0°.

Figure 35: bumpy road
relative angles different from 0°.

The absolute angle is the absolute angle of the tangent.

Figure 36: flat angles
absolute angles = 0° or 180°.

Figure 37: other angles
absolute angles different from 0° or 180°.

When the height values are modified, the angle of the reference segment is modified. So what about the angles of the tangent segments? The most obvious case is to remain the tangent angles unchanged. That means that the absolute angles are locked, so the relative angles are updated. Another case is to consider that the relative angles are locked, and the absolute angles are updated.
The next figures show what happens when modifying the left value. The initial figure is the first figure above (called 'flat road').

Figure 38: absolute angle locked.

Figure 39: relative angle locked.

The easier way to work is to lock relative angles. Like this, a flat road remains a flat road, even if the user modify an height value.

Simplest hmap

The simplest hmap is obtained with only the height points created by the user, without any initial hmap, nor automatic filling.
The first screenshot below shows the main road and the pit road. The rest of the image is drawn in blue, and will be exported with the 0 value. The next screenshot, that comes from GeneRally, shows that the blue areas (in SnakeDitor) will be considered as water (in GeneRally). Note that the pit area is also filled with water.

It is not very interesting to put this exported hmap in TrackEditor, and use it in GeneRally, because, as you see it, if you run out of the layout, you will fall into the water.This mode is only useful if you modify the hmap in another software to fill the undefined areas.

Figure 40: simplest definition.

test image

Figure 41: blue areas are converted to water.

test image

SnakeDitor provides 2 ways to fill undefined areas:

  • a user feature: loading an external initial hmap.
  • an automatic feature: filling undefined areas with triangles.

These 2 features are described in the next chapters.

Initial hmap

The user can provide an external hmap to SnakeDitor. This must be a BMP file with a size of 64x64 or 512x512. This bitmap is stored in the 'snr' file, but Undo-Redo doesn't apply on it.

SnakeDitor uses the value 0 as a mask value. That means that if the bitmap contains pure black pixels (rgb=0-0-0), then SnakeDitor will consider these pixels as transparent. These pixels will be displayed with the blue color in the top view. So this bitmap can be used to define only important areas, and lets SnakeDitor defines the other areas.
If you don't want transparent pixels,and if the your initial hmap contains pure black pixels, you must replace these pixels by lighter pixels (rgb=1-1-1 is enough).

The initial hmap is used as a background. The hmap described by the height points is put over the initial hmap.

Figure 42: height points plus an initial hmap, defined only on the bottom of the image.

Figure 43: initial hmap is used without modification (except at layout place). Water still exists on undefined areas.

Automatic filling

The undefined areas, that are displayed in blue in SnakeDitor, can be filled automatically with triangles.

Figure 44: triangles without any initial hmap.

Figure 45: result of triangulation in GeneRally.

The triangles are created after applying the initial hmap (if any).

Figure 46: triangles with an initial hmap.

Figure 47: result of triangulation in GeneRally.

Sometime, large triangles are generated. They can look not very nice. In this case, the user has just to modify the hmap in another tool (TrackEditor could be used easily for that).

Filtering

Filtering is done only on the layer limits, and not within each layer. The layer list is:

  • main road
  • pit road
  • initial hmap
  • triangles

Filtering is needed to get smooth transition between layers. Triangles are already linked exactly to the other layers. So there is no real need around this layer. The main need is between the initial hmap and the road layers, because the initial hmap could have a very different value from the road layer.

Figure 48: with an initial hmap, but without filtering.

Figure 49: with an initial hmap and with filtering.

Bridge

Bridges are created automatically by detecting auto-intersections of the roads. At the moment, bridges can not be created between the 2 roads (only auto-intersections are available). When an intersection is found, SnakeDitor chooses the orientation of the bridge according to the height values of the 2 parts of the intersection: the bridge gets the same orientation as the higher part. SnakeDitor cuts the higher part to allow the lower part to go under the bridge.

The bridge are drawn as red rectangles on the top view. 

Without any bridge detection in SnakeDitor, the hmap will look like the first next figure. So, the higher part has to be cut, to allow the lower part go under the bridge. The cut is made automatically smoothly. That is what is shown on the second next figure. The user must add a "Flat Bridge" in TrackEditor to complete the operation.

Figure 50: without bridge detection.

test image

Figure 51: with bridge detection.

test image

Best results are obtained when the height difference between the bridge and the part under it doesn't exceed around 50. Over this value, you can encounter some jump effect while driving in GeneRally.

Intersection can be computed between any type of parts (linear or circular), but best result is obtained when the bridge is associated with a linear part. That obvious: it is a linear object. The next figures illustrated the 2 cases: when bridge is associated with a circular part, the result could be not exactly what you want.

Figure 52: bridge associated to a linear part.

test image

Figure 53: bridge associated to a circular part.

test image

Be careful: You must not put height points too near to the intersection, and too near to the bridge: the computation could be disturbed by that and the result could be wrong.

A flat bridge can be automatically create in the GeneRally file. This can be done within the export dialog box.

Race

AI line

The AI lines are defined with bezier curves. The main AI line and the pit AI line are not linked. The user can do what he want with them.

race sample

Figure 54: AI line.

A bezier control point is defined with a position, and two tangents.
Normally, the angle between the tangents is maintained when adjusting one tangent. But it is also possible to adjust this angle (if the user doesn't want aligned tangent), by pressing and holding down the 'Alt' key.

The screenshot shows a red point just after the start line. It is not a control point: it represents the first point of the AI line, shown as a red segment in TrackEditor.

The algorithm used to create automatically the AI lines is very simple. That implies that the AI lines is far from perfect. Then, it must be adjusted by the user, but most of the points are created (positions and tangents), so it could be useful.
The algorithm creates a control point for each curve. The point is put to 30% of the width from the side of the road. The direction of the tangent is get from the direction of the road, and the lenght of the tangents are set to the radius of the circular part.

Figure 55: Automatic creation of AI lines

To adjust more easily the main AI line, it is possible to import a ghost lap. This import doesn't erase the AI line like in 'TrackEditor'. And to get a much more easier way, it is possible to import two ghost laps.

race sample

Figure 56: Ghost lap comparison.

The screenshot shows the AI line in yellow, the human driver ghost lap in blue, and the AI driver ghost lap in red. It is obvious that the AI driver is totally wrong (because of hmap interaction). This is helpful to adjust the AI line to obtain a red ghost lap identical to the blue ghost lap.

A normal scenario should be the next one:

  • export the GeneRally file
  • drive within GeneRally to get a human ghost lap
  • import this ghost lap, as the ghost lap 2
  • adjust the AI line
  • export the GeneRally file
  • let a AI driver driving to generate it ghost lap
  • import this ghost lap, as the ghost lap 1 (with Ctrl + G)
  • adjust the AI line, to obtain a ghost lap 1 closer from the ghost lap 2
  • loop between GeneRally and SnakeDitor to adjust the AI line, generate and import the ghost lap 1

Checkpoint

The checkpoints are automatically linked to the main road. They are perpendicular to the road. The user can move them by moving the center of the checkpoint. It is also possible to adjust the right and the left side.
An automatic checkpoint is added at the start line. This checkpoint can't be moved directly. The user can only adjust the left and right side (for example, to include the pits within the checkpoint).

Figure 57: normal checkpoint.
It can be moved.

Figure 58: checkpoint at start line.
The position is automatic.

The algorithm used to create automatically the checkpoints is very simple:
a checkpoint is created for each curve, and the width of the checkpoint is initialized to 160% of the road width.

Shortcuts

Several features could be called with keyboard shortcuts. The tables below contain the list of these shortcuts, grouped by context meaning.

Main context

Shortcuts associated with the buttons located at the top of SnakeDitor window.

Shortcut Description
Esc Quit SnakeDitor.
Ctrl+N New track.
Ctrl+O Load a SnakeDitor file (.snr extension).
Ctrl+Alt+O Load a background bitmap.
Ctrl+I Import data from a GeneRally file.
Ctrl+S Save the track in a SnakeDitor file (.snr).
Ctrl+Alt+S Save the track as a bitmap.
Ctrl+E Export the track in a GeneRally file (.trk).
Ctrl+C Copy the track in the clipboard as a bitmap.
Ctrl+V Paste the clipboard as the land map.
Ctrl+Z Undo
Ctrl+Y Redo

'General' tab context

There is no specific shortcut associated with the 'General' tab.

'Layout' tab context

Shortcuts more specifically associated with the 'Layout' tab.

Shortcut Description
Ins Insert a circular arc after the current part.
Ctrl+Ins Insert a circular arc before the current part.
Del Delete the current part.
C Set the type of the current part to "circular arc".
L Set the type of the current part to "line".
M Swap the direction of the current part (only for circular arcs).
'left'/'right' arrows Decrease/increase the length of a linear part, or the open angle of a circular part.
'down'/'up' arrows Decrease/increase the radius of the current part (only for circular arcs).
Ctrl + 'left'/'right' arrows Select the previous/next part.
Tab Swap between 2 features Swap group. To use it, a feature within these 2 ones has to be selected first.
Left button Select a new thing (excepted a part)
Right button Select a part.
Alt + Right button Rotate the current part.
Alt + Left button Move the current part.
Ctrl + 'lock' button Simulate a click on the 2 lock buttons.

'Height' tab context

Shortcuts more specifically associated with the 'Height' tab.

Shortcut Description
Shift + Left button Insert a new height point
DelDelete the current height point.
Left button Select a new height point.
Right button Select a road.
Ctrl + Move mouse Display the second profile of an intersection.
Ctrl + Move mouse On the profile view (in the tab area)
Move the 2 heights at the same time.
Shift + Move mouse On the profile view (in the tab area)
Move the point every 1 value (instead of every 5 values).

'Race' tab context

Shortcuts more specifically associated with the 'Race' tab.

Shortcut Description
Shift + Left button Insert a new AI line point, or a new checkpoint.
Del Delete the current AI line point, or the current checkpoint.
Ctrl + G Import the ghost lap of the GeneRally file that was last used. This ghost is imported as the ghost 1.
Alt + Left buttonMove a AI line point, without modiying the other points at the same location.
It allows to modify a tangent point without modifying the other one.

Technical informations

SnakeDitor was developed in C++ for windows.
It was tested on a Celeron 633 Mhz, under Windows XP, a wireless mouse, and with a very comfortable chair. And it works fine.
It depends on the DLL COMCTL32.DLL et COMDLG32.DLL.

Disclaimer

Installing and using this software signifies acceptance of these terms and conditions of the license.

SnakeDitor is provided as Freeware.

You are granted the right to use and to make an unlimited number of copies of this software.

This software is provided "as-is".

No warranty of any kind is expressed or implied.

The author will not be liable for data loss, damages, loss of profits or any other kind of loss while using or misusing this software.

Any suggestions, feedback and comments are welcome.