All projects

Project

Project: OPFRAME

ProjectPersonalSep 2026 — present
OPFRAME's 3D view over sunlit valleys and a lake, with hundreds of blue and red military symbols across the terrain and aircraft symbols on stalks above it, and "Project: OPFRAME" in large lettering along the bottom.
  • C++
  • C# / .NET
  • WinUI 3 / Windows App SDK
  • Direct3D 12
  • HLSL
  • Graphics Programming
  • Real-Time Visualisation
  • GIS and Mapping
  • APP-6 / MIL-STD-2525
  • Application Development

OPFRAME (short for Operational Framework) is a Windows desktop application for viewing map data in 2D and 3D, with military symbology drawn over the top. It's a personal project, still at the prototype stage, and I'm actively working on it.

What it is

At heart it's a mapping and visualisation tool. Imagery, elevation and LIDAR are streamed in as tiles and drawn on the GPU, and you can go from a view of the whole globe right down to detail at the metre scale. On top of that sits everything that makes up an operational picture: units and equipment shown as APP-6 symbols, the overlays used to plan with them, and the orders of battle they belong to.

I made it a native application rather than a web map on purpose. Between the amount of data, the frame rate a 3D terrain view needs, and having to run with no network connection at all, most of the work ends up on the GPU, through Direct3D 12.

View larger: OPFRAME's 3D view: mountains around a lake in low evening sun, with long shadows, haze in the distance and broken cloud across the sky.
The 3D view, with terrain, sky and sun.

The 2D and 3D views

There's a 3D perspective view and a north-up 2D map, and they share the same tile system and the same rendering code. The only real differences are the camera and how the tiles are chosen. The terrain is a curved mesh on the WGS84 ellipsoid, raised up by the elevation data, with mipmapped imagery draped over it, hill shading, and contour lines worked out per pixel. The sky comes from an atmospheric scattering model, so the light follows wherever the sun would be at any date and time, and there's aerial perspective, cloud and bloom too.

Positions are kept in double precision on the CPU and only reach the GPU relative to the camera, which keeps everything precise wherever you are on the globe.

View larger: OPFRAME's 2D map: blue friendly and red hostile APP-6 unit symbols, each labelled with its designation, spread across a hill-shaded topographic map.
The 2D map, with APP-6 symbols and their text.

Symbology and overlays

Entities are drawn with their APP-6(D) / MIL-STD-2525D symbols, from a SIDC in either the 15-character or the 20-digit form. That includes direction-of-movement arrows, speed leaders, operational condition, and the text APP-6 puts around the frame, which is decluttered by priority when things get crowded. Ten thousand moving entities can be placed in under a millisecond per frame.

Overlays are drawn per pixel in the terrain shader, so they follow the hills and valleys at every level of detail. There are range rings and sectors, translucent domes for air defence envelopes, line-of-sight coverage from a viewshed calculated on worker threads, and tactical graphics.

View larger: OPFRAME's 3D view of mountains with overlays draped over them: translucent green cylinders and a red dome around air defence units, small blue sectors, shaded areas following the ground, and red and orange lines labelled LINE-1 and LINE-2.
Air defence envelopes, sectors and line-of-sight coverage over the terrain.

Orders of battle

The ORBAT editor has a window of its own, for building and reorganising orders of battle. It handles a tree of thousands of units, an org chart for briefings, task organisations that change over time, and holdings against establishment. Doctrine isn't hard-coded; it's loaded from data packs. Units are matched to their APP-6 symbols by rules, and you can drag them onto the map as entities that stay linked to the unit. ORBATs can be exchanged with other systems using C2SIM, or imported from spreadsheets.

View larger: The ORBAT editor window: unit types listed on the left, an org chart of 12th Mechanised Brigade in the middle showing 2 Mech Inf Bn's companies and platoons with their strengths, and the selected unit's properties on the right.
The ORBAT editor.

How it is built

  • A C# WinUI 3 front end (.NET 10, MVVM) on top of a native C++20 Direct3D 12 renderer, which runs on its own thread. The only link between the two is a flat C API.
  • The geo, scene, imaging, symbology and analysis code lives in separate native libraries that don't depend on Direct3D, so they can be tested without a graphics device.
  • Reverse-Z depth with an infinite far plane. Uploads go through textures created up front, so nothing is allocated on the GPU while you're flying around, and it recovers if the graphics device is lost.
  • No installer and no administrator rights needed. It's unpackaged and self-contained, so you just copy it and run it.

The data

While it's in development, everything it shows is open data. OPFRAME isn't tied to that, though, and can just as well use custom or client-specific data sets. The open data is prepared offline by a companion tool. Worldwide, that's NASA imagery, AWS Terrain Tiles and the Copernicus DEM. There's also 1 m LIDAR from the Welsh Government and the Environment Agency, built into terrain at about 1.5 m, along with Ordnance Survey's open maps and the USGS topographic maps. Place search runs over OS Open Names, which covers 1.26 million places, and finds them in well under a millisecond as you type.

The repository is private for now, but get in touch if you'd like to see it running.

Videos

Watch it being built

Explainers

How it works

  • Explainer · Oct 2026

    How is the terrain drawn?

    How OPFRAME finds, picks, loads and draws the map tiles behind its terrain, from a tile's address on disk to the shading on screen.

  • Explainer · Oct 2026

    How are the contour lines depth-tested?

    Why the contour lines don't need a depth offset. They're worked out in the terrain's own pixel shader, so the only depth test they go through is the ground's.

  • Explainer · Oct 2026

    How does the cloud layer work?

    The clouds are a pattern on a thin shell at the cloud base, cut from noise read at five scales and lit by the sun and sky, for a few texture reads per pixel.