Road Segment Creator

Road Segment Creator is a tool for creating and customizing a RoadSegment

How To Use

Youtube tutorial.

  1. Create a RoadSegment.

  2. Place the segment at the desired position.

  3. By default, RoadSegment prefab contains RoadSegmentCreator component.

  4. Select Road segment type.

    _images/RoadsegmentCreatorGeneralSettings.png
  5. Adjust general settings.

  6. Adjust custom settings.

  7. Customize pedestrian node settings.

  8. Customize light settings.

  9. Customize path settings.

  10. Add RoadSegment to the RoadParent as children.

Custom Settings

Youtube tutorial.

Default Crossroad

_images/RoadsegmentCreatorDefaultCrossroadSettings.png
Direction count : info.
_images/RoadSegmentDefault.png

Example.

Turn Road

_images/RoadSegmentTurnRoadSettings.png
Node 1 offset : info.
Node 2 offset : info.
Additional local angle 1 : info.
Additional local angle 2 : info.
_images/RoadSegmentTurnRoad.png

Example.

Straight Road

_images/RoadSegmentStraightSettings.png
Node 1 offset : info.
Node 2 offset : info.
Traffic node height 1 : info.
Traffic node height 2 : info.
_images/RoadSegmentStraight.png

Example.

Merge Crossroad

_images/RoadSegmentTransitionCrossroadSettings.png
Direction count : info.
Sub-lane count : info.
SubTrafficNode distance from center : info.
_images/RoadSegmentTransitionCrossroad.png

Example.

Merge Straight Road

_images/RoadSegmentTransitionStraightRoadSettings.png
Sub-lane count : info.
Node 1 offset : info.
Node 2 offset : info.
Traffic node height 1 : info.
Traffic node height 2 : info.
_images/RoadSegmentTransitionStraightRoad.png

Example.

Merge Crossroad To Oneway Road

_images/RoadSegmentTransitionCrossroadToOneWaySettings.png
Direction count : info.
Sub-lane count : info.
SubTrafficNode distance from center : info.
Is enter of oneway : if it is on, it is the start of one-way traffic, if it is off, it is the end of one-way traffic.
_images/RoadSegmentTransitionCrossroadToOneWay.png

Example.

Oneway Straight

_images/RoadSegmentOneWayStraightSettings.png
Node 1 offset : info.
Node 2 offset : info.
Traffic node height 1 : info.
Traffic node height 2 : info.
Should revert direction : info.
_images/RoadSegmentOneWayStraight.png

Example.

Oneway Turn

_images/RoadSegmentOneWayTurnSettings.png
Node 1 offset : info.
Node 2 offset : info.
Additional local angle 1 : info.
Additional local angle 2 : info.
Should revert direction : info.
_images/RoadSegmentOneWayTurn.png

Example.

Custom Straight Road

Creator for creating straight roads of any shape.

Youtube tutorial.

How To Use

  1. Place the custom straight segment where you want it.

  2. Place the traffic nodes at the start and the end of the path (or expand the road by holding left-shift key and clicking the left-mouse button).

  3. Rotate the TrafficNodes in the direction of the route (make sure that the rotation of the nodes is set correctly).

  4. Adjust the number of lanes and the speed limit of the segment.

  5. If necessary, add more additional nodes to the paths (by pressing + in the scene) [optional step].

  6. Rotate the nodes of the paths according to the direction of the path [optional step].

  7. Snap TrafficNodes to the surface by pressing the Snap To Surface button if necessary [optional step].

  8. Complete all the default steps.

Custom Settings

_images/RoadSegmentCustomStraightCustomSettings.png
One way : segment contains only one-way paths.
Lock Y axis move : lock the Y axis to move the nodes.
Show Y position : show Y position of the nodes.

Snap Node Settings

_images/RoadSegmentCustomStraightSnapNodeSettings.png

Info.

Snap Surface Settings

_images/RoadSegmentCustomStraightSnapSurfaceSettings.png
Snap surface offset : offset between snap point and the node (Y axis).
Node Buttonswhich node you want to snap to.
  • All

  • Node1

  • Node2

Buttons:
  • Snap to surface: snap selected nodes to the surface.

Snap Line Settings

Creates additional path nodes along the curved meshes of the collider to make the path follow the shape of the collider (v 1.0.4+).

