After Effects CEP Panel & Map Renderer
LazyMapLayers
Free, Frame-Exact Map Design and Map Animation for After Effects
- GitHub stars: 5
- Downloads: 412
- v1.4.0 · 1 month ago
A free After Effects panel for maps, flights, routes and data stories. Every frame of the basemap is rendered at its exact camera, so there are no blurry zoom steps or popping labels, while pins, labels, routes and borders arrive as real After Effects layers that line up to the pixel. One camera from the whole globe to street level, 3D terrain and buildings, data maps and prisms from a CSV, and labels in every script. Version 1.0 works offline down to city level, version 1.1 shows the world in any year, the states, empires and colonies of 56 moments from 123,000 BC to 2010, and version 1.2 brings the streets of any city with nothing downloaded first, routes that follow the real roads, an arrow rig, and a full, light or online install, and version 1.3 brings TCX activities from watches and bike computers, lines out of one hub, and the borders between areas as lines. It now runs in EffectCraft too: LazyMapLayers for EffectCraft brings the same panel and the same maps to EffectCraft, the open-source After Effects-style compositor. Free and open source, with no account and no key.
The challenge
Maps turn up in almost every explainer and documentary, but the tools for animating them in After Effects are expensive, depend on paid data partners, and still show their seams: blurry steps as one zoom level's tiles hand over to the next, labels that pop and shrink, and camera moves that stop halfway. The free route, screenshots and hand-made keyframes, breaks as soon as the camera moves.
Technical challenges:
1. A map that is exact on every frame: a camera that flies from the whole globe down to a street needs the map drawn at that exact camera, not stretched between zoom levels.
2. Layers that stay on the map: pins, labels, routes and borders have to be editable After Effects layers that sit on the rendered pixels while the camera moves, in 2D and in 3D.
3. Labels in every script: Bengali, Arabic, Hindi, Thai and CJK names have to shape correctly and never overlap or flicker across the timeline.
4. Free data, offline: a world map, city detail, terrain and satellite imagery without an account, an API key or a monthly bill, and a flight from the globe into any country that lands on real detail with no internet connection.
The solution
1. A frame renderer inside After Effects: MapLibre GL JS draws every frame of the map comp at its exact camera (1080p in about 75–170 ms, 4K in about 280–640 ms), with up to 4× supersampling and motion blur that matches After Effects' shutter. Only frames that changed are drawn again, a render can be cancelled and resumed, and a scene made longer grows its map to the new end on the next render.
2. One continuous camera: a list of shots joined by fly, straight, along-route or cut moves on a van Wijk–Nuij zoom-and-pan curve from the globe to street level, with pitch up to 85° and 3D terrain and buildings; Apply to timeline writes real keyframes in one undo step. The panel's camera matches MapLibre's projection to within 0.00000003 px, and a matched After Effects camera keeps 3D layers on the ground (worst error 0.004 px). A second map in the same comp can follow the first one's camera, for split screens and overview insets.
3. Real After Effects layers: pins, routes that draw on with a Traveller riding them, callouts, borders and highlighted areas arrive as layers and editable shape layers, and a path drawn with After Effects' own Pen tool becomes a route or an area that follows the map. A route can follow the real roads by car, bicycle or on foot, found by the panel's own router over OpenStreetMap with no routing service or key, and be drawn as an arrow rig: one tapered layer whose head stays on its tip, every look a keyable control. A GPX or TCX track from a watch or bike computer draws on at its recorded pace, its laps joined into one line. Alongside them come separate passes and mattes for land, water, roads, boundaries and buildings.
4. Labels placed over the whole timeline: names in the local script with English subtitles, collision-checked so they never overlap, fading smoothly. Seas, rivers, mountains and what is inside a city are named too, street and river names bend along their line, and labels can be designed from a comp of your own with fields such as {name}.
5. Data stories: a CSV colours places by number or by category and adds bubbles, spikes, flows, heat and prism maps that rise in 3D by their numbers, moves the map through the years, and builds a legend and bar, line or area charts. Places are matched by name in 26 languages or by ISO code, and a CSV watched on disk recolours the map as soon as it is saved. Connect joins places with lines or runs them out of one hub (flights from one airport, offices round a head office), and Borders draws the borders a set of areas shares as one shape layer of lines that follow the map, such as the lines between a country's states without its coast.
6. Streets anywhere, and the world on the computer: the installer asks Full, Light or Online. Full puts about 2 GB of map data on the computer, OpenStreetMap for the whole world to zoom 9, elevation for the whole world, satellite and shaded relief pictures and the districts of every country, so a flight from the globe into any country lands on real detail with no internet connection; Light keeps about 175 MB, and Online only the panel. Closer than what is installed, the panel works out which OpenStreetMap tiles every frame needs and fetches only those from the Protomaps planet build (a fly-to into a city is a few megabytes), keeping them for offline work, and offline a render names the frames that lack their detail. Finer terrain (Mapterhorn), a ten-metre satellite picture built from Sentinel-2 and street search go online only when asked; imagery of one's own comes from XYZ, WMS or PMTiles addresses, tile folders and MBTiles files, and a camera can be imported from Google Earth Studio.
7. The world in any year: a 13.9 MB pack, built from historical-basemaps (GPL-3.0) with corrections of its own (the partition of 1947 and Bangladesh in 1971 are made by LazyMapLayers, Vietnam and Yemen divided in 1960 and 1971), puts the states, empires and colonies of 56 moments from 123,000 BC to 2010 in place of today's countries, each colony in its ruling power's colour and no two neighbours alike. A History Year slider on the map layer keys a shot through history, and the render fades only what changed hands; with a year on the map, a click highlights that year's state, Shift+click its whole empire, and the search, Auto labels and the feature browser all speak that year.
8. Built to last: every panel action is one undo step, the core is pure TypeScript with unit tests, the 2,601 expressions on the layers are checked in the ES3 engine, an in-After-Effects test suite measures the numbers, every change is built and tested on Windows and macOS, a Self-test in the panel checks a user's own After Effects and fills in a problem report, and the package is signed, with a one-click Windows installer (macOS is still experimental).
9. EffectCraft too: LazyMapLayers for EffectCraft (github.com/raisulsohan/lazymaplayers-effectcraft) runs the same panel in EffectCraft, the open-source After Effects-style compositor. The unchanged host script runs in EffectCraft's script engine behind a compatibility layer of a few hundred lines, the panel opens in a window of its own, and a small Node companion talks to EffectCraft over its control channel. All 657 kinds of expression the panel writes match After Effects' maths, nearly all of its test suites pass, the downloaded maps are shared with the After Effects version, and the twelve gaps found on the way are reported to EffectCraft with repros, several of them already fixed there.
Highlights
- Every frame rendered at its exact camera: no blurry zoom steps or popping labels
- The streets of any city with nothing downloaded first; offline down to city level with the Full install
- The world in any year: the states, empires and colonies of 56 moments from 123,000 BC to 2010, keyed through history in one shot
- One camera from the globe to street level, 85° pitch, 3D terrain and buildings
- Pins, routes, borders and labels as real After Effects layers, matched to the pixel
- Routes on the real roads by car, bicycle or on foot, drawn as a tapered arrow rig
- Routes drawn with the Pen tool, and maps that follow each other's camera
- Names in every script, Bengali included, without collisions; street and river names bend along their line
- Data maps from a CSV: colours, bubbles, flows, heat, 3D prisms and charts through the years
- TCX tracks at their recorded pace, lines out of one hub, and the borders between areas as lines
- Sentinel-2 satellite pictures, Google Earth Studio cameras, separate render passes and mattes
- Every action one undo step; a Self-test that fills in a problem report; a signed package with a one-click installer
- Runs in EffectCraft too: the same panel and maps, 657 of 657 expressions matching After Effects
- After Effects 2024+ and EffectCraft 0.8+; free and open source under MIT
