An Introduction To Aerialod

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

AN

INTRODUCTION
TO AERIALOD
Creating 3D maps and visualisations
in Aerialod

with Alasdair Rae

Aerialod version: Win v0.0.1

Workbook version and date: v1.5, February 2021

Automatic Knowledge Ltd


www.automaticknowledge.co.uk
An Introduction to Aerialod automaticknowledge

Contents
1. The Aerialod interface: how it works, what does what................................................................. 4
2. Some important principles ............................................................................................................................. 9
3. Scotland digital terrain model ................................................................................................................... 13
4. High-resolution Lidar data............................................................................................................................ 15
5. Global population density............................................................................................................................. 18
6. Turntable – for creating frames for animation ............................................................................ 22
7. Other experiments ............................................................................................................................................. 23
8. Credits ........................................................................................................................................................................ 24

A note about Aerialod


The first version of Aerialod was released at the end of 2019, by @ephtracy. It is available in
64- or 32-bit versions for Windows (if you are not sure whether you have the 64- or 32-bit

version of Windows, you can find out via > > System > About). Aerialod downloads as
a 2.04MB zip archive, which when unzipped is still only 3.34MB in size. Yet it is surprisingly
powerful. If you need to adjust the size of the text on the Aerialod interface, go to the
config.txt file in the config folder and change the default ui_scale value from 1.0 to a larger
number (e.g. try 1.5 and then adjust again if necessary).

This workbook is also available online, at:


https://automaticknowledge.org/training/workbooks

Licence: Attribution-Non Commercial 2.0 Generic (CC BY-NC 2.0)


https://creativecommons.org/licenses/by-nc/2.0

Notes

1
An Introduction to Aerialod automaticknowledge

About Automatic Knowledge


Our philosophy is all about sharing data
and knowledge, so that we can all be a bit
better informed about the world. The way
we do this is mainly through spatial data
analysis and visualisation, and as part of
this we offer training courses in software
like QGIS and Aerialod. Alasdair Rae
(pictured) founded Automatic Knowledge
in 2019 and also runs the training courses.

Why ‘automatic knowledge’?


The idea behind Automatic Knowledge is that we do the hard
work of completing the journey from data to knowledge, so that
you can then make more informed decisions. These training
sessions will hopefully help you do that too.

Other activities (e.g. free stuff)


In addition to training, we provide a range of consultancy
services, specialising in data, spatial analysis, the built
environment and cartography. We also publish free and open
datasets that you may find useful, at:

automaticknowledge.co.uk/resources

We are also a ‘sustaining member’ of QGIS, and have previously


donated to @ephtracy, creator of Aerialod. By taking this course,
you’re making a contribution too.

Notes

2
An Introduction to Aerialod automaticknowledge

Automatic Knowledge training sessions


The idea behind all our training sessions, and these workbooks,
is to help you learn new things in an enjoyable way, without
confusing you. We want everyone who takes one of our courses
to come away with useful new skills that they can then put into
practice in their day-to-day work, and build on in the future.

About this workbook


Following a workbook can be a great way to learn new software
skills, but there’s also a risk that it turns us into robots, following
step-by-step instructions in a linear way. During the session,
we’ll go off at tangents and do some demos of useful skills –
among other things. The emojis? I add them in for a bit of colour,
but they also serve a practical purpose because they can help
us find key sections of the document quickly.

Formatting
Most font is size 14. When switching between screen and
workbook this is easier on the eyes. The following format will be
used in relation to files/folders, websites, options/tools, click
actions and any text I want you to input. I’ve also added a
‘Notes’ section on each page where you can jot things down.

Files, folders and suchlike: e.g. scotland_50m_dtm.tif


Websites: e.g. www.automaticknowledge.org/training/data
Aerialod tools, sections, options: e.g. Intensity
Actions - click menu item/ button: e.g. Render > Save As
Text input: e.g. 31839f when entering colour codes

Notes

3
An Introduction to Aerialod automaticknowledge

1. The Aerialod interface: how it works, what does what


We’ll mostly look at the Aerialod interface in this section, but let’s
start at the beginning, one step before that.

When you download Aerialod from the ephtracy website, this is


