Dynamisk Visualisering Av Rymdvädersimuleringsdata Victor Sand
Total Page:16
File Type:pdf, Size:1020Kb
LiU-ITN-TEK-A-14/009-SE Dynamisk visualisering av rymdvädersimuleringsdata Victor Sand 2014-05-16 Department of Science and Technology Institutionen för teknik och naturvetenskap Linköping University Linköpings universitet nedewS ,gnipökrroN 47 106-ES 47 ,gnipökrroN nedewS 106 47 gnipökrroN LiU-ITN-TEK-A-14/009-SE Dynamisk visualisering av rymdvädersimuleringsdata Examensarbete utfört i Medieteknik vid Tekniska högskolan vid Linköpings universitet Victor Sand Handledare Alexander Bock Examinator Anders Ynnerman Norrköping 2014-05-16 Upphovsrätt Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare – under en längre tid från publiceringsdatum under förutsättning att inga extra- ordinära omständigheter uppstår. Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner, skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för ickekommersiell forskning och för undervisning. Överföring av upphovsrätten vid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av dokumentet kräver upphovsmannens medgivande. För att garantera äktheten, säkerheten och tillgängligheten finns det lösningar av teknisk och administrativ art. Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller i sådant sammanhang som är kränkande för upphovsmannens litterära eller konstnärliga anseende eller egenart. För ytterligare information om Linköping University Electronic Press se förlagets hemsida http://www.ep.liu.se/ Copyright The publishers will keep this document online on the Internet - or its possible replacement - for a considerable time from the date of publication barring exceptional circumstances. The online availability of the document implies a permanent permission for anyone to read, to download, to print out single copies for your own use and to use it unchanged for any non-commercial research and educational purpose. Subsequent transfers of copyright cannot revoke this permission. All other uses of the document are conditional on the consent of the copyright owner. The publisher has taken technical and administrative measures to assure authenticity, security and accessibility. According to intellectual property law the author has the right to be mentioned when his/her work is accessed as described above and to be protected against infringement. For additional information about the Linköping University Electronic Press and its procedures for publication and for assurance of document integrity, please refer to its WWW home page: http://www.ep.liu.se/ © Victor Sand Dynamic Visualization of Space Weather Data Victor Sand Civilingenj¨or Medieteknik Link¨oping University Master’s thesis Goddard Space Flight Center, Maryland, USA Norrk¨oping,Sweden June 2014 Abstract The work described in this thesis is part of the Open Space project, a collaboration between Link¨oping University, the National Aeronautics and Space Administration and the American Museum of Natural History. The long-term goal of Open Space is a multi-purpose, open-source scientific vi- sualization software. The thesis covers the research and implementation of a pipeline for prepar- ing and rendering volumetric data. The developed pipeline consists of three stages: A data formatting stage which takes data from various sources and prepares it for the rest of the pipeline, a pre-processing stage which builds a tree structure of of the raw data, and finally an interactive rendering stage which draws a volume using ray-casting. Large parts of the system are built around the use of a Time-Space Parti- tioning tree, originally described by Shen et al. This tree structure uses an error metric system and an octree-based structure to efficiently choose the appropriate level of detail during rendering. The data storage and structure are similar to the one in the GigaVoxels system by Crassin et al. Using a combination of these concepts and constructing the pipeline around them, space weather related volumes have been successfully rendered at interactive rates. The pipeline is a fully working proof-of-concept for future development of Open Space, and can be used as-is to render space weather data. Many concepts and ideas from this work can be utilized in the larger-scale software project. iv Acknowledgements First of all, I would like to thank my examinator, professor Anders Yn- nerman, for the fantastic opportunity and for keeping the project running. Thanks also to my excellent advisor Alexander Bock for many late hours of support and idea discussions. Your willingness to help and share your vast graphics knowledge has been truly invaluable. Thank you Masha for your tireless and dedicated work with CCMC and for taking care of us thesis students. Your genuine interest in the project is a requirement for its success! I’m sure the next couple of students will feel just as welcome. Thank you Carter for keeping us busy and for the great private tour of the museum. Bob, thank you for keeping an eye on the big picture! Aki, thanks for making my commute shorter, my lunches more tasty and my country music knowledge more solid. Nate, thanks for being a bro and thanks Avery for letting me sleep on your floor for a while. Come to Sweden and I’ll repay the favors! Thanks Martin for doing a great job during the first stage of the project and thereby making my job easier. Thanks to my many different roomates and friends in Washington D.C. for making my stay so much more than only work. I hope to see many of you again soon! Many thanks to Holmen AB, Sparbankstiftelsen Alfa and Stiftelsen Anna Whitlocks Minnesfond for the financial help when CSN wouldn’t lend me more money. I could have not completed my stay without it. Finally, thanks to my family for the endless support and encouragement! Victor Stockholm, February 2014 ii Contents 1 Introduction 1 1.1 Background . 1 1.2 Aim and Goals . 2 1.3 Method .................................... 2 1.4 Limitations . 2 1.5 ThesisStructure ............................... 3 2 Background 5 2.1 SpaceWeather ................................ 5 2.2 CommunityCoordinatedModelingCenter . 6 2.3 OpenSpace.................................. 6 3 Previous Work 9 3.1 VolumeRay-Casting ............................. 9 3.2 TSP Tree Acceleration . 11 Overview and Motivation . 11 Structure ................................... 11 Traversal ................................... 11 ErrorMetrics ................................. 13 3.3 Rendering of Large Voxel Datasets . 13 DataStructure ................................ 13 Rendering................................... 14 4 Pipeline Overview 15 4.1 PipelineStages ................................ 15 4.2 InputsandOutputs ............................. 16 iii CONTENTS 5 TSP Tree Implementation 17 5.1 Bricks ..................................... 17 5.2 Separation of Structure and Data . 17 5.3 Memory Layout . 18 5.4 ErrorMetrics ................................. 19 5.5 PointerStructure............................... 20 5.6 Traversal ................................... 20 6 Data Formatting 23 6.1 Space Weather Data Sources . 23 ENLIL..................................... 23 CDF Data Format . 23 Kameleon ................................... 24 6.2 Furnace .................................... 24 6.3 Voxel Data Format . 24 7 Data Pre-Processing 27 7.1 Forge . 27 7.2 TSPTreeConstruction ........................... 28 BrickPadding................................. 28 OctreeConstruction ............................. 29 BSTAssembling ............................... 29 7.3 TSP Data Format . 30 8 Rendering 31 8.1 Flare...................................... 31 8.2 TSP Structure and Error Metrics Construction . 32 TSPStructureConstruction. 32 Error Metrics Calculation . 32 ErrorCaching................................. 32 8.3 Intra-FramePipeline ............................. 33 View Ray Generation . 33 TSPTreeProbing .............................. 34 Brick Uploading . 35 iv CONTENTS Ray-Casting.................................. 36 8.4 Asynchronous Execution . 37 8.5 RenderingParameters ............................ 37 8.6 ClusterRendering .............................. 38 SGCT..................................... 38 9 Results 39 9.1 Hardware . 39 9.2 RenderingBenchmarks............................ 39 9.3 ErrorMetricsBenchmarks.......................... 39 9.4 VisualResults................................. 40 DesktopRendering.............................. 41 DomeRendering ............................... 41 10 Discussion and Future Work 45 10.1 Visual Quality . 45 Rendering................................... 45 10.2Interactivity.................................. 45 Performance.................................. 45 10.3Pipeline .................................... 46 Encapsulation . 46 10.4TSPTreeStructure ............................. 46 Construction ................................. 46 Storage . 46 10.5 Data Formats . 47 10.6ErrorMetrics ................................. 47 Calculation . 47 Control .................................... 48 10.7Rendering................................... 49 11 Conclusions 51 References 53 v CONTENTS A Code Samples 55 A.1 TSPTreeTraversal.............................. 55 A.2 BrickPadding................................. 62 A.3 OctreeConstruction ............................. 64 A.4 BSTAssembling ............................... 66 A.5 TSPTreeStructureConstruction. 69 A.6 ErrorMetrics ................................