Tiny Dubai
Image models · Open data · WebA hand-painted map of Dubai that you can zoom around. Lighting follows the actual sun's path, the city lights up at night, cars and the metro run around the city, and the planes overhead are real flights.
Drag the clock and the whole city moves through the day.
Why Dubai
A while ago I started to see a few tweets on X about projects that turned whole cities into isometric illustrations: Isometric NYC, Tiny London, and one for Toronto. You could zoom from the full skyline down to a single street, and everything looked like it had been drawn by the same hand.
As is normal with these tech-focused projects, they were mainly taking place in the US or Europe. That's where all the good data is, and where the people who would build these things are (that's not entirely true, Dubai does have a lot of builders especially in recent times, but I don't think it has as many tinkerers as the US or Europe). Anyway, Dubai didn't have one of these isometric projects, and when I saw this, I felt like this was something I wanted to do. It may not officially be 'home', but I've spent 70% of my life in Dubai at this point, and just objectively it's a fantastic subject for a project like this: the towers, the Palm, the long straight line of Sheikh Zayed Road, the Creek, the airport, it's all very top-down friendly. And if I could somehow get the night lights right, it would be even better! So at the start of November I decided to see if I could make it happen.
The idea
I consider myself slightly artistic, but there's no way I could paint this myself. The trick these projects use is to split the work in two:
- Build a plain 3D version of the city. OpenStreetMap has the outline and height of most buildings, plus roads, water, parks and metro lines. Put a satellite photo underneath for the ground, raise the buildings into blocks, and you get a rough, grey model of Dubai from above.
- Ask an image model to repaint it. Take pictures of that model from an angle, piece by piece, and have an AI image model repaint each picture in one consistent style. Then stitch all the paintings back together into one giant zoomable image.
The 3D model helps understand the shape of the city: where every road and building is. The image model then makes that shape look good. They have to work together - the model on its own invents streets that don't exist, and the render on its own looks like a video game from 2005.
Teaching a model one style
An image model will easily repaint a picture, but if you ask it to repaint the same picture a hundred times, you'll get a hundred slightly different styles. That's fine for one picture but terrible for a map, where every tile has to match the tile next to it perfectly so that nobody can tell the difference.
The way to fix this is to teach an open image model one specific style. I used Google's Gemini image model to take the 3D renders that I had and paint a small set of examples from them. Then I picked the paintings I liked and used them to train a small add-on (a LoRA) for an open model called Qwen-Image-Edit. After that, the open model was able to paint in that same style consistently every time, and it runs on my own GPU.
In terms of style, I initially started with pixel art, because that's what all the famous projects like NYC were using. But when I actually tried it out I didn't love how it looked, and I also didn't want to just literally do the exact same thing everybody else was doing, so I asked the model to try a few different styles for me to pick from. Eventually I switched to something called 'gouache': soft, warm, a bit like a travel poster. I wasn't very confident about this choice, but looking back at it now I'm very happy with it - although I do wonder what other styles could look like (maybe down the road?)
A week of wasted effort
The first working version used Mapbox satellite images for the ground. Mapbox has great data - the images are sharp, recent and very good. About a week into the project, with a test area already painted, I decided I would rather be a good boy and ask for permission to use this data, as even though lots of projects were using it without asking, it was potentially against the ToS. This turned out to be a noble but stupid move, as Mapbox said no to my request (thanks guys!)
So now I had to go back to the drawing board for the ground images - leaving the ground blank wasn't even worth considering, because it made a huge difference to the way the output looked (it was horrible). So using Claude's help I looked for a new open/free source for satellite images. The best free source for Dubai that we could find was Satellogic from 2022 - this was fine but not ideal as it didn't even have full coverage of the city. We then had to use a lower-resolution layer from the European Copernicus programme to fill the gaps. Eventually this did the job and it works, but it's definitely a step down and a trade-off you can see: buildings finished after 2022 won't be in the data, at least cleanly. If your tower is missing, that's why. Adding it to OpenStreetMap is the best way to get it into the next repaint.
In hindsight I should have asked about the licence on day one, not day seven. Or maybe I shouldn't have asked at all? As the saying goes, better to ask for forgiveness than permission - but I didn't want to take that chance with a possible lawsuit from a billion dollar company. Lesson learned.
Painting the city, one chunk at a time
The painted area covers central and coastal Dubai, split into 109 chunks so far (more to come later). Each chunk is a few hundred separate pictures that get painted and then blended together. Painting the full map takes days of GPU time.
Some of it ran on the RTX 3090 in my desktop at home, usually overnight. But I was scared of overdoing it and destroying the card, and also just didn't have the patience to wait for days. So for the bigger batches I rented cloud GPUs by the hour, which was faster but costs real money. I thought it wouldn't add up to much as it was only a few dollars per chunk but with the amount of revisions and tweaks I ended up making this number quickly became pretty large. In total the painting has cost a few hundred dollars so far, which is the main reason the map stops where it does for now - just feels wrong spending so much money on something that is just a passion project so far.
What went wrong
Most of the time on this project went into finding and fixing faults, not building new things. A few things that took the most time:
- Seams. Where two chunks meet, you could sometimes see a line where the colour or the paint style changed. Fixing this meant repainting chunks together in small groups, not one at a time.
- Copying the neighbours. When a chunk was repainted next to an older one, the model would sometimes copy the old paint across the border, so a fix in one place could bring back an old fault in the next. One tower turned see-through this way, and it took a while to understand why.
- The landmarks. Plain rectangular blocks in place of buildings is fine for most of the city, but Dubai has a lot of unique elements in its skyline, and that was (and is) the easiest way to make this project unique. Buildings like the Burj Khalifa, the Burj Al Arab, the Museum of the Future and all the towers in JLT and Marina are what give the skyline its character. Using rectangles for these didn't feel fair, so I looked for proper 3D models for as many buildings as we could find. Big shout out to the people who made these models available online for free - thank you!
- Colour. The sea, the grass and the sand each went through several rounds of colours that were "almost right". The sea alone was repainted more times than I want to count, costing actual painful dollars every time.
Every repaint was checked by eye, chunk by chunk. I kept a running list of faults to fix the next time the GPU was free and the list is still pretty full.
Making it feel alive
Getting the painting right was difficult, but obviously a nice painting in today's ADHD generation will only hold attention for a minute. When I thought of what might make people stay and look for longer, it was obvious it needed to have some kind of 'life' or movement. So on top of the painting, the browser draws:
- A moving sun. The map follows the time in Dubai, and you can drag the slider to any hour. At night the windows and street lights come on.
- The metro and the cars. Trains follow the timetable and traffic follows the time of day. They aren't live: I couldn't find traffic data that I'm allowed to use.
- Real flights. The planes are live positions from a free, open flight tracker.
- Sound. Turn it on and you hear what's near where you're looking: traffic on the big roads, waves on the beach, birds in the parks, a plane passing over.
Paying for it
As I've mentioned, the project has already cost me quite a bit of money - I'm okay with this, because it's been a lot of fun and I love looking at it every now and again. But in an attempt to try and make at least a single dollar back (or achieve my goal of financial freedom), I added one small way for the map to pay for itself, called a "moment". By paying a small amount you can send someone fireworks over the Palm with their name in the sky, or a message on the Burj. They get a link, and the show plays when they open it. The map itself stays free.
How it was built
I'm not a graphics programmer, and three weeks ago I knew very little about image models or 3D rendering. Almost all of the code was written with Claude - as per my recent blog post, I feel no shame in admitting I used AI for this, because there's no way I could ever have done something like this without it. My part in the project was the taste and the decisions: which style, which areas, whether a repaint was good enough, when to spend money on a GPU and when not to. These things made it unique, and it's probably why I feel so attached to it, because all my decisions are right there for me to see!
It's the biggest thing I've built on my own, and it would not have been possible for one person in three weeks even a year ago.
What's next
The map is live as a work in progress. There is an ever-growing list of chunks that still have small faults and need to be repainted, adding more 3D landmarks, and then growing the painted area, starting with the parts people ask for. If you want your area painted, there's a contact form on the map. Tell me which one!