what you get (my screenshots are from a Windows 10 PC).

When you unzip this archive, this is what you will see inside the
Aerialod-0.0.1-win64 folder (you may be using the 32-bit
version, in which case the folder will have a different name).

The readme.txt file has information about the software, plus


some data credits – I always recommend actually opening and
reading readme files!

Remember this
You can browse around different folders if you are interested but if you
need to adjust the font size on the Aerialod interface, you need to look in
the config folder and then change the ui_scale value from 1.0 to a higher
number in the config.txt file (try 1.5 or 2.0 at first).

Notes

4
An Introduction to Aerialod automaticknowledge

As you may have already discovered, you launch Aerialod by


double-clicking the Aerialod.exe icon.

Then you see something like this, below (you’ll see it in dark
colours – I have just inverted the colour scheme for printing
purposes).

Let’s walk through the following controls now.


 Moving the demo map around – pan/zoom etc
 All the Light settings, on the left
 All the Map settings, on the right
 The View settings, along the bottom
 Then we can go through the rest: Sample, Display, Camera,
Export and how to save views in memory.

Notes
Let’s not overlook: Scale, Offset, Step, Lod (level of detail – that’s why
it’s called AeriaLOD), Grid, and so on. And of course the left, right and
middle mouse buttons, and the space bar. Also, the model image you are
working with here is a very small 16x16 pixel image. That’s all it is.
5
An Introduction to Aerialod automaticknowledge

 We can also look at the Camera Ruler and the View Cube,
as well as changing the Image Size.

Aerialod is, according to the website, ‘An interactive path tracing


renderer for height maps’, but what does this actually mean?

 Interactive? Well, this is fairly straightforward. It just means


we can interact with it and set the views and options that
we want. We interact directly with the 3D model on screen.

 Path tracing? This refers to a method of rendering 3D


images so that they look realistic, based on the way they
are lit. Although Aerialod seems simple, path tracing is

Notes

6
An Introduction to Aerialod automaticknowledge

actually very complex – that’s why it may slow your


computer down when you try to render large scenes.

 Height maps? Normally this will be things like elevation


models you import into Aerialod – e.g. the digital terrain
model data we’re using later on, or some lidar data. In
reality, it can be any kind of raster image with pixel values
that Aerialod can interpret and extrude and render.

If you want absolute top-end performance when you are


working with Aerialod, then you’re likely going to need a more
expensive graphics card. If you’re using a fairly conventional
office-type PC setup then you may have to be patient while
rendering large, complex images but if you have something like
an RTX 3070 graphics card (typically found in gaming PCs) then
you will notice a world of difference, with much faster rendering.
However, for most jobs you will get on just fine on a fairly typical
spec machine.

Remember this
Aerialod supports rendering of height maps up to 16,384^2.

What does this mean? Well, if you try to import an image 20,000 pixels wide
in Aerialod it won’t work. Feel free to try it and see how you get on. This is
rarely a problem but if you were trying to import a 1km global population
density raster then you would run out of space and have to resize it before
importing it into Aerialod (because the earth is 40,075 km in circumference
at the equator).

Notes

7
An Introduction to Aerialod automaticknowledge

In this example above I have shown an example with the grid,


where it turns things into neatly defined blocks. To get the lines
on the vertical side surface of the model I select the Vertical
setting on the left, in the Grid settings. And to the right…

 Scale: height scale – e.g. if you want to exaggerate elevation,


increase this figure.
 Offset: if you want your ground level to move up or down,
adjust this up or down (e.g. if it’s land it will look flooded using
a negative value). This is the height offset setting.
 Step: this refers to Quantization Step and will basically make
your data look more ‘stepped’ or ‘terraced’.
 Lod: you’ll notice that this will make things more chunky with
higher values – LOD stands for ‘level of detail’.

Notes

8
An Introduction to Aerialod automaticknowledge

2. Some important principles


The small file size and apparently lightweight nature of Aerialod
can be misleading. It is quite powerful and complex and there
can be quite a lot to understand. We’ll go through some of this
step-by-step, but before we get going it’s worth highlighting a
few more things.

Samples Per Pixel


