Skip to content
FritzsHero edited this page Jun 3, 2021 · 1 revision

Road

Road options

  • Gizmos - Enable or disable most gizmos for this road. Disable mesh collider gizmos via the unity menu if desired.
  • Lanes - Select the number of lanes for this road.
  • Lane width - Modify the width per lane, in meters.
  • Road width - Displays the road width without considering shoulders, in meters.
  • Shoulders enabled - Enables or disables shoulders.
  • Shoulders width - Modify the width of shoulders, in meters.
  • Road definition - The meter spacing between mesh triangles on the road and shoulder.
  • Max grade enforced - When enabled enforces a maximum grade on a per node basis.
  • Max road grade - The maximum road grade allowed on a per node basis.
  • Multithreading - When enabled allows for multi-threaded road generation.
  • Static - Marks road meshes as static for engine optimizations. Only check this if you won't modify the road/mesh transforms or physics.
  • Lightmapped - Marks road meshes with "Contribute GI" for the engine.
  • Ramp Height - Changes the outer shoulder ramp height.
  • Save mesh assets - When enabled saves all generated meshes as .asset files.
  • Duplicate road - Duplicates the current road as a new road assigned to the current road system.

Terrain options

  • Terrain subtraction - This value, in meters, will be subtracted from the terrain match height to prevent z-fighting.
  • Spline magnitude limit - Limits the magnitude of the spline nodes. Lower limit is better for typical roads with node - **separation of around 100 to 300 meters. Higher limits will allow for less tension when using very spread out nodes.
  • Height Modification - Enables or disables height matching for the terrain.
  • Active detail removal - Enables or disables active detail removal. Memory intensive on large terrains with large amounts of details. Recommended to not use this option and instead remove details and trees via splat maps with other addons.
  • Active tree removal - Enables or disables active tree removal. Memory intensive on large terrains with large amounts of trees. Recommended to not use this option and instead remove details and trees via splat maps with other addons.
  • Heights match width - The distance to the left and right of the road in which terrain heights will be matched to the road.
  • Details clear width - The distance between the road and detail, width wise, in which details will be removed.
  • Details clear height - The distance between the road and detail, height wise, in which details will be removed.
  • Tree clear width - The distance between the road and tree, width wise, in which trees will be removed.
  • Tree clear height - The distance between the road and tree, height wise, in which trees will be removed.
  • Store terrain history separate from scene - If enabled, stores the terrain history immediately on disk after use, saving memory while in editor.
  • Terrain history size - Shows the size, in kilobytes, of the terrain history in memory or on disk.
  • = Reset to default value.

Road and shoulder splitting

Typically auto-split will be the best choice for performance and other reasons.

Choosing split options will split the road/shoulder up into pieces mirroring the road segments between nodes. Splitting makes mesh collider bound calculations more efficient and fast. Splitting also allows for more detailed and flexible road texturing options such as passing sections, other different road lines per section, road debris and more.

Which splitting option to choose?

Recommended option: auto-split enabled for roads and shoulders.

Choose no splitting if you desire a single material set for this entire road and your game experiences no collision processing slowdowns from one large mesh collider. This option will create less game objects than automatic and manual splitting.

Choose automatic road and shoulder splitting if you desire multiple materials (such as yellow double lines for certain sections and white dotted for others) for this road and or your game experiences collision processing slowdowns from one large mesh collider.

Choose manual road and shoulder splitting if you desire the same as automatic splitting and desire more freedom over the process. This option will result in less GameObjects and larger mesh colliders when compared to automatic splitting.

Manual splitting information

Choosing manual splitting will force the user to select individual nodes to cut instead of the cuts being performed automatically. This option is recommended if bigger mesh colliders do not cause a slowdown in performance, as it lowers the overall GameObject count.

Manual splitting will not split up the mesh colliders like automatic cuts, so the colliders may get large & complex and cost more CPU to process collisions. If this option is chosen, please verify your game's collision processing speed and if you run into long collision processing times split more road sections.

Example usages of manual splitting

Example hill: Goal is to have double yellow no passing lines on a two lane road but only while the road is near or on the hill. Pick nodes on either sides of the hill and mark both as road cut. Everything between these two nodes will be its own section allowing you to apply double yellow no passing lines for just the hill. Example mountains: In the mountains, the road is curvy and the grade is high. There's a flat straight spot that you want to allow passing in, by marking the road with white dotted passing lines. At the beginning of the flat straight section, mark the node as road cut. Now at the end of the flat straight section, mark this node as road cut. This will create a road section between the two nodes, allowing you to apply white dotted passing lines for just the flat straight section.

  • = Reset to default value.

Editor camera

Use this section to travel along the road while in the editor sceneview.

  • Camera meters/sec is the speed at which the camera moves along the road.
  • Auto rotate will automatically rotate the camera to look forward at the current road's tangent. Note: You can still zoom in and out with the camera with this option selected.
  • = Reset to default value.

Road materials

These default materials will be applied by default to their respective generated meshes. If using split roads and or shoulders, you can specific specific materials to use on them (on the mesh renderers of the cuts) and they will be used instead of the default materials listed above.

  • Use default materials - When enabled will use default materials for the road system, allowing certain aspects of generation to automatically determine the correct materials to utilize.
  • Road base material is UV mapped on a world vector basis for seamless tiles.
  • Road marker material is UV mapped to fit roads. Use these materials to place road lines and other road texture details. Note: if using road cuts, these are the materials which will be placed by default at the initial generation.
  • Shoulder base material is UV mapped on a world vector basis for seamless tiles.
  • Shoulder marker material is UV mapped on a world vector basis for seamless tiles. For intended use with transparent shadow receiving shaders. Marker materials are applied, optionally, on shoulder cuts.
  • Physical material for road will be used on all road colliders. The physical material for shoulder will be used on all shoulder colliders. If using road and or shoulder cuts, you can specify unique physics materials which will be used instead of the default physics materials.
  • Apply above materials button will clear all saved materials on the roads and all road and shoulder meshes will use the materials listed above.
  • = Reset to default value.

Misc

Reset terrain history Resetting the terrain history will make the road system "forget" all terrain height,detail and tree history.

WARNING Only reset the terrain history if you have changed terrain resolution data such as heightmap or detail resolutions. A rare event may occur when editing and compiling this addon's scripts that a terrain history reset may be necessary. Treat this reset as a last resort.

Clone this wiki locally