« Tutorials Overview

 
 

Terrain



Conforming the terrain according the road network is an essential part of the tool. It is the reason why we decided to create a road system inside Unity back in the early days of Unity. After spending weeks doing this manually with average results we started looking for ways to automate this.

 

Introduction


The process of conforming the terrain is done in the terrain tab

 

 

"Build terrain(s)" starts the process.

The other options are merely there to optimize the process during development when switching back and forth between Edit Mode and Build Mode. This is a pocess you will often use to see/test the final result.

For a multi terrain setup, selecting the terrain where you are working on from the dropdown (or CTRL + ALT + Click on the terrain) will significantly speed up the process, only that terrain will be processed.

"Selected Roads Only" will have the fastest results and is good while testing the road you are working on..

 

Note that the processing bar is not fully integrated yet. Please be patient if it seems to hang. Higher terrain resolutions 1025+ significatly increase the processing time, especially for 4097.

 

 

Conforming the Terrain to the road network


Important to know is that the results depend on the terrains heightmapscale, the terrain size versus the terrain heightmap resolution. The more terrain points in a small area the more flexible you are with road shapes, height changes, etc. When there are not enough terrain points available in curvy areas with height changes the terrain will poke through the roads or the road will float above the terrain. Switching on Shaded Wireframe as the shading mode for the scene view window will clearly show this.

The Troubleshooting page includes more info related to issues with conforming the terrain to the road shape..

 

Controls affecting how the terrain will be updated

 

 

The Indent values in EasyRoads3D represent the area over which the terrain will be leveled at the same height as the road. There is a fixed minimum based on the terrains heightmapscale.

The global Indent values can be controlled in General Settings > Scene Settings. New road objects will inherit this global value.

 

 

The Indent values are customizable per marker and can be used to add more definition to the terrain in some areas.

The Surrounding values represent the distance over which the terrain will be leveled from the road height to the original height of the terrain. Usually you want to keep this at a small size. Higher sizes may have better results when the road is floating higher above the ground. The terrain will be leveled over a larger distance to the original terrain height. See the below example, the selected marker in the middle image is raised signficantly above the terrain.

 

 

In the middle image the indent and surrounding values for the middle marker are increased resulting in the specific terrain deformation in the bottom image.

 

In Build Mode the following terrain controls will be available.

 

 

Smoothen Indent Area: This will smoothen the edge between the indent and the surrounding area. Note that this can only be done to a certain level due to the grid based nature of the unity terrain object. Steep edges will never get smooth, an alternative for this is terrain mesh overlays.

Surrounding Smooth Distance: The distance over which the surrounding area will be smoothened. Usually you want to keep this at a low figures.

Smoothen Surrounding Area: The will smoothen the edge where the terrain is leveled with the original height.

Reapply Critical Road Heights: You probably want to manually adjust the terrain in some places, add some additional detail etc. It can happen that this will result in the terrain poking through the road. This button will reapply the critical heights and fix this.

Preserve Terrain Contours: This is related to the surrounding area and will only have an affect when using larger surrounding values covering multiple terrain points. Depending on the value it will gradually blend in the original terrain shape. When there are only one or two terrain points in the area between the Indent edge and the surrounding edge the visual results will be minimal.

Terrain Splatmap


The shape of the road can be added to the terrain splatmap. In the below image the coastal road shape is blended in the terrain splatmap using the sand texture.

 

Splatmap Texture: The dropdown lists all available terrain splatmap texture. You can select which texture should be used for this road.

Expand: This will increase the size of the splatmap road shape.

Smooth Level: This will smoothen the edges of the shape with the the original splatmap

Opacity: The strength of the shape.

 

The above terrain splatmap controls can also be set for road types: General Settings > Road Types

That way you only have to set it once. Roads of that type will inherit these settings but you can still make changes for each road..

Note: In order for this to work "Update Terrain Splatmaps" in the Build settings must be switched on.