First of all, if you want to understand what impact increasing the
Samples Per Pixel value can have, see this 3-seconds-per-
frame gif I created using settings of 512 and then 8192 Samples
Per Pixel. The gif switches back and forth between the two.

http://automaticknowledge.org/training/data/raster/aerialod_
samples_per_pixel.gif

Put simply, a higher value will lead to a crisper, less noisy image
and – in this case – a smaller file size.

Read this piece about sampling – it’s pretty useful.


https://docs.arnoldrenderer.com/pages/viewpage.action?page
Id=36110402

Rayleigh
Rayleigh refers to the optical phenomenon of what is known as
‘Rayleigh scattering’, named after the nineteenth-century British
physicist Lord Rayleigh (aka John William Strutt). Why is the sky

Notes

9
An Introduction to Aerialod automaticknowledge

blue? The answer is that the blue sky we sometimes see in the
daytime is caused by Rayleigh scattering.

There are countless websites and blogs and other resources


online about Rayleigh scattering, and you can check them out if
you want to find out more. The whole topic is fascinating.

Want to see it in action in Aerialod? Just turn the Sky setting to


Atmospheric Scattering and turn Rayleigh all the way down to 0
and then start adjusting it upwards and watch as the blue starts
to show, and then change to orange (you’ll need to be on Pers
camera view and ideally SG for LENS).

Using the default 40 and blue in Aerialod you will see a blue sky
when you have the right camera view on. Turn it all the way up
to 100 and you’ll see a bright orange glow.

Mie
What the heck is this? Well it’s also to do with light scattering but
it’s different from the Rayleigh setting. The Wikipedia page on
Mie is actually quite good (if complex) and shows a nice image
illustrating the link between Rayleigh and Mie scattering. It is
named after the person who first specified the process, the
German physicist Gustav Mie.

Leave Rayleigh at the default 40 and turn Mie up to 100 and


you’ll see that things get somewhat hazy, with the sun getting

Notes

10
An Introduction to Aerialod automaticknowledge

obscured by the haze, if you have it turned on. Turn it to 0 and


you’ll see a much cleaner, clearer, crisper atmosphere.

Top tip
How do you adjust the numbers accurately in Aerialod?

You can generally just click a value bar and/or slide it back and forth to
adjust numerical values for different settings (such as Rayleigh, Mie and
Ozone). If you want to enter a specific number quickly all you need to do is
double click on the actual number and then type in a different value
manually using your keyboard. Just delete the number that is there and
enter what you want.

Ozone
We’ve all heard about the Ozone Layer but in Aerialod this refers
to Ozone Density. This is the most confusing of the Sky settings in
my opinion. First of all, there’s the colour – it seems to turn things
purple on the default setting (which uses the default colour of
green). Turn it to 100 and you get dark purple everywhere.

The best way to really explain what it does is to leave Rayleigh


and Mie at 40 and then put Ozone up to something like 20 in the
first instance and you’ll see a nice purple glow.

Why does green turn things purple? Look at a colour wheel and
you’ll see that green shades are opposite the pinks and purples.
If you change the Ozone green to orange, for example, then the
scene will turn blue – blue is opposite orange on a colour wheel.

Notes

11
An Introduction to Aerialod automaticknowledge

Fog
This can also be confusing. Turn Density up to 100 and you will
see your scene look like a very foggy day. Then change the
Phase value between the min and max (-0.90 and 0.90) to see
what it does – it shifts the fog position in the scene.

Top tip
Spend some time playing with the settings and noting what they do.

The best way to get to the stage where you are able to create stunning
visuals with Aerialod is to get to grips with the effects of the different
options – there are infinite possibilities!

IMAGE SIZE

ATMOSPHERIC SCATTERING
IS TURNED ON BY CLICKING
THIS BUTTON

SKY
SETTINGS

CAMERA SETTINGS

Notes

12
An Introduction to Aerialod automaticknowledge

3. Scotland digital terrain model


For the rest of the time we’re going to experiment with real-
world data, instead of the model data that appears when we
open in Aerialod.

You’ll find the Scotland digital terrain model in the /raster folder
for this session. There are multiple different versions but you can
just download the png version for now.

http://automaticknowledge.org/training/data/raster/

This is the file you want:


