-
Notifications
You must be signed in to change notification settings - Fork 3
Road Generators
adhocmaster edited this page May 12, 2021
·
26 revisions
- Create some intersections
- Convert intersection to Direction Intersections by identifying incident roads in direction quadrants (top is North, left is West, bot is South, right is East)
- Create a grid and cells of it.
- Apply WFC to fill cells with Direction Intersections
- Get Direction Intersection positions based on the cell placement.
- Adjust the original intersections' positions based on their direction counterparts' positions.
- Connect incident roads based on their placement on the direction quadrant
A direction intersection is defined by four direction quadrants (top is North, left is West, bot is South, right is East). An incident road is placed in a direction quadrant based on the outgoing heading at the incident point. Headings are calculated counter-clockwise from East.
The conversion tool is based one invariant in the intersections: no two incident roads ever overlap.
The process is shown here: