Osmundi Documentation
Import real-world OpenStreetMap data into Unity and generate 3D city scenes with buildings, streets, water, trees, terrain, and full game systems.
Installation
From the Unity Asset Store
- Purchase and download Osmundi Street Map from the Asset Store
- In Unity: Window > Package Manager
- Select My Assets, find Osmundi, click Import
All dependencies are installed automatically.
From disk
- Copy the
com.osmundi.streetmapfolder into your project - In Unity: Window > Package Manager > + > Add package from disk
- Select
com.osmundi.streetmap/package.json
Quick Start
- Open Window > Osmundi > Street Map Importer
- Type a location and click Search (or press Enter)
- Click a result from the dropdown list
- Check "Select area on map" to see and adjust the import area
- Click Import
Tip: Start small! Try a specific landmark like Tower Bridge, London before importing entire neighborhoods.
Import Options
All features are enabled by default. Toggle them in the collapsible Import Options section:
| Option | Description |
|---|---|
Buildings | 3D buildings with heights, colors, 10 roof shapes, building parts |
Streets | Road surfaces with class-based widths and colors |
Sidewalks & Curbs | Raised sidewalk geometry with 15cm curbs |
Bridges | Elevated structures with pillars and railings (layer 2+) |
Tunnels | Sunken roads with arched portal entrances |
Water | Rivers, lakes, ponds with animated wave shader |
Land Use | Parks, forests, commercial, residential zones with grass shader |
Trees | 10 procedural tree shapes matched to OSM genus tags |
Elevation | Real-world terrain from OpenTopoData |
Street Lamps | Light poles with glow halos at night |
Windows | Dark glass quads on building walls |
Map Preview & Area Selection
Check "Select area on map" to enable the interactive map:
- The map auto-loads when you search for a location
- Drag to draw a selection rectangle
- Middle-click drag to pan
- +/− buttons to zoom
- Switch to Route mode to draw race routes directly on the map
Buildings
Heights
Resolved in order: height tag → building:height → building:levels × 3m → default 10m.
Colors
Wall colors from OSM tags: building:colour (named or hex), building:facade:colour, building:material (brick, glass, stone, concrete, wood, metal, plaster). Buildings without tags get deterministic HSV variation.
Roof Shapes
10 shapes from roof:shape: flat, gabled, hipped, half-hipped, pyramidal, dome, skillion, mansard, gambrel, round. Additional tags: roof:height, roof:orientation, roof:colour.
Building Parts
Landmarks with building:part elements render with individual parts at different heights, each with their own roof shape and materials.
Streets & Sidewalks
Roads are generated as quad-strip meshes with widths based on highway type (motorway 12m down to footway 2m). Lane markings include solid/dashed center lines and edge lines. Intersections are detected and filled with polygons.
Sidewalks with 15cm curbs are generated alongside urban roads based on OSM sidewalk tags or inferred from road type.
Water
Animated water shader with vertex displacement waves, fresnel darkening, sun sparkle, and shimmer. Uses stencil buffer to always render above land use areas. Water areas from natural=water and waterway centerlines.
Trees (10 Shapes)
Tree shape is inferred from OSM genus and species tags:
| Shape | Example Species |
|---|---|
| Round Deciduous | Oak, Maple |
| Oval Deciduous | Lime, Elm |
| Columnar | Poplar, Lombardy |
| Weeping | Willow |
| Spreading | Plane Tree, Chestnut |
| Bushy Small | Hazel, Elder |
| Palm (Fan/Feather) | Palm species |
| Cone Pine | Spruce, Fir |
| Broad Conifer | Cedar, Mature Pine |
Terrain Elevation
Enable Elevation in import options. Data from OpenTopoData (Mapzen dataset, 30m global resolution). Gaussian-smoothed, 4x upsampled to 120x120 grid. Roads, buildings, and trees follow the terrain surface.
Visual Styles
Four built-in styles, switchable via Window > Osmundi > Style:
- Default — Procedural colors from OSM tags
- Illustrated / Parisian — Mansard roofs, warm pastels, bloom, ACES tonemapping
- Neon Cyberpunk — Dark streets, neon glow strips, chromatic aberration
- Pencil Drawing — Greyscale sketch, Sobel edge detection, cross-hatching
Game Modes
Select Game Mode in the importer's Scene Mode section. Full game systems are created automatically.
| Template | Vehicles | NPCs | Traffic | Weather |
|---|---|---|---|---|
| Open World | Yes | Yes | Yes | Yes |
| Racing | Yes | No | Yes | No |
| Walking Simulator | No | Yes | Yes | Yes |
| Flight Simulator | No | No | No | Yes |
Vehicles & Traffic
5 procedural vehicle types (Sedan, SUV, SportsCar, Truck, Van). Arcade driving physics with WASD, Space for handbrake. AI traffic follows street paths with road-type speed limits, obstacle avoidance, and intersection pausing.
NPCs
Procedural humanoid models with random appearance. Walk between destinations via A* pathfinding on sidewalks. Flee from approaching vehicles. LOD system: full animation <50m, simplified 50-150m, culled >150m. Idle sway animation.
Weather & Snow
7 weather states: Clear, Cloudy, LightRain, HeavyRain, Storm (with lightning and thunder), Fog, Snow.
var weather = FindAnyObjectByType<OsmWeather>();
weather.SetWeather(WeatherState.Snow);
weather.IsSnowing; // true
weather.IsRaining; // false (snow is separate)
Rain/snow particles follow the player. Wet streets get higher smoothness. Realtime reflection probe activates during wet nights.
Day/Night Cycle
Realistic sun position from geographic coordinates and date. Sky colors transition from dark blue (night) through orange (twilight) to blue (day). Street lamp glow halos, lit building windows, vehicle headlights and red taillights at night.
var sun = FindAnyObjectByType<OsmSunController>();
sun.Mode = OsmSunController.TimeMode.Accelerated;
sun.DayDurationSeconds = 600f; // 10 min = 1 day
sun.JumpToSunset();
Ambient Audio
5 layered audio sources: city hum, traffic (scales with nearby vehicle count), nature (louder in parks), wind (scales with altitude), rain/snow. Thunder plays during storms. Assign clips via AudioPack ScriptableObject.
OsmCity — Central API
var city = OsmCity.Instance;
city.BuildSpatialIndex();
city.BuildStreetGraph();
// Coordinate conversion
Vector3 world = city.GeoToWorld(48.8566, 2.3522);
GeoCoordinate geo = city.WorldToGeo(transform.position);
// Access data
int buildings = city.DataSet.Buildings.Count;
ElevationGrid terrain = city.ElevationGrid;
SpatialIndex — Proximity Queries
var index = city.SpatialIndex;
// Find nearest building
var result = index.FindNearestBuilding(pos, 100f);
// Find all restaurants within 200m
var results = new List<SpatialQueryResult>();
index.FindByTag("amenity", "restaurant", results);
// What building am I inside?
var building = index.GetBuildingAtPosition(pos);
// Am I over water?
bool wet = index.IsOverWater(pos);
RuntimeStreetGraph — Pathfinding
var graph = city.StreetGraph;
// A* pathfinding
StreetPath path = graph.FindPath(startPos, endPos);
Vector3 pos = path.GetPositionAtDistance(50f);
// Snap to nearest street
Vector3 onStreet = graph.SnapToStreet(randomPos);
// Get street info at position
OsmStreet street = graph.GetStreetAt(pos);
OsmBuildingQuery — Building Info
// Click to identify buildings
var info = OsmBuildingQuery.GetBuildingFromRaycast(hit);
if (info.HasValue)
{
Debug.Log($"{info.Value.Name} — {info.Value.Height}m");
Debug.Log($"Type: {info.Value.BuildingType}");
}
// Find all restaurants
var list = new List<BuildingInfo>();
OsmBuildingQuery.FindBuildingsByAmenity(city, "restaurant", list);
OsmSpawnUtility — Spawn Points
// Random spawn on a street
SpawnPoint sp = OsmSpawnUtility.GetRandomStreetSpawn(city);
Instantiate(npcPrefab, sp.Position, sp.Rotation);
// Spawn on a rooftop (accounts for terrain elevation)
SpawnPoint? roof = OsmSpawnUtility.GetRandomRooftopSpawn(city);
// Place parked cars along a street
var spots = new List<SpawnPoint>();
OsmSpawnUtility.GetSpawnPointsAlongStreet(city, street, 8f, 3f, spots);
OsmSunController — Sun & Time
var sun = gameObject.AddComponent<OsmSunController>();
sun.Mode = OsmSunController.TimeMode.Accelerated;
sun.DayDurationSeconds = 600f;
// Read state
float altitude = sun.SunAltitude; // degrees
bool night = sun.IsNight;
// Events
sun.OnSunrise += () => Debug.Log("Morning!");
sun.OnSunset += () => Debug.Log("Evening!");
OsmMinimapProvider — Minimap
var minimap = new OsmMinimapProvider(city);
// Player position on minimap [0,1]
Vector2 pos = minimap.WorldToMinimap(player.position);
// Render a texture (bulk pixel array — fast)
Texture2D tex = minimap.RenderMapTexture(512, 512);
The built-in HUD minimap rotates with player heading and shows a compass direction indicator.
OsmInputBindings — Key Remapping
Create via Assets > Create > Osmundi > Input Bindings. Assign to OsmScene.InputBindings.
var bindings = OsmInputBindings.Active;
// All keys are configurable:
bindings.MoveForward; // Default: W
bindings.EnterExitVehicle; // Default: E
bindings.ToggleCockpit; // Default: V
bindings.PhotoMode; // Default: P
OBJ Export
Select an OSM Scene → Window > Osmundi > Export Selected as OBJ. Generates .obj and .mtl files with materials. Works with Blender, Maya, 3ds Max.
Minecraft Export
Select an OSM Scene → Window > Osmundi > Export Selected as Minecraft World. Voxelizes meshes and maps materials to block types. Copy to .minecraft/saves/ for Minecraft Java Edition 1.18+.
Performance
- LODGroup on all buildings and trees for automatic distance culling
- Mesh combining by spatial grid cells reduces draw calls
- ColliderLOD disables distant MeshColliders (>150m)
- RenderLOD disables distant renderers (detail 250m, buildings 800m)
- GPU instancing on all materials
- Distance fog hides culling pop-in
- Disable windows, sidewalks, and shadows for faster imports
Attribution
This plugin uses free, open APIs (no API keys required):
- OpenStreetMap data via Overpass API — ODbL License
- Nominatim for geocoding
- OpenTopoData for elevation (Mapzen dataset)
Required: You must credit "OpenStreetMap contributors" in your project (credits screen, about page, or documentation).
Troubleshooting
"Query timed out" / "All Overpass servers failed"
The Overpass API is busy. The plugin tries 3 servers automatically. Wait a few minutes and try again.
Buildings look flat
Most OSM buildings lack height tags. The plugin uses a 10m default. European cities generally have better 3D data.
Import takes a long time
Disable windows, shadows, sidewalks, and footpaths in Import Options for faster generation on large areas.
Water not visible
Ensure Water is enabled in Import Options. Some areas may lack water polygon data in OSM.
© 2026 Wistory AB. All rights reserved.