scotland_no_lochs_small_high_compression.png

In your web browser, you may have to right-click and then


choose something like Save link as… to download it.

It’s a 50 metre resolution digital terrain model that I put together


using Ordnance Survey open data (their Terrain 50 product)
and you can read more about it at the link below.

https://automaticknowledge.co.uk/resources/

 Once you’ve downloaded the file, drag and drop it straight


into Aerialod and we’ll get started. If for any reason it is
causing your computer to run slowly then we can just chop
a bit out of it and use a smaller portion of it.

Notes

13
An Introduction to Aerialod automaticknowledge

Now we’re going to try and make something interesting with


Scotland.

I’ll do a proper walk-through of it, but here are some of the basic
steps we’ll take.

1. Image Size to 1920 x 1080.


2. Camera mode on Pers.
3. Sun angle to 3 degrees pitch.
4. Atmospheric Scattering turned on.
5. Sun turned on and Area (size) of 40.
6. Lens on SG.
7. Exposure on 10.0.
8. Gamma on 1.0 (Gamma correction controls the overall
brightness of an image – try it).
9. Change the Scale setting to 0.33.
10. Under Bounce, on the left, let’s change Diffuse to 3 and
Energy to 15 – see the little bar chart icon to the top left.
11. Change the Ground colour to #4564b3.
12. Change the Base colour to #a4af83.
13. Add a Vignette of 15.

From here, I want you to continue to tweak the settings on your


own and see what you can come up with. Feel free to share it.

We export by specifying our Width and Height then via Render


but I won’t do this now as it will take too long. Export just exports
a raw raster image, not our rendered scene.

Notes
Angle the scene however you like – and remember that when you move
the image it will take a few moments to redraw, possibly longer. You can
try to render a small scene if you like, but don’t try to export a massive
image during the session. You can always take a screenshot of your
settings – that’s what I normally do. 14
An Introduction to Aerialod automaticknowledge

4. High-resolution Lidar data


Hopefully you’ve managed to do something interesting with the
Scotland DTM data above. That was 50 metre resolution data -
and that means each cell in the raster file is 50 metres by 50
metes and has one data value associated with it (in this case it
was elevation).

In the UK we now have lots of open lidar data, and this is much
more detailed – with correspondingly large file sizes.

As per Wikipedia: “lidar was originally a portmanteau of light


and radar. It is now also used as an acronym of "light detection
and ranging”

For an informative explanation of lidar data and how it is


collected, I highly recommend looking at this Environment
Agency (UK) explanation.

https://www.arcgis.com/apps/MapJournal/index.html?appid=c
6cef6cc642a48838d38e722ea8ccfee

The different spatial resolutions we have in the UK are 2 metre, 1


metre, 50 centimetre and 25 centimetre – but note that the
coverage is not complete and can be missing entirely in places.

I have patched together some 1 metre resolution data for you,


for a part of Greater Manchester in England. See below for more.

Notes

15
An Introduction to Aerialod automaticknowledge

“Laser pulses emitted from a LIDAR system reflect from objects both on
and above the ground surface. Each laser pulse can return to the LIDAR
sensor as one or many returns, as it encounters multiple reflections from
surface objects as it travels to the ground. Our current sensors can have
up to 8 returns per laser pulse.

All derived DTM and DSM products have been generated from the last
return of the laser pulse or the only returned single reflection, as this
provides the optimum chance of the laser reaching the ‘true’ ground
surface. In the diagram below for example the last return used in the DTM
and DSM products for Plane A would be the first and only return recorded
and for Plane B would be the fourth return.”

Source: Environment Agency

The area you have been given data for is tile SJ89NW of the
British National Grid. You can find it here if you want to.

https://britishnationalgrid.uk/

Notes

16
An Introduction to Aerialod automaticknowledge

Once again, the file you need to download is in the /raster folder
for today’s session.

http://automaticknowledge.org/training/data/raster/

I have prepared slightly different versions of this dataset but the


one to use right now is sj89nw_1m_rendered_no_water.png

If you just open it up in your web browser you’ll see that it is a


greyscale image that goes from black (no data) to white (the
highest values, which are for the highest elevations).

 Open a new, clean Aerialod session (or close it and then


open again) and then drop this lidar data straight in.

 Then spend some time exploring and looking around,


switching to a web map of the area if you need to get your
bearings or figure out what’s what.

Now I want us to make something interesting out of this, using


what we have learned so far about the settings.

Example: you could reduce the offset value to -15.0 and set the
Ground colour to blue if you want to do a little flood simulation.

The options are almost endless. Try a low sun, but without
Atmospheric Scattering. This can also be quite pleasing.

Notes
Try: leave everything at the default settings, except sun Angle of 5,
Ground colour of #8399d2, Offset of -15.0 and then zoom in so you can
see the detail of this ‘flooded’ scene. Then set the Ruler values to -25 on
the vertical and +40 on the horizontal.
17
An Introduction to Aerialod automaticknowledge

5. Global population density


Okay, so far - so good. But do you REALLY understand what is
happening so far? How about the Info panel on the right of
Aerialod? For the Manchester lidar data that looked like this
(below).

This told us that our image


was 5000 units on the x axis,
5000 on the y axis, and 100
on the z axis. That’s because
it was an area of 5km x 5km
so there were 5,000 pixels on
both the x and y dimension that Aerialod could read. The Z
values ranged from 0 to 100 because instead of this being a true
elevation dataset, I converted it to a rendered image with values
from 0 to 100 – to create a smaller file size.

When I download the original asc files from the Environment


Agency Lidar website and load them in to Aerialod, I still get
values of 5,000 for the X and Y dimension but for the Z I get 195.6,
which tells me that the highest value in my image is 195.6
metres high. Notice that this has a decimal place as well, so it’s
more accurate (and takes up more disk space – so we get
bigger file sizes).

If you’re doing proper analysis, the original asc full resolution


data is what you should use. If it’s just for visualisation, then the
simplified files are usually better as they are easier to work with.

Notes

18
An Introduction to Aerialod automaticknowledge

I began this section on ‘Global population density’ by talking


about the lidar data for Manchester on purpose.

Before we add it, it’s really important to understand what it is


we’re working with. This helps us make sure that we know what
we’re visualising but it can also help us when things go wrong.
Okay, so here are the characteristics of the next image (below).

Yes, you are reading


this correctly. This is
an image of 16,000 x
7,982 pixels of the
whole world’s
population density
that is only 2.20MB in
size.

What about DPI?


You can look into
that more yourself
but it’s not actually
what people often
think it is, that’s all I’ll
say for now.

Add this file to


Aerialod now and see what it looks like – then I’ll explain how I
put it together. Please remind me if I forget to explain this.

Notes

19
An Introduction to Aerialod automaticknowledge

Explore the data for a bit, zoom in, pan and all that.

Notice the Info characteristics? The


image is 16,000 pixels wide and
7,982 pixels high. Think about how
these figures compare to the size of
the earth and then what that means
for the size/area of each pixel.

Then change the Scale to 50 and


change the light settings! Then try to
match the settings I have pasted on
this page . The settings not shown
remain at their default values. Don’t
worry if your computer takes a while
to apply these. The ground colour I
used was #5f88d5 (a nice blue).

This data comes from the Global


Human Settlement Layer project of
the European Commission.

The data on world population density comes in


two different map projections – the one you are
using here is the EPSG 54009 one – i.e. World
Mollweide. This is an equal area projection (unlike
WGS84) but as you can see, you get more
distortion than you might want.

Notes

20
An Introduction to Aerialod automaticknowledge

This little thumbnail image  is more or


less what you get if you apply the
settings I used above (I’ve lightened it
for printing purposes here though).

Once you get something looking just how you like it, you can
save screenshots of the settings. This is not ideal, but
considering how great Aerialod is, I think it’s a small price to pay.

We’re going to move on now, so if you want to recreate the


world image above then just save the settings you have.

If you want a more full-blown tutorial on how to create a


population density map of any country in the world, using a
similar dataset, then see my earlier blog post on the topic.

http://www.statsmapsnpix.com/2020/11/how-to-make-3d-
population-density.html

