Towards Optimal Decomposition Techniques for Ray Traced Terrain
Total Page:16
File Type:pdf, Size:1020Kb
Towards Optimal Decomposition Techniques For Ray Traced Terrain Visualisation Paul Francis Michell 0059502 MSc Computing Liverpool Hope University Plagiarism Declaration This page must be signed by the student, in the presence of the supervisor or award director. It must be bound in with the dissertation. By signing this page, the student is acknowledging that they have read and understood the statement. All sentences or passages in this dissertation from other people’s work have been specifically acknowledged by clear cross-referencing to author, work and page(s). Any and all other materials that are not the work of the author of this dissertation (for example, but not limited to, computer programs and code samples, illustrations, diagrams, collected data, audio and video material) are specifically acknowledged by clear reference to the source. I understand that failure to do this amounts to plagiarism and will be considered grounds for failure in this dissertation and in the degree examination as a whole. Name (Please use block capitals) Signature Date Witnessed by (supervisor or award director): Name (Please use block capitals) Signature Date i Acknowledgements Mr. T. Oliver, Forestry Commission North West, for supply of OS elevation data. USGS for making US digital elevation models publicly available. Dr. Mark Anderson for guidance and encouragement. ii Abstract Terrain rendering is a complex but well understood process, which has largely been restricted to scientific visualisations, computer games, film and video. However, a new audience is developing within the GIS user community. Here various 3D presentation techniques are being used with ever larger spatial datasets. Also, detailed elevation models are now becoming widely available, allowing spatially referenced information to be combined with actual ground topology. Ray tracing has been successfully used to render large outdoor scenes using realistic natural lighting. It has historically been viewed as a slow but high quality mechanism for 3D graphics, where a single image can typically take minutes, or sometimes hours, to generate. Where dynamic interaction with a 3D model is desired, an alternative method known as scan-line rasterisation is usually employed, often accelerated by graphics processing hardware. This technique for displaying terrain is by nature less realistic, but it is currently the only method employed by commercial GIS applications. As geo-spatial datasets increase in size the speed advantages of rasterisation diminish exponentially. This study investigates the suitability of ray tracing as a viable alternative to hardware rasterisation for visualising large scale terrain datasets and establishes the computing resources required to produce images at interactive display rates. Wherever possible, the higher quality output methods available to ray tracing are retained, which adds a qualitative dimension to the case for adopting this technique. Use of parallelism is explored and exploited to achieve interactivity on a single PC using a recently developed multi-core CPUs. A careful investigation is made of the domain and functional decompositions possible within the ray tracing paradigm. The results demonstrate that interactive display can be achieved on modern dual core CPUs at quarter VGA resolution. This is achieved without reliance on display hardware, or extensive pre-processing of the scene data. It also predicts from extrapolation of the results, that full DVD quality could be achieved using a typical office network of modern personal computers and that the performance will scale in a near linear manner with the number of available processors. iii Table of Contents Plagiarism Declaration.........................................................................................................................................i Acknowledgements.............................................................................................................................................ii Abstract..............................................................................................................................................................iii Abbreviations....................................................................................................................................................vii Chapter 1 Introduction.........................................................................................................................................................1 Project Aims...................................................................................................................................................4 Study Objectives.............................................................................................................................................4 Document Summary.......................................................................................................................................4 Chapter 2 Previous Research...............................................................................................................................................5 Ray Tracing's Origins.....................................................................................................................................5 Local Illumination Methods...........................................................................................................................5 Early Modern Ray Tracers.............................................................................................................................6 Parallel Ray Tracing.......................................................................................................................................7 GIS Terrain Data.............................................................................................................................................9 Terrain Rendering.........................................................................................................................................10 Atmospheric Shading Models......................................................................................................................11 Advanced Rendering Methods.....................................................................................................................12 Research Summary.......................................................................................................................................14 Chapter 3 Theoretical Framework.....................................................................................................................................15 Rendering Model..........................................................................................................................................15 The Local Illumination Equation............................................................................................................15 Ray Surface Interactions..........................................................................................................................18 Anti-aliasing Techniques.........................................................................................................................21 Water Rendering Model...............................................................................................................................22 Atmospheric Attenuation Model..................................................................................................................24 Terrain Grid Tracing Model.........................................................................................................................27 Parallelism Model.........................................................................................................................................27 Chapter 4 Methodology......................................................................................................................................................30 Development Environment..........................................................................................................................30 Parallelism Tools..........................................................................................................................................32 iv Development Process...................................................................................................................................32 Testing Procedure and Performance Analysis..............................................................................................33 Chapter 5 Findings.............................................................................................................................................................34 Thread Configuration Analysis....................................................................................................................34 Resolution Analysis......................................................................................................................................35 Terrain Size Analysis....................................................................................................................................35 Other Observations.......................................................................................................................................36 Chapter 6 Conclusion.........................................................................................................................................................37