an analytical approach for simulating aerial...

26
AN ANALYTICAL APPROACH FOR SIMULATING AERIAL PERSPECTIVE EFFECTS ON DISTANT OBJECTS IRWANDI HIPNI MOHAMAD HIPINY A thesis submitted in fulfilment of the requirements for the award of the degree of Master of Science (Computer Science) Faculty of Computer Science and Information System Universiti Teknologi Malaysia OCTOBER 2006

Upload: buihuong

Post on 24-May-2019

213 views

Category:

Documents


0 download

TRANSCRIPT

AN ANALYTICAL APPROACH FOR SIMULATING AERIAL PERSPECTIVE

EFFECTS ON DISTANT OBJECTS

IRWANDI HIPNI MOHAMAD HIPINY

A thesis submitted in fulfilment of the

requirements for the award of the degree of

Master of Science (Computer Science)

Faculty of Computer Science and Information System

Universiti Teknologi Malaysia

OCTOBER 2006

iii

To

my wife, hamimahujir &

my mom, juliadolhassan

iv

ACKNOWLEDGEMENT

Thanks to ALLAH S.W.T. for giving me His blessings in the form of true

friends who help me throughout this eventful yet wonderful journey. Only God

Himself can ever repay your benevolent act of kindness. Thank you to my

supervisors: Associate Prof. Safie Mat Yatim and Nor Azam Md. Sherrif; my

mentor: Associate Prof. Sarudin Kari; my lecturers: Associate Prof. Daut Daman,

Nik Isrozaidi Nik Ismail and Mohd Shafry Mohd Rahim; my associates in UTM:

Muhamad Najib Zamri, Rio Affendi, Hasbullah Anthony Hasbi, Asyraf Khairuddin,

Mohd. Hafiz Ahmad Tajudin, Asrulakmar Mohd Yusof, Loh Mun San, Lee Kong

Weng, Baldeve Paunoo, Saandilian Devadas, Tan Kim Heok, Adlur Rahman Ali

Omar, Mohd. Amri Bakri; my mom: Julia Dolhassan, and my three sisters. Last but

not least, a big thank you to my wife, Hamimah Ujir, for putting up with me

throughout this wonderful two years of my life; the frequent help with grammatical

error and format revision as well as the occasional financial support! Again, thank

you all from the bottom of my heart.

v

ABSTRACT

Aerial perspective effects are an integral part of a virtual application for

outdoor simulation. These effects are modelled using the light transfer equation;

borrowed from the field of physics. Typically, these applications make do with a

watered-down version of the equation since the physically correct version requires

heavy nested loops and complex optical depth estimation. The normal practice is to

assume the atmosphere’s density as constant to allow the usage of distance between

points as optical depth. However, this move causes failure in capturing the

darkening effect of sky area approaching zenith, due to density fluctuations as the

altitude increases. An analytical-based approach is proposed here to solve the above

problem. A look-up table containing five-parameter coefficients of a chosen

parametric luminance function was prepared in advance as a function of altitude,

turbidity and Sun position. During the real-time visualization, a single rendering

equation is used to determine each vertex’s display colour. Adding the initial colour

value of the current vertex to its atmosphere-contributed colour value solves the

equation. The atmosphere-contributed colour is obtained by an exponential

interpolation of five separate colour values. Each value represents the colour of the

intersected sky patch at each reference layer. The intersected sky patch is found by

finding which sky patch coordinate solves the vector equation of a line passing

through the camera’s point and the current vertex’s point. By referring to the look-

up table, these five colour values are computed using the chosen parametric

luminance function. This approach was implemented using the Cg Language as a

vertex shader. Test results have shown that the proposed approach is able to produce

visually correct daylight sky colour distributions at any altitude within the 30km

range.

vi

ABSTRAK

Kesan perspektif udara merupakan komponen utama bagi sesebuah aplikasi

maya untuk simulasi persekitaran luar. Kesan-kesan ini dimodelkan dengan

persamaan pemindahan cahaya yang dipinjam dari bidang fizik. Kebiasaannya,

aplikasi-aplikasi sebegini hanya mengimplementasikan versi ringkas persamaan

tersebut memandangkan versi asal dibebani oleh gegelung bersarang pelbagai lapisan

serta pengiraan kedalaman optik yang rumit. Lazimnya, ketumpatan udara dianggap