Remember this
When you’re working with population, just remember that it’s different.
Unlike elevation data, which typically only has individual pixel values into
the hundreds or thousands (e.g. 8,848m for Mount Everest), population
values for single cells can be in the tens of thousands, and even more than
100,000. This can cause problems in Aerialod, so I often scale the data first
– for example in QGIS, as in the blog link above.

Notes

21
An Introduction to Aerialod automaticknowledge

6. Turntable – for creating frames for animation


Okay, let’s look at how we might animate a view in Aerialod. This
is what the Turntable export options do. Follow these steps
(we’re making the image small for this experiment so that it
doesn’t run too slowly). Use the default Aerialod 16x16 pixel
model data and make sure Atmospheric Scattering is turned off
and you don’t have any fancy effects on.

 Image Size of 320 x 180.


 Samples Per Pixel of 512 (the minimum).
 Go to Export and then with Turntable selected we want 10
Frames, 90 for Angle and 0 for Blur.
 Then we can hit Render and choose a folder to save it to.

You should now see a series of individual frames. If you open


your file browser and flick back and forth, you’ll get a kind of
animation effect. If you want to turn these frames into a gif or an
mp4, you can do so with tools like ffmpeg, ImageMagick (both
command-line) or GIMP.

Here’s a little example (below) I made using dimensions of


320x180 and 90 frames turning 90 degrees and then back – and
looping forever back and forth 90 degrees.

https://automaticknowledge.org/training/data/animation/mod
el-30fps.gif

More complex scenes can take a long time to render.

Notes

22
An Introduction to Aerialod automaticknowledge

7. Other experiments
In the examples above, we used the built in model data in
Aerialod, the Scotland digital terrain model, the Manchester lidar
data and the GHSL global population density layer.

If you look in the /raster folder you will also find some variations
of these datasets, plus one other, as follows.

 A Manchester lidar layer with border and text round it. You
can open this in the browser to see it, and even make your
own version with your own text, using the blank border
version I also provided. See the file names that end in
_border… here.

 Try downloading lds-tile-sd-GTiff.zip and then unzip and


load into Aerialod. Perhaps your computer will not be able
to handle it, but if it does you’ll see some lovely 8m
resolution New Zealand terrain data. You will have to adjust
the Z factor though. Can you figure out what the correct
value of Z should be here? (hint: it’s 0.125, but why?)

 Another great source of terrain data, from 1 March 2021 is


swisstopo:
shop.swisstopo.admin.ch/en/products/free_geodata

 Try making a simple chart in Excel or something else and


then saving it as an image and dragging it into Aerialod.

Notes

23
An Introduction to Aerialod automaticknowledge

8. Credits

Aerialod An interactive path tracing renderer for height maps, and a truly
great piece of software.
https://ephtracy.github.io/index.html?page=aerialod

Environment Agency Lidar data, available under the Open Government


Licence, v3.0.
https://environment.data.gov.uk/DefraDataDownload/?Mode=survey

GHSL - Global Human Settlement Layer Global population density data


(GHS-POP R2019A), produced by the European Commission.
https://ghsl.jrc.ec.europa.eu/ghs_pop2019.php

Dataset
Schiavina, Marcello; Freire, Sergio; MacManus, Kytt (2019): GHS population grid
multitemporal (1975, 1990, 2000, 2015) R2019A. European Commission, Joint
Research Centre (JRC) DOI: 10.2905/42E8BE89-54FF-464E-BE7B-BF9E64DA5218 PID:
http://data.europa.eu/89h/0c6b9751-a71f-4062-830b-43c9f432370f

Concept & Methodology


Freire, Sergio; MacManus, Kytt; Pesaresi, Martino; Doxsey-Whitfield, Erin; Mills, Jane
(2016): Development of new open and free multi-temporal global population grids
at 250 m resolution. Geospatial Data in a Changing World; Association of
Geographic Information Laboratories in Europe (AGILE). AGILE 2016.

Scotland DTM (50m resolution) created using Ordnance Survey open data
(their Terrain 50 product), and compiled by Automatic Knowledge Ltd.
https://automaticknowledge.co.uk/resources/

Emojis are from Twemoji, at twemoji.twitter.com, licenced under the CC-BY


4.0 licence.
https://twemoji.twitter.com/

Notes

24

You might also like