Skip to main content
Modular Road System

Modular Road System

February 11, 2018shippedUnityC#BlenderPhotoshop

A modular road construction system for Unity, built around a socket-based snapping mechanism inspired by the approach Bethesda presented in Fallout 4's Modular Level Design at GDC 2016. The goal was to create a flexible, artist-friendly toolkit that could produce realistic urban road layouts from a small set of reusable pieces.

The Problem

Hand-placing road geometry in a game world is slow, error-prone, and scales poorly. Every intersection, lane change, or sidewalk transition becomes a unique modeling task. For any project requiring a full urban road network, I needed a system that could build complex layouts quickly while maintaining visual consistency and seamless tiling.

The Approach: Socket-Based Snapping

After studying Joel Burgess's GDC 2016 talk Fallout 4's Modular Level Design, I adapted their "socket" concept for road construction:

  • Each road piece has snap points (sockets) at its edges that define valid connection points
  • Pieces automatically align and lock when dragged near a compatible socket
  • The system enforces correct orientation, elevation, and lane alignment with no manual tweaking needed

This meant level designers could assemble complex road networks in minutes instead of hours.

Tool in Action

Here's the snapping tool placing road segments in the Unity editor:

Modular road socket tool showing drag-and-snap placement of road segments in Unity

And a closer look at how individual pieces connect with automatic alignment:

Modular road pieces snapping together with automatic alignment and tiling

The Kit

The full road kit includes:

  • Straight segments: single-lane and multi-lane with center line variations (solid yellow, dashed white)
  • Intersections: T-junctions and 4-way crossroads with crosswalk markings
  • Corner pieces: curved curb geometry with proper sidewalk transitions
  • Sidewalks and curbs: painted curbs (yellow, red), brick paving, concrete slabs, grass strips
  • Road markings: crosswalks, lane dividers, stop lines, all baked into tileable textures

Every piece was modeled in Blender and textured in Photoshop with PBR materials. Textures were designed to tile seamlessly across socket boundaries so there are no visible seams at connection points.

Technical Details

  • Snap sockets are defined as empty GameObjects with a custom editor script that handles proximity detection and alignment
  • Pieces are tagged with connection types (road-to-road, road-to-sidewalk, sidewalk-to-curb) to prevent invalid combinations
  • The system supports both grid-aligned and free-form placement
  • All geometry is modular and GPU-instancing-friendly for efficient rendering at scale

Result

The system was used across multiple projects to rapidly build urban road networks. What would have taken days of manual placement was assembled in a fraction of the time, with consistent quality and zero seam artifacts across entire city layouts.

Gallery

Looking to build something similar?

Let's talk about your project.