malar supaya parameter kedalaman optik boleh diganti dengan nilai jarak di antara

dua titik. Walau bagaimanapun, langkah ini menyebabkan tiada kesan penggelapan

di kawasan langit yang menghampiri zenit, berpunca dari perubahan aras ketumpatan

udara semasa kenaikan paras altitud. Satu pendekatan berasaskan analitikal

dicadangkan sebagai langkah penyelesaian untuk permasalahan tersebut. Sebuah

jadual rujukan yang mengandungi nilai lima parameter bagi satu persamaan luminans

berparameter terpilih disediakan lebih awal. Ianya dirujuk berdasarkan nilai altitud,

aras kekeruhan langit serta posisi matahari. Semasa visualisasi masa nyata, satu

persamaan tunggal digunakan untuk mengira warna paparan bagi setiap vertek.

Persamaan ini diselesaikan menerusi operasi penambahan nilai warna asal vertek

semasa dengan nilai warna sumbangan atmosfera. Nilai warna sumbangan atmosfera

dikira dengan rumus interpolasi secara eksponen terhadap lima nilai warna berbeza.

Setiap nilai mewakili warna bagi petak langit bersilang di setiap lapisan rujukan.

Petak langit bersilang diperolehi dengan mencari koordinat petak langit yang berjaya

menyelesaikan persamaan vektor untuk garisan yang melalui titik kamera dan titik

vertek semasa. Kelima-lima nilai warna tadi dikira menerusi persamaan luminans

berparameter terpilih dengan merujuk kepada jadual rujukan. Dengan menggunakan

bahasa pengaturcaraan Cg, pendekatan ini diimplementasi sebagai aturcara

pembayang vertek. Hasil-hasil ujian membuktikan keupayaan pendekatan ini dalam

menghasilkan kepelbagaian taburan warna langit di waktu siang yang tepat dari segi

visual, sehingga paras altitud 30km.

vii

TABLE OF CONTENTS

CHAPTER TITLE PAGE

TITLE PAGE i

DECLARATION OF ORIGINALITY AND

EXCLUSIVENESS

ii

DEDICATION iii

ACKNOWLEDGEMENT iv

ABSTRACT v

ABSTRAK vi

TABLE OF CONTENTS vii

LIST OF TABLES xi

LIST OF FIGURES xii

LIST OF EQUATIONS xiv

LIST OF ABBREVIATIONS xvi

LIST OF APPENDICES xvii

1 INTRODUCTION

1.1 Introduction 1

1.2 Research Background 2

1.3 Current Issues 4

1.3.1 Speed Versus Physical Accuracy 4

1.3.2 Solving Out-of-Gamut Colour 4

1.3.3 Transferring the Computational Burden to GPU 5

viii

1.4 Problem Statement 6

1.5 Goal 7

1.6 Research Objectives 7

1.7 Research Scopes 8

1.8 Research Contributions 8

1.9 Organization of Thesis 9

2 LITERATURE REVIEW

2.1 Introduction 11

2.2 Previous Works 11

2.2.1 Simulation-Based Methods 11

2.2.2 Analytical-Based Methods 13

2.2.3 Aerial Perspective-Based Methods 16

3 METHODOLOGY

3.1 Introduction 19

3.2 Summary of Previous Methods 20

3.2.1 LTE-Based Model Versus Analytical

Luminance Model

21

3.2.2

Increasing Altitude Effect Towards the Daylight

Sky Colour

21

3.2.3 Discussion 22

3.3 Requirement Specification 22

3.4 The Methodology of the Proposed Method 24

3.4.1 Synthetic Data Preparation 24

3.4.1.1 Atmospheric Profiling Task 25

3.4.1.2 Reference Altitudes 26

3.4.1.3 All-Sky Colour Distribution Maps 27

3.4.2 APACC Model 27

3.4.2.1 Colour Interpolation Scheme 28

ix

3.4.3 Improvised Single Aerial Perspective Rendering

Algorithm

28

3.4.3.1 Sky Patch Association Test 31

3.4.3.2 Distance-Based Transparency Model 32

3.5 Conclusion 32

4 IMPLEMENTATION

4.1 Introduction 33

4.2 Pre-Processing Module 33

Atmospheric Profiling Task 33 4.2.1

4.2.1.1 Identifying the Reference Altitudes 38

4.2.2 Preparing the All-Sky Colour Distribution Maps

at Each Reference Altitude

38

4.2.2.1 Luminance to XYZ 39

4.2.2.2 XYZ to Yxy 39

4.2.3 Developing the APACC Model 40

4.3 Run-Time Processing Module 40

4.3.1 Developing an Improvised Single Aerial

Perspective Rendering Algorithm

40

4.3.1.1 Developing the Sky Patch’s

Association Test

41

4.3.1.2

Developing the Sky Patch’s Colour

Interpolation Scheme

42

4.3.1.3 Developing the Distance-Based

Transparency Model

42

RESULTS AND ANALYSIS

5.1 Introduction 43

5.2 System Specification 43

5

5.3 Atmospheric Profiling Task Results 44

5.4 APACC Model Results 45

x

5.4.1

Daylight Sky Colour as Observed at Ground-

Level

45

5.4.2 Daylight Sky Colour Observed at Varying

Turbidity

46

5.4.3 Daylight Sky Colour Observed at High Altitude 47

5.5 Improvised Single Aerial Perspective Rendering

Equation Results

48

5.5.1 Due to the Distance 48

5.5.2 Due to the Angular Angle From the Sun 49

5.6 Analysis 49

5.6.1 Visual-Correctness of the Rendered Results 49

6 CONCLUSION

6.1 Introduction 52

6.2 Summary of the Proposed Method 52

6.3 Drawbacks and Future Suggestions 54

BIBLIOGRAPHY 56

APPENDIX A 61

APPENDIX B 64

APPENDIX C 67

APPENDIX D 70

APPENDIX E 73

APPENDIX F 74

APPENDIX G 75

APPENDIX H 78

xi

LIST OF TABLES

TABLE NO. TITLE PAGE

3.1 LTE-based model versus analytical luminance

model

21

5.1 Hardware specifications 43

5.2 Software specifications 44

5.3 Vertical profile and effective path length, at each

reference altitude

44

xii

LIST OF FIGURES

FIGURE NO. TITLE PAGE

1.1 Aerial-perspective effects in action 1

2.1 Klassen’s fog model 12

2.2 Nishita et al’s cylindrical coordinates system. 12

3.1 Sky patch, as a function of zenith and azimuth 20

3.2 Semantic diagram of the proposed method 24

3.3 Sky colour distribution map 27

3.4 Single scattering of sunlight in the Earth’s

atmosphere

29

3.5 Attenuation of distant objects by atmospheric

scattering

30

4.1 Research framework 34

4.2 Vertical profiles and effective path lengths plotted

against altitude, with an increment of 2km

35-36

4.3 Pseudo code for preparing the all-sky colour

distribution maps

38

4.4 Pseudo code for spectra (luminance) to XYZ 39

4.5 Pseudo code for XYZ to Yxy 40

4.6 Pseudo code for the sky patch association test 41

4.7 Pseudo code for the sky patch colour interpolation 42

5.1 Rendered sky images as the Sun’s zenith angle

declines, approaching sunset.

46

5.2 Rendered sky images at similar Sun position but

with different turbidity values

47

xiii

5.3 Rendered versus actual images of the daylight sky

at ascending altitudes

47

5.4 Aerial perspective effects due to the distance 48

5.5 Aerial perspective effects due to the angular angle

from the Sun

48

5.6 Visual comparison between high-altitude sky

images, rendered using Hoffman and Preetham’s

method, Nielsen’s method and the proposed

method

50

xiv

LIST OF EQUATIONS

EQUATIONS NO. TITLE PAGE

2.1 Kittler’s clear sky luminance formula 13

2.2 Moon and Spencer’s overcast sky luminance

distribution model

13

2.3 Perez et al’s five-parameter model 14

2.4 Perez et al’s luminance formula 14

2.5 Preetham et al’s luminance-Y distribution function

coefficients

15

2.6 Preetham et al’s chromaticity-x distribution

function coefficients

15

2.7 Preetham et al’s chromaticity-y distribution

function coefficients

15

2.8 Preetham et al’s chromaticity-x formula 15

2.9 Preetham et al’s chromaticity-y formula 15

2.10 Hoffman and Preetham’s single aerial perspective

rendering equation

16

2.11 Hoffman and Preetham’s extinction coefficient

formula

16

2.12 Hoffman and Preetham’s in scattering component

formula

16

