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

  1. Purchase and download Osmundi Street Map from the Asset Store
  2. In Unity: Window > Package Manager
  3. Select My Assets, find Osmundi, click Import

All dependencies are installed automatically.

From disk

  1. Copy the com.osmundi.streetmap folder into your project
  2. In Unity: Window > Package Manager > + > Add package from disk
  3. Select com.osmundi.streetmap/package.json

Quick Start

  1. Open Window > Osmundi > Street Map Importer
  2. Type a location and click Search (or press Enter)
  3. Click a result from the dropdown list
  4. Check "Select area on map" to see and adjust the import area
  5. 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:

OptionDescription
Buildings3D buildings with heights, colors, 10 roof shapes, building parts
StreetsRoad surfaces with class-based widths and colors
Sidewalks & CurbsRaised sidewalk geometry with 15cm curbs
BridgesElevated structures with pillars and railings (layer 2+)
TunnelsSunken roads with arched portal entrances
WaterRivers, lakes, ponds with animated wave shader
Land UseParks, forests, commercial, residential zones with grass shader
Trees10 procedural tree shapes matched to OSM genus tags
ElevationReal-world terrain from OpenTopoData
Street LampsLight poles with glow halos at night
WindowsDark glass quads on building walls

Map Preview & Area Selection

Check "Select area on map" to enable the interactive map:

Buildings

Heights

Resolved in order: height tag → building:heightbuilding: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:

ShapeExample Species
Round DeciduousOak, Maple
Oval DeciduousLime, Elm
ColumnarPoplar, Lombardy
WeepingWillow
SpreadingPlane Tree, Chestnut
Bushy SmallHazel, Elder
Palm (Fan/Feather)Palm species
Cone PineSpruce, Fir
Broad ConiferCedar, 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:

Game Modes

Select Game Mode in the importer's Scene Mode section. Full game systems are created automatically.

TemplateVehiclesNPCsTrafficWeather
Open WorldYesYesYesYes
RacingYesNoYesNo
Walking SimulatorNoYesYesYes
Flight SimulatorNoNoNoYes

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

Attribution

This plugin uses free, open APIs (no API keys required):

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.