Malta in Minecraft

← Blog ·

The Azure Window, measured: from photo guesses to a 3-D model

How I rebuilt the Azure Window from four drone videos and two laser surveys, after a first version shaped by hand from photos.

In short: My first Azure Window was shaped by hand from about a dozen photos, and it always looked a bit like a model of the arch. In November I rebuilt it from four drone videos filmed before the 2017 collapse, turned into a 3-D model and pinned onto two laser surveys. The pillar, the slab and the opening now have the shape they really had.

The measured Azure Window from the south, in Malta in Minecraft (shaders)
The measured Azure Window from the south, in Malta in Minecraft (shaders)

Where I started

In October I wrote about rebuilding the Azure Window and the Inland Sea tunnel. That arch was my best guess from photos. I gave it a pillar, a table-top slab and an opening against the cliff, and then I roughened it until it stopped looking machine-made.

It had one big weakness. Every size in it was a guess. The photos told me the pillar was heavy and the slab thin, but a photo taken from the shore gives no sizes. I picked numbers that looked right from the angles I had, so the arch looked right from those angles and drifted from the real one everywhere else.

The real Azure Window from the south in 2011. Photo: DXR, CC BY-SA 4.0, Wikimedia Commons
The real Azure Window from the south in 2011. Photo: DXR, CC BY-SA 4.0, Wikimedia Commons

Why a drone video can do better

Two laser surveys flown from aircraft cover Dwejra. The 2012 survey was flown while the arch still stood, so it has the top of the slab. The 2018 survey has only the headland, because the arch fell on 8 March 2017. Neither can see under the slab, inside the opening or the sides of the pillar, which is exactly the part that makes it an arch.

A drone video sees all of that. Each frame is a photo from a slightly different place. Software can find the same spot of rock in many frames and work out both where the drone was and where that spot sits in 3-D. This is called photogrammetry. It gives a shape with no size and no position, floating in its own space. The lasers fix that: I slide, turn and scale the model until its rock lines up with the laser's rock.

I had tried this method on the Blue Grotto and the Coral Lagoon first, so I knew which steps worked before I came back to the Window.

Building the model

I used four drone videos posted on YouTube, filmed in 2016 and 2017. One of them was filmed on 26 February 2017, ten days before it fell. They are used to measure only, so no frame from them appears here.

From them I kept 790 sharp frames, and 686 of those joined into one model. Then I placed the model on both lasers. Half of the model's points around the site landed within 0.41 m of the laser surface, and 70 % within 1 m. I started the fit from several different guesses and it came back to the same answer every time. That told me the fit was real.

Turning the model into blocks took three ideas:

  • Start solid. I filled everything the 2018 laser shows, then added back the columns that fell, up to the 2012 height: 1,186 columns of rock that no longer exist.
  • Cut the air. Every frame shows sky or lit water somewhere. A line from the camera to that patch of sky must pass through air, so any block on that line can't be rock. I only cut a block when frames agreed at least 300 times, so one bad frame couldn't punch a hole.
  • Smooth along the layers. Rock cut this way came out with vertical flutes, like organ pipes. Real limestone breaks along flat beds. I smoothed each 1 m layer on its own, sideways only, and the flutes turned into ledges.
The hand-shaped arch (left) and the measured arch (right) in Malta in Minecraft, from the same three camera positions as real drone frames (no shaders)
The hand-shaped arch (left) and the measured arch (right) in Malta in Minecraft, from the same three camera positions as real drone frames (no shaders)

The comparison above uses the same camera positions as real drone frames. The hand-shaped pillar was a square block, about the right height. The real pillar was a rounded mass, wider at the top, with the slab leaning out over it.

Joining it to the land and colouring it

The two lasers didn't quite meet. Where the slab joins the headland they left a gap up to 2 blocks wide, so the slab and the cliff top sat at different heights with a step between them. I ran the slab into the headland and set the top on both sides of the break to the 2012 height, so you can now walk from the cliff onto the slab without a step.

The slab from above, joined flush to the headland, in Malta in Minecraft (no shaders)
The slab from above, joined flush to the headland, in Malta in Minecraft (no shaders)

For the colour I went back to the frames. Each visible block takes the colour it had in sunlight in the videos, and 91 % of the blocks were seen. Video colours depend on the camera and the hour, so I kept only how light or dark each block is. The paler half becomes smooth sandstone and the rest plain sandstone, which matches the rock around it. Past the site the two blocks fade out over 30 m into the normal cliff, with the usual dark band at the waterline.