2.13 Rayleigh total scattering constant 17

2.14 Mie total scattering constant 17

2.15 Nielsen’s modified Rayleigh scattering phase

function

18

2.16 Nielsen’s new ( )sFex

formulation 18

xv

3.1 Integral of the light scattering equation for each

point P along the path: camera to sky patch

29

3.2 Integral of the light scattering equation for each

point P along the path: camera to distant object

30

3.3 The proposed method’s version of equation (3.2) 31

3.4 Vector formed between two points in 3D space 31

3.5 Line equation 31

4.1 Gueymard’s effective ozone temperature

correlation function

36

4.2 Relative humidity formula 37

4.3 Saturation vapour pressure formula 37

4.4 Actual vapour pressure formula 37

4.5 Gueymard’s O2 and CO2 scale heights function 37

4.6 Gueymard’s correction factor, Ct 37

4.7 Gueymard’s incremental precipitable water

formula

38

4.8 The improvised single aerial-perspective rendering

equation, based on the Beer’s Law

41

4.9 The proposed distance-based transparency model 42

xvi

LIST OF ABBREVIATIONS

ABBREVIATION DESCRIPTION

2D - Two-dimensional

3D - Three-dimensional

ABCDE - Perez et al’s (1993) five-parameter coefficients

APACC - Analytical parametric atmosphere-contributed colour

BRDF - Bidirectional reflectance distribution function

CIE - International Commission of Illumination

COESA - Committee on Extension to the Standard Atmosphere

CPU - Central processing unit

CRT - Cathode ray tube

fps - Frames per second

GPU

HDR

-

-

Graphical processing unit

High Dynamic Range

IDMP - International Daylight Measurement Program

LTE - Light transfer equation

RGB - Additive colour (red, green and blue)

SMARTS2 - Simple Model for the Atmospheric Radiative Transfer

of Sunshine

SPCTRL2 - Simple Solar Spectral Model for Direct and Diffuse

Irradiance on Horizontal and Tilted Planes at the

Earth's Surface for Cloudless Atmospheres

SPD - Spectral power distribution

XYZ - A set of tristimulus values (X, Y and Z), derived from

the CIE 1931 colour matching experiment

Yxy - Luminance Y, chromaticity x and chromaticity y

xvii

LIST OF APPENDICES

APPENDIX TITLE PAGE

A The five-parameter coefficients look-up table for

luminance (Y), as a function of Sun angles,

turbidity and altitude.

61

B The five-parameter coefficients look-up table for

chromaticity (x), as a function of Sun angles,

turbidity and altitude.

64

C The five-parameter coefficients look-up table for

chromaticity (y), as a function of Sun angles,

turbidity and altitude.

67

D The zenith’s Yxy coefficients look-up table, as a

function of Sun angles, turbidity and altitude

70

E Geometrical parameters of the solar trajectory 73

F Density plotted against altitude, between the US

Standard Atmosphere (McCartney, 1976) and a

simple exponential model

74

G RGB-colour from spectral distribution 85

H Frame-per-second (fps) result 78

CHAPTER 1

INTRODUCTION 1.1 Introduction

The task of rendering an object seen through the Earth’s atmosphere is of far

greater importance nowadays, due to the surge of interest in using interactive virtual

landscape in areas such as computer gaming, military, tourism et cetera (VTP, 2005).

An object’s rendered colour is what gives it a sense of scale and distance. Flight

simulator is an example of such application; enabling the pilot to traverse the vast

virtual sky without any constraints.

Figure 1.1 Aerial perspective effects in action (Nielsen, 2003). Notice the

darkening of sky area closer to zenith as the altitude increases.

This altitude-flexible navigation requires the parameter ensuing effects

towards the daylight sky colour to be captured correctly; a feature typically missing

from the current batch of aerial perspective rendering methods (Nielsen, 2003). In

2

addition, the increasing contents and details of such virtual landscape in today

applications require the aerial perspective rendering problem to have a lesser priority

in the system resources allotment (Nielsen, 2003). Present methods were based on a

taxing real-time solving of the light transfer equation (LTE), thus forced to employ

an inferior light attenuation model and restricts the light attenuation calculation at

trichromatic wavelengths only. Subsequently, the colour precision of the final

rendered scene will askew slightly.

Johnson and Fairchild reported in their findings (1999) that the usage of a