_images/RoadSegmentCustomStraightSnapLineSettings.png
Angle threshold : minimum angle between normal faces to create new path nodes.
Min waypoint offset : min offset between generated path nodes.
Snap surface offset : offset between snap point and the node (Y axis).
_images/SnapLineExample.gif

Example.

Path Settings

_images/RoadSegmentCustomStraightPathSettings.png
Show edit buttons path nodes : on/off edit (add & remove) button paths of node.
Show traffic node handles : on/off traffic node position handles.
Show traffic node forward : on/off display of node’s forward direction.
Speedlimit : speed limit for all paths of the segment.

Examples

_images/RoadSegmentCustomStraight.png

Source segment example.

_images/RoadSegmentCustomStraight2.png

Complex shape example.

_images/RoadSegmentCustomStraightSnapExample.png

Surface snapping example.

Custom Segment

Creator for creating segments of any shape and complexity.

Youtube tutorial.

How To Use

  1. Place the custom segment where you want it.

  2. Toggle on Custom settings parameter.

  3. Select the New node settings type & create a new TrafficNode by pressing the Add Traffic Node button [optional step].

  4. Place & rotate all created TrafficNode according to your needs (make sure that the rotation of the nodes is set correctly).

  5. Snap TrafficNodes to the surface by pressing the Snap To Surface button if required [optional step].

  6. Open the PathCreator tool to quickly create paths between nodes.

  7. Complete all the default steps.

    Note

    You can convert any default template to Custom Segment in the Other settings tab.

New Node Settings

_images/RoadSegmentCustomNewNodeUniqueSettings.png
Custom settings : on/off custom settings for advanced node customization.
New node settings type [custom settings enabled] new TrafficNode will be created like:
  • Prefab : new prefab.

  • Unique : created with unique defined settings.

  • Copy last : will be created with the settings of the last created node.

  • Copy selectedwill be created with the settings of the selected node.
    • Copy node index

Node Handles

_images/RoadSegmentNodeHandles.png
Show traffic node handles : on/off handles of TrafficNodes
Show traffic node forward : on/off display of TrafficNode forwading.

Parking Builder

Parking Builder info.

Custom Settings

_images/RoadSegmentCustomCustomSettings.png
Lock Y axis move : lock the Y axis to move the nodes.
Show Y position : show Y position of the nodes.

Snap Node Settings

_images/RoadSegmentCustomSnapNodeSettings.png

Info.

Custom TrafficNode Editor Window

Window that you can configure each TrafficNode settings. Custom settings should be enabled.

_images/RoadSegmentCustomTrafficNodeEditorWindow.png

Examples

_images/RoadSegmentCustomExample.png

Example.

Settings Description

Common

Direction count : number of sides of the crossroad.
Sub-lane count : number of sub-lanes (sub-lane is a lane with a different number of bands from the main lane count).
SubTrafficNode distance from center : distance between the SubTrafficNode (node that contains a sub-lane) and the center of the segment.
Node 1 offset : node 1 offset on the X-axis.
Node 2 offset : node 2 offset on the X-axis.
Traffic node height 1 : node 1 offset on the Y-axis.
Traffic node height 2 : node 2 offset on the Y-axis.
Additional local angle 1 : additional node 1 rotation angle.

Additional local angle 2 : additional node 2 rotation angle.

Should revert direction : direction of the crossroad lanes will be reversed

Snap Node Settings

Snap object type:
  • All : snap TrafficNode & Path node.

  • Traffic node : only TrafficNode.

  • Path node : only Path node.

Auto-snap position on/off position snapping.
  • Add half offset : the snapped object is shifted by half of the set snapping size.

Auto snap custom size : snapping value.
Auto round rotation:on/off rotation snapping.
  • Round angle : snapping angle value.

Components

General settings

_images/RoadsegmentCreatorGeneralSettings.png
Lane count : number of lanes.
Lane width : lane width.
Crossroad width : distance between traffic nodes.
Path corner offset : offset to change the rotation angle of curved paths.

Custom settings

Custom settings.

Pedestrian node settings

_images/RoadsegmentCreatorGeneralSettings.png
Add pedestrian nodes : add a pedestrian nodes to the segment.
Unique crosswalk offset : set up a unique offset for the selected crosswalk.
Crosswalk offset : set up a common offset for the crosswalks.
Pedestrian route width : pedestrian route width.
Custom crosswalk : on/off selected crosswalk.
Has crosswalk : on/off crosswalk for pedestrians.
Pedestrian corner connection type:
  • Disabled

  • Corner : will be created corner pedestrian node to connect crosswalks.

  • Straight : crosswalks will be connected directly.

