Road Grading
This is a rough guide to how I've been building roads in a manner that minimizes sharp slope changes, keeping height transitions smooth and barely perceptible, thus giving roads a more natural look and making travel speeds more consistent.
Note that you will find the compass mod almost indespensible to use these techniques.
Values Required
- Tile Distance: The number of border segments whose slope can be modified between the start and end tile points of the section to grade. For long distances where it is impractical to manually count the number of borders, you can use this formula:
|x1 - x2| + |y1 - y2| = distance Where (x1, y1) is the the starting coordinates of the section to grade (a relevant corner), and (x2, y2) is the end point. In the diagram to the right, these points are represented by the circled border corners.
Note that for straight sections either the x or the y difference will be zero, so it can be disregarded.
For diagonal sections, the x and the y differences will be equal, so you can simply calculate one and double it to get the distance value.
- Step: How much the slope increases or decreases with each additional tile; a value of 1 provides the smoothest transition. This value is higher when more aggressive changes are needed; increasing the step to 2 or 3 will double or triple the height gain, respectively.
- Height Gain: The overall height gain over the distance.
For example, suppose that in the diagram to the right you to grade the area between the two circled corners having the following parameters:
| Corner | Height | X Coordinate | Y Coordinate |
|---|---|---|---|
| Top | 200 | 410 | 625 |
| Bottom | 188 | 413 | 622 |
From these values, you can calculate the height difference of 12 and the distance of (3 + 3) = 6. For short distances such as these, of course, it may be just as easy to simply count the distance manually.
When grading a road, I will usually do one side first (generally the side most at risk of encountering rock, which will change the strategy) then modify the opposite side to match.