trichromatic value instead of a full-spectral representation of colour causes large

colour shifts. The light attenuation processes, namely: i) in-scattering, ii) out-

scattering and iii) absorption are important phases as they solely determine the

arriving spectral colour at the end of the viewing path. To lose valuable colour

information here is simply disastrous. Minnaert, in his famous book on the light

physics through the Earth’s atmosphere (1954), noted that ozone absorption is the

key reason why the zenith sky remains blue during low Sun altitudes. Present aerial

perspective rendering methods (Hoffman and Preetham, 2002; Nielsen, 2003)

excluded absorption from their light attenuation model. They justified the exclusion

based on the claim by Haltrin (1996) which states that the absorption of the visible

light is negligible except for the ozone layer. For this reason, layers below the ozone

layer can be treated as a full scattering-only medium. The exclusion is not entirely

surprising since these works are more ontogenetic-based than teleological; the two

polar extremes on modelling approach (Barr, 1991).

1.2 Research Background

In the past, real-time rendering of outdoor scenes has primarily dealt with the

problem of increasing the geometric detail of visible terrain (Nielsen, 2003). The

problem of sky dome visualization and aerial perspective rendering usually took the

backseat. Rudimentary methods such as texture mapping and vertex colour

interpolation scheme were commonly used to provide the impression of the daylight

3

sky. Meanwhile, aerial perspective effects on distant objects were faked using

simple range-based fog.

Scientific improvements were then made, as witnessed in works on analytical

sky luminance model (Moon and Spencer, 1942; Kittler, 1967; Perez et al, 1993;

Preetham et al, 1999). These models were based on fits of actual data except for

Preetham et al’s (1999), which employed simulated data. Examples of such actual

sky luminance measurement are (LBL, 1986; Lam, 1996; Lau, 1999). These

measurements were taken at a unique site for at least a year. The scarcity of such

mature actual data forced researchers to use synthetic data instead. Existing solar

spectral models such as SMARTS2 (Gueymard, 1995) and SPCTRL2 (Bird and

Riordan, 1986) are able to approximate a sky radiance/luminance/colour distribution

map on a given set of inputs. Nevertheless, the existing framework design of a sky

luminance model can only provide the sky dome’s colour (viewing paths with

infinite length); not for a viewing path that is intersected by an object.

Early aerial perspective rendering methods such as Hoffman and Preetham

(2002), and Dobashi et al (2002) overcame the above shortcoming of sky luminance

models. Since the daylight sky colour distribution and aerial perspective effects on

distant objects are both caused by the exact same process: the travelling light

interactions with the Earth’s atmosphere, the two phenomenons can therefore be

simulated using a single equation as a function of the optical depth. The above

methods were based on the numerical solution of the light transfer equation (LTE); a

term discussed thoroughly in Sloup (2002). Since the LTE is evaluated in real-time

for an arbitrary viewing path, any variations on its: i) optical depth and ii) angular

angle from the Sun will be reflected back into its spectral colour result. This feature

is unavailable in a sky luminance model whereas the two attributes are fixed.

Conversion issues of spectra to a displayable value unit are govern by the

International Commission of Illumination, abbreviated from its French title:

Commission Internationale de l’Eclairage, (CIE). See Poynton (1995) for further

reading on this matter.

4

All of the above methods, bar Nielsen’s (2003), hold an incorrect assumption

that the Earth’s atmosphere density is constant. A daylight sky dome colour

distribution is the same regardless of the observer’s current altitude. This assumption

would not provide a realistic result in a flight simulator application, in which the

observer’s altitude has a significant role to play. Nielsen (2003) extended Hoffman

and Preetham’s (2002) model to consider the increasing altitude effect towards the

daylight sky colour distribution, yet his solution is far from physically-correct.

Various crude simplifications were implemented in Nielsen’s (2003) model, in order

to maintain the interactive frame rates.

1.3 Current Issues

1.3.1 Speed vs. Physical Accuracy

Present aerial perspective rendering methods were burdened by the weight of

the real-time solving of the LTE. This trade-off between speed and physical-

accuracy always results to the reduction of the latter. As mentioned before, these

methods were forced: i) to restrict the light attenuation calculation at trichromatic

wavelengths (RGB) and ii) to use an inferior light attenuation model. These

simplifications were made to maintain the interactive frame rates at an acceptable