Light settings

_images/RoadsegmentCreatorLightSettings.png

Youtube tutorial.

How To Use

  1. Turn on traffic light option.

  2. Select Light prefab type.

  3. Set the traffic light offset or enable Light handle type.

  4. If you want to configure the traffic lights individually, select the Node button.

Traffic lights

Show light indexes : on/off display light TrafficLightHandler index around traffic nodes and traffic lights in the scene.
Min TrafficNodes count for add light : minimum number of traffic nodes in the segment to add traffic light.
Add traffic light : add traffic light to the segment.
Light handle type:
  • None

  • Position : enable position handle for traffic lights.

  • Rotation : enable rotation handle for traffic lights.

Selected light prefab typeprefab of the traffic light to be added [can be changed in creator settings].
  • Oneway

  • Two way

  • Four way

Light location :
Traffic lights offset : local traffic light offset relative to traffic node.
Light angle offset settings:
  • Angle offset : local rotation angle of the traffic light.

  • Flip index : switches to the opposite light index in the traffic light.

Pedestrian lights

Add pedestrian lights : add pedestrian light to the segment.
Pedestrian light offset : local pedestrian light offset relative to traffic node
Pedestrian angle offset : pedestrian light rotation angle offset.

Path settings

_images/RoadsegmentCreatorPathSettings.png

Node selection panel

How to customize path:
  1. Select TrafficNode on the inspector panel.

  2. Select desired path on the inspector panel (it will be highlighted in the scene).

  3. Adjust the position of the path nodes (make sure path handles is enabled).

  4. Press Open Path Settings button to customize Path settings window.

Road settings

StraightRoad settings: [settings for straight paths of the segment]
  • Waypoint Straightroad count

  • Straight road path speed limit

  • Straight road priority

TurnRoad settings: [settings for turn paths of the segment]
  • Turn curve type

  • Waypoint turn curve count

  • Turnroad path speed limit

  • Turnroad priority

Scene settings

Show path handleson/off position handles in the scene.
  • Show edit buttons path nodes : on/off add & remove buttons nodes in the scene.

Show waypointson/off visual circle position of the waypoint in the scene.
  • Show waypoints info : on/off info of waypoints (local index, speedlimit).

Turn connection settings

Custom node turn settings : on/off the turn settings for each traffic node.
Left turn count : number of left turns from the traffic node.
Right turn count : number of right turns from the traffic node.
Lane left turn connection count : number of connections to the left from the lane traffic lane.
Lane right turn connection count : number of connections to the right from the lane traffic lane.

Segment handler settings

_images/RoadsegmentCreatorSegmentHandlerSettings.png
Show segment position handle : on/off position handle for segment.
Snap segment position : on/off snap segmant position.
Add half offset : the snapped object is shifted by half of the set snapping size.
Custom snap size : snapping value.
Snap surface offset : snap surface offset.
Snap layer mask : snap layermask.
Snap segment to surface : snap the segment to the surface.

Other settings

_images/RoadsegmentCreatorOtherSettings.png
Merge segment : opens the merge segment tool.
Convert to custom : converts the current segment to custom segment.
Save prefab paths : segment save prefab path.
Save to prefab : save segment to prefab.

Buttons

Rotate -90°/90° : rotate segment by 90° degree.
Recreate : recreate segment.
Clear : clear segment.

Hotkeys

Capslock : rotate segment by 90° degree.

Parking Builder

A tool to quickly create a parking space. Is part of the RoadSegmentCreator and can only be enabled in the custom segment.

Youtube tutorial.

