Tunnels

Road Tunnels:

The editor allows the construction of simple road tunnels, which comprise a semi-circular mesh shell and a road. These can be used to create passes underneath mountanous terrains or through large rock structures, for example. With the feature switched on for a road, this is done somewhat automatically, whereby any section of a road which happens to be underground (either through editing or otherwise) will be proposed to the user as a ’tunnel section'.

A Road Tunnel A Road Tunnel

To switch this feature on, the user must allow the road to have tunnels. A toggle button can be found on the first row of buttons on the Road Edit Window, which will switch this on or off. This feature remains off by default. If the user tries to create a tunnel with the feature off, no tunnel outlining will appear on the road visualisation and tunnels shall not be generated upon finalise. This button is shown below.

Tunnel Toggle Button Tunnel Toggle Button

In Edit Mode, the tunnel center will appear hidden by the terrain and the user will not be able to look in to the tunnel from the outside. In Finalise Mode, however, the tunnel is cleaned and there should be no obstacles preventing a user from travelling/looking through it from either end. The omission of this feature from the Edit Mode is done for computational efficiency.

Inside A Tunnel Inside A Tunnel

The tunnels are editable in various ways, so as to make them appear as realistic as possible. These options are discussed below.

A single road can have multiple tunnel sections within it, although we recommend to design (or split) the roads in such a way that there is only one tunnel section per road. This is because the tunnel-specific editing features (in the Road Edit Window) will apply to all tunnel sections of the road, such that changes which work with one tunnel section will be applied to all the others.

Tunnel Editing Parameters:

When tunnels exist on a road, some extra options will become available to the user. They will appear towards the bottom of the Road Edit Window, and are shown/described below.

Tunnel Parameters Tunnel Parameters

Wall Depth sets the thickness of the tunnel mesh walls. This is defaulted to 1 meter.

R Offset sets the radial offset value of the wall (the radius of the tunnel mesh, as a circle).

Z Offset sets the elevation offset of the center of the tunnel mesh, with respect to the road that passes through it.

Extend S sets the start longitudinal extension value (the distance in meters by which the start of the tunnel mesh protrudes longitudinally into space).

Extend E sets the end longitudinal extension value (the distance in meters by which the end of the tunnel mesh protrudes longitudinally into space).

Start Pos sets the integer-valued road position at the start of the tunnel (longitudinal), which can be used to extend the tunnel mesh start point.

End Pos sets the integer-values road position at the end of the tunnel (longitudinal), which can be used to extend the tunnel mesh end point.

Granularity sets the radial granularity of the tunnel mesh. Larger values will produce a tunnel mesh which has more detailed curvature.

Start Pos and End Pos set the actually point on the road spline at which the tunnel should start and end, and Extend S/Extend E are used to fine tune this. The fine tuning is useful for hiding any erroneous holes which may appear when the tunnel is created during rendering (finalise mode).

Some Considerations:

It is left to the user to experiment with tunnels and their controls, in order to find what works best for the specific road and terrain. The following considerations may be useful:

When tunnels are created in the finalise mode (rendered), the ‘hole map’ layer of the terrain must be edited appropriately, so as to remove any terrain from the tunnel, which will (hopefully) create a tunnel cleaned from any terrain artifacts. Since the map resolution is one meter-per-pixel, this means it is difficult to create a tunnel which is perfectly flush with the terrain, especially when they are steep inclines. The detail in the map is simply not there to work perfectly every time. This may result in visible ‘holes’ appearing near the tunnel entrance and exit. The fine tuning controls listed above are used to help remedy this, although the algorithm should work fairly well in most cases without further adjustment.

Note: When switching back to Edit Mode, the holemap is reset to how it was before the tunnel was generated

Tunnel sections should enter and exit the terrain. If they do not, it presents problems when linking a road end which is underground, since it should be surrounded by a tunnel mesh. Although this may be technically possible, it is not recommended. If the user tries to generate complex, linked networks of tunnels underground, they may find various rendering issues. It may also be difficult to translate (move) road nodes underground since there is no ground reference for the mouse (although the gimbal may prove useful).

Last modified: May 17, 2024

Any further questions?

Join our discord
Our documentation is currently incomplete and undergoing active development. If you have any questions or feedback, please visit this forum thread.