level. Musgrave (1993) discussed this dilemma in detail in his thesis. He stressed

that the priority must be given to speed due to the application of the developed model

in a real-time domain. Applications such as a flight simulator need only to convince

user of the simulated scene’s visual realism; regardless of the method used in

achieving it.

1.3.2 Solving the Out-of-Gamut Colour Problem

Tone mapping is a computer graphics technique used to approximate the

appearance of high dynamic range images in media with a more limited dynamic

5

range. Essentially, tone mapping addresses the problem of strong contrast reduction

from the scene radiance values to the displayable range while preserving the image

details and color appearance important to appreciate the original scene content. This

problem, termed as an out-of-gamut colour, typically arisen after conversion between

colour spaces. Examples of tone mapping techniques are (Fattal et al, 2002) and

(Mantiuk et al, 2005).

An interesting approach to tone mapping of High Dynamic Range (HDR)

images is inspired by a theory proposed by Gilchrist et al (1999). Their theory

comprehensively explains many characteristics of the human visual system such as

lightness constancy and its spectacular failures, which are important in the perception

of images. The key concept of this tone mapping method (Krawczyk et al, 2005) is a

decomposition of an HDR image into frameworks of consistent illumination and the

local calculation of the lightness values. The net lightness of an image is calculated

by merging of the frameworks proportionally to their strength. Particularly

important is the anchoring: relating the luminance values to a known brightness

value, namely estimating which luminance value is perceived as white in the scene.

This approach to tone mapping does not affect the local contrast and preserves the

natural colors of an HDR image due to the linear handling of luminance.

Researchers are now actively pursuing techniques to transfer High Dynamic Range

(HDR) imagery to real-time applications (Durand and Dorsey, 2000; Goodnight et al,

2003).

1.3.3 Transferring the Computational Burden to GPU

Recent works have begun investigating the use of modern shader technology

for simulating atmospheric scattering effects (Dobashi et al, 2002; Hoffman and

Preetham, 2002). A shader is a computer program used in 3D computer graphics to

determine the final surface properties of an object or image. This often includes

arbitrarily complex descriptions of light absorption, diffusion, texture mapping,

reflection, refraction, shadowing, surface displacement and post-processing effects.

6

By design, shaders are ideal candidates for parallel execution by multiple graphic

processors, which are usually located on a video card, allowing for scalable

multiprocessing and lessening the burden on the CPU for rendering scenes.

There are two different applications of shaders in real-time shading

languages: i) vertex shader and ii) pixel shader. Vertex shaders are applied for each

vertex and run on a programmable vertex processor. Pixel shaders are used to

compute properties which, most of the time, are recognized as pixel colors. Pixel

shaders are applied for each pixel as opposed to each vertex. They are run on a pixel

processor, which usually features much more processing power than its vertex-

oriented counterpart.

1.4 Problem Statement

The first problem faced by the previous works in this area is the missing

darkening effect on sky area closer to zenith as the altitude increases. Analytical sky

luminance models such as (Moon and Spencer, 1942; Kittler, 1967; Perez et al, 1993;

Preetham et al, 1999) were all fitted from the daylight sky luminance distribution

data measured/simulated at ground level. As the result, these models are unable to

simulate the above effect at all. Aerial perspective rendering methods such as

(Hoffman and Preetham, 2002; Dobashi et al, 2002) assumed that the observer is

always positioned on the ground. They do not simulate the changes in colour and

intensity that appear as the altitude increases rapidly. This allows them to use the

distance between two points (observer and object) directly as the optical depth. This

shortcut would not work in a flight simulator application, as the optical depth

depends on both the viewing path’s length and the average density of the penetrated

atmosphere. As expected, this shortcut will also create problem latter when dealing

with terrain that contains significant differences in height. One immediate solution

that springs to mind is to use an analytical sky luminance model. Since the all-sky

luminance distribution maps are prepared offline before being fitted to a single

parametric equation, the process of obtaining them can therefore be as precise as can

be. Retrieving these luminance values will only require minimal computational cost.

7

Sky luminance distribution at any altitude can theoretically be simulated using any of

the existing solar spectral models. This statement holds true if the required

atmospheric parameters at that particular layer of the atmosphere are available.

However, as being mentioned earlier, a sky luminance model can only provide the

sky dome’s colour. There is no built-in mechanism for rendering aerial perspective