How To Use

  1. Position a custom segment on the road where the parking spaces will be.

    _images/PlaceCustomSegment.png
  2. Set the size of the parking slot (settings).

  3. Enable position handle

    _images/ParkingBuilderExample1.png
  4. Position the parking pointer where you want the line to start.

    _images/PlaceCustomSegment2.png
  5. Enable rotation handle and set the rotation of the parking slot by dragging a circle in the scene.

    _images/ParkingBuilderExample2.png
  6. Set the object parking line to parking line and rotate the direction of the parking line by dragging a circle in the scene.

    _images/ParkingBuilderExample3.png _images/PlaceCustomSegmentSettings1.png
  7. Enter the number of parking slots.

    _images/PlaceCustomSegment3.png
  8. Open the Path tab.

    _images/PlaceCustomSegmentPathTab.png
  9. Toggle on Show select path buttons option.

  10. Select the source path in the scene.

    _images/PlaceCustomSegment4.png
  11. Select the Enter tab and press the Create button.

    _images/PlaceCustomSegmentSettings2.png
  12. In the created path create additional waypoint nodes by pressing + in the scene.

    _images/PlaceCustomSegment6.png
  13. Customize Traffic Group, Initial speed limit and Node Clone Count parameters.

    _images/PlaceCustomSegmentSettings3.png _images/PlaceCustomSegment7.png
  14. Open the Offsets tab and adjust the position handle for each node individually if required [optional].

  15. Repeat the same steps (11 - 14) for the exit path.

    _images/PlaceCustomSegment10.png
  16. Open Pedestrian tab.

    _images/PlaceCustomSegmentSettings5.png
  17. Customize Weight, Parking node offset and Parking enter node offset

    _images/PlaceCustomSegment11.png

    Blue circle - enter parking car PedestrianNode. Green circle - default PedestrianNode linked to the parking PedestrianNode.

    _images/PlaceCustomSegment12.png

    Preview parking line result.

  18. Press Create Line button.

    _images/PlaceCustomSegment13.png

    Create line result.

  19. Connect the pedestrian nodes to the pedestrian nodes of the city.

    _images/PlaceCustomSegment14.png

    Note

    Created lines can be edited or deleted in the Created lines tab.
    _images/PlaceCustomSegmentSettings7.png

Settings

Common

_images/RoadSegmentCustomParkingBuilderCommon.png
Place count : number of parking slots.
Parking place spacing offset : distance between parking slots.
Line object type:
  • Parking place : handle parking place.

  • Parking line : handle parking line.

Handles:
  • None : no handles.

  • Position : enabled position handle for the place or line.

  • Rotation : enabled rotation handle for the place or line.

Line start point local : local parking line start position.
Place size : parking lot size.
Node direction : local direction of the TrafficNode in the parking place.
Line direction : local direction of the parking line.

Path

_images/RoadSegmentCustomParkingBuilderPath.png
Parking connection source type :
  • Path [paths will be connected to the Parking source path (PathPoint connection)]
    • Parking source path : path from which the created parking slot paths will start and end.

    • Show select path buttons : on/off display exist paths of the segment to add a parking source path.

  • Node [paths will be connected to the selected TrafficNodes (TrafficNode connection)]
    • Source TrafficNode : node from which the created parking slot paths will start.

    • Target TrafficNode : node to which the paths connected from the parking place.

  • Single node [paths will be connected to the selected single TrafficNode (same node for enter & exit paths)]
Auto recalculate parking paths : paths ends will be recalculated when changing the position of the parking line.
Rail type:
Traffic mask group : group of the vehicles that allowed on the parking.
Show edit path parking buttons : on/off edit (add & remove) buttons of the path.
Handles Panel:
  • None : handles disabled.

  • Handles : position handles of the path enabled for first parking place.

  • Offsets : position handles for all parking places.

Path Selection Panel:
  • None : displayed Enter & Exit paths.

  • Enterdisplayed only Enter paths.
    • Initial path speed limit : initial speed limit of Enter paths.

    • Node clone count : number of nodes in the next paths that are will clone position from source path.

  • Exitdisplayed only Exit paths
    • Initial path speed limit : initial speed limit of exit paths.

    • Node skip last count : number of last nodes in the next paths that are will clone position the last nodes from source path.

Node

_images/RoadSegmentCustomParkingBuilderNode.png
Place TrafficNode type : TrafficNode type.
Parking TrafficNode weight : TrafficNode weight.
Node custom achieve distance : custom distance to achieve a node (if 0 value default value will be taken).

Pedestrian

_images/RoadSegmentCustomParkingBuilderPedestrian.png
Add parking pedestrian nodes : add an entry parking node and a node linking it.
Parking pedestrian node type : parking node type.
Auto connect nodes : auto connect created entry parking node and nearby created node.
Parking pedestrian node weight : weight entry parking node.
Parking node offset : entry parking node offset relative to traffic nodes.
Parking enter node offset : node that connected to entry parking node relative to traffic nodes.