Under the arch, the sea floor still comes from the 2012 seabed survey, from before the collapse, so you sail about 11 m above it.

What went wrong

  1. A wrong start. My first search for the model's position allowed mirror images, and a bad first guess of the scale made the rest worse. It cost about an hour before I spotted it.
  2. A floating bush. In a test world a dark block hung in the air over the old arch. It was the crown of a tree on the slab. My old smoothing pass took its trunk for a stray block and removed it. That pass now touches only rock. You can see the bush in the third pair of the comparison picture, above the hand-shaped arch.
  3. A post in the water. A 1-block post stood two blocks high at the foot of the east wall, with a few scraps at the base of the pillar. It is visible in the second pair of the comparison picture. I had seen it in earlier shots and taken it for a fallen stone without checking. My check for floating rock missed it, because it counts anything touching the seabed or the waterline as a stone lying there. Now every piece of rock that isn't joined to the main rock is removed.
  4. Random cobblestone. The cave tool scatters one-block boulders on cave floors, and on a measured site almost all bare rock counts as floor. Three cobblestone blocks appeared on the arch. Measured and hand-modelled caves now get no random boulders.

How much closer is it?

I measured it. For 8 real frames I compared the outline of rock against sky and sea with the same view in the game. The hand-shaped arch matched 69 %, the measured one 73 %. The number includes all the land in each view, which didn't change. The arch itself changed far more than four points.

The bigger change is that every part of it is now measured. The top and outline come from the 2012 laser, the headland from the 2018 laser, the underside, pillar and opening from the drone model, and the sea floor from the 2012 seabed survey. The only modelled parts left are the colours of rock the drones never saw and the caves I haven't built.

What it taught me

  • A photo shows a shape. Many photos with known camera positions measure it.
  • Check what a check counts. A test for floating rock passed while a post stood in the water, because it treated the waterline as ground.
  • Let the rock break the way rock breaks. Smoothing along the layers did more for realism than any amount of random roughness.
Low on the water, looking through the opening, in Malta in Minecraft
Low on the water, looking through the opening, in Malta in Minecraft
From the sea to the south-west, with the slab leaning out over the pillar, in Malta in Minecraft
From the sea to the south-west, with the slab leaning out over the pillar, in Malta in Minecraft
From the north side of the arch, in Malta in Minecraft
From the north side of the arch, in Malta in Minecraft
The Window and the Dwejra cliffs from the south, in Malta in Minecraft
The Window and the Dwejra cliffs from the south, in Malta in Minecraft

The arch has its own page on the wiki: Azure Window, with the teleport and sizes. Did you film the Window from a drone or a boat before 2017, especially the caves in the cliff to the north? Get in touch.

Technical details
  • Footage: four YouTube videos, measurement only: "4K - Azure window Dwejra Gozo 26/02/2017 - Last shot from drone before collapse" (youtube.com/watch?v=VtS5C4pr0Eg), "Azure Window by Drone | Malta & Gozo" (8MOUARg-Obo), "Dwejra Azure Window Gozo (4K) Drone 2016" (Rv_rLS_4bkc), "Last drone flight through the Azure Window!" (414bn1z3LTY).
  • Model: COLMAP 4.2.1 (structure from motion), one fisheye camera model for all four videos. 790 sharp frames, 686 registered. Dense step on 247 frames: 2.76 million points and 15 million lines of sight.
  • Placement: a 7-parameter fit (position, rotation, scale) against both lasers from a seed at the arch tip. Scale 19.07, site points 0.41 m median distance, 70 % within 1 m, the same answer from every start.
  • Rock: 2018 laser solid plus 1,186 columns that fell, filled to the 2012 top. A block is air only when both halves of the frames agree at least 300 times. Each 1 m layer smoothed in plan over 1.2 m. The slab joined to the headland across a gap of up to 2 columns, a 5 x 5 median on the slab top, flat across the join at the 2012 height.
  • Colour: each exposed block's sunlit colour sampled from the frames (91 % seen), lightness only: the paler 45 % smooth sandstone, the rest sandstone, fading out over 30 m past the site box.
  • Sea floor: the 2012 seabed survey, about 11 m under the arch.
  • Checks: no floating pieces, sky openings only round the arch, every solved camera compared with its real frame. Rock read back from the world: 99.2 % of the model present.
  • Pictures: in-game from the latest save. Most cameras stand where a real drone frame was taken. The first and last pictures use Complementary Unbound shaders and Faithful 64x; the comparison and the view from above have no shaders. The photo is a real photo from 2011.