effects on distant objects. This conundrum presents the second problem that needs to

be solved here.

1.5 Goal

The main goal of this research is to develop an improvised single aerial

perspective rendering algorithm. Rather than recalculating the LTE of all of the

viewing paths each time the scene is updated, the algorithm uses an analytical model

instead. The algorithm must be able to render both daylight sky and distant objects,

as seen through the Earth’s atmosphere from varying altitudes.

1.6 Research Objectives

(i) To construct a general Earth’s atmospheric profile up to 30km; where

it will be use together with a chosen solar spectral model to generate

the all-sky colour distribution maps at each reference altitudes.

(ii) To develop an analytical parametric atmosphere-colour contribution

(APACC) model based on fits of the earlier simulated maps.

(iii) To integrate the APACC model in a single aerial perspective

rendering equation. This is done by developing necessary algorithms

that will facilitate the improvised algorithm in rendering aerial

perspective effects on distant objects.

8

1.7 Research Scopes

(i) The term “general Earth’s atmosphere” is used here to represent a

generic atmospheric profile that did not represent any specific site on

Earth. The atmospheric constituents’ measurements used during the

profiling task were obtained from various sites that differ

geographically; selected merely on availability basis.

(ii) The proposed method is only concerned on simulating the aerial

perspective effects on both sky dome and distant objects under a clear

(zero cloud presence) daylight (from sunrise to sunset) sky.

(iii) Other atmospheric effects such as rainbows, mirages, halos et cetera

are not simulated.

(iv) The actual Sun will not be rendered onto the scene.

(v) A stripped-down version of a flight-simulator application, without the

unnecessary bells and whistles, was built as the test bed.

(vi) In the prototype application, i) a 2D orthographic sky dome is used

instead of a 3D hemispherical version, ii) no actual terrain will be

rendered as distant objects are represented by two 3D boxes, iii) the

Sun position and turbidity are preset before each demo run, iv) the

camera (observer) can only moves on its y-axis (altitude), and v)

transparency is replicated by positioning the two boxes at different

distances from the camera.

1.8 Research Contributions

This research contributes to the following aspects:

(i) By using an analytical model to replace the traditional real-time

solving of the light transfer equation, the cost of determining the

arriving spectral colour at the end of each arbitrary viewing path in

the rendered scene is reduced significantly.

9

(ii) By treating the Earth’s atmosphere density as an exponential function

of altitude, the sky colour distribution effects exhibited when

observed at high altitudes can be captured correctly.

(iii) By packaging the proposed method in a single rendering equation

form, it can easily be implemented in a modern real-time graphical

rendering pipeline, either as a vertex or pixel shader, thus unloading a

huge amount of workloads from the CPU to the GPU.

This work is considered as an applied research, hence benefiting the

following areas:

(i) Computer games – A computationally-efficient method will enable

low-end computers to render the aerial perspective effects at an

acceptable interactive frame rates. Flight simulator game reaps the

most benefits.

(ii) Military/airline industry – Help familiarize beginner pilot with the

various daylight sky conditions (turbidity level and time setting) as

expected to be observed in the real world. Aerial perspective effects

assist pilot to judge both scale and distance properly.

(iii) Tourism – Virtual tourism via the “fly-through” method.

1.9 Organization of Thesis

This thesis contains six chapters as follows:

Chapter 1 briefly introduces the topic of aerial perspective effects computer

modelling and its related research backgrounds. The problem statements are defined

next. Goal, objectives and scopes of research are then stated clearly and concisely.

Research contributions are also listed and elaborated.

Chapter 2 conducts a literature review on all three given research objectives.

This chapter covers the topic of: i) atmospheric profiling and the preparation of the

10

all-sky colour distribution maps, ii) analytical luminance models, and iii) real-time

aerial perspective rendering methods.

Chapter 3 presents the research methodology. Every algorithm that were

used to accomplish the research objectives are presented and justified here.

Chapter 4 reports on the implementation of the proposed methodology. The

methodology is designed to be implemented modularly by two phases: i) pre-

processing (offline) and ii) run-time processing (real-time). This chapter illustrates

the workflow of these modules using relevant pseudo codes and diagrams.

Chapter 5 shows the research results and their individual analysis. Properties

of the proposed method are then highlighted by comparing them with previous

methods’ results.

Chapter 6 summarizes and concludes this study. It also outlines the topics for

future work.