High Performance Visualization Through Graphics Hardware and Integration Issues in an Electric Power Grid Computer-Aided-Design Application
Total Page:16
File Type:pdf, Size:1020Kb
UNIVERSITY OF A CORUÑA FACULTY OF INFORMATICS Department of Computer Science Ph.D. Thesis High performance visualization through graphics hardware and integration issues in an electric power grid Computer-Aided-Design application Author: Javier Novo Rodríguez Advisors: Elena Hernández Pereira Mariano Cabrero Canosa A Coruña, June, 2015 August 27, 2015 UNIVERSITY OF A CORUÑA FACULTY OF INFORMATICS Campus de Elviña s/n 15071 - A Coruña (Spain) Copyright notice: No part of this publication may be reproduced, stored in a re- trieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording and/or other- wise without the prior permission of the authors. Acknowledgements I would like to thank Gas Natural Fenosa, particularly Ignacio Manotas, for their long term commitment to the University of A Coru˜na. This research is a result of their funding during almost five years through which they carefully balanced business-driven objectives with the freedom to pursue more academic goals. I would also like to express my most profound gratitude to my thesis advisors, Elena Hern´andez and Mariano Cabrero. Elena has also done an incredible job being the lead coordinator of this collaboration between Gas Natural Fenosa and the University of A Coru˜na. I regard them as friends, just like my other colleagues at LIDIA, with whom I have spent so many great moments. Thank you all for that. Last but not least, I must also thank my family – to whom I owe everything – and friends. I have been unbelievably lucky to meet so many awesome people in my life; every single one of them is part of who I am and contributes to whatever I may achieve. Javier Novo Rodr´ıguez June, 2015 i ii Contents 1 Introduction 1 1.1 Power grids visualization . 1 1.2 Whattoexpectfromthisthesis. 2 1.3 Thesisoutline................................. 3 2 Electrical Distribution Power Grids 7 2.1 Theelectricutilitysystem . 7 2.2 Visualization in electrical engineering . ........ 10 2.3 Geographic and projected coordinate systems . ...... 12 2.4 Datasets employed in this work . 14 3 Polyline Simplification Using Spatial Databases 17 3.1 Data visualization collisions . 18 3.2 Cartographic generalization techniques . ....... 20 3.2.1 Conditions – when to generalize . 21 3.2.2 Techniques – how to generalize . 21 3.2.2.1 Selection . 22 3.2.2.2 Line simplification . 23 3.2.2.3 Merging........................... 23 3.3 Implementation................................ 25 3.4 Experimentationresults . 27 4 Graphics Cards Evolution 31 4.1 Origins..................................... 31 4.2 2Dacceleration ................................ 34 4.3 3Dacceleration ................................ 36 4.4 ProgrammableGPUs............................. 39 4.5 General Purpose GPUs and High Performance Computing . ..... 44 4.6 Non-discretegraphicscards . 46 5 3D Graphics Fundamentals 47 5.1 Three-dimensionalmodeling. 48 5.1.1 Polygonalmeshmodels . 49 iii 5.1.2 Parametricsurfaces . 50 5.2 Geometryprocessing............................. 52 5.3 Rasterization ................................. 55 5.4 Shading .................................... 56 5.4.1 Texturing ............................... 57 5.5 Framebufferoutput ............................. 59 5.6 Multi-passrendering . .. .. .. .. .. .. .. .. 59 6 Direct3D 11 Pipelines 61 6.1 HighLevelShadingLanguage . 62 6.1.1 Effects................................. 63 6.2 Graphicsrenderingpipeline . 63 6.2.1 InputAssembler ........................... 65 6.2.1.1 Configuration. 65 6.2.1.2 Data fetching . 68 6.2.1.3 Primitive assembly . 71 6.2.1.4 System-generated values attaching . 71 6.2.2 VertexShader............................. 72 6.2.3 Tessellation stages . 74 6.2.3.1 HullShader......................... 76 6.2.3.2 Tessellator . 78 6.2.3.3 DomainShader.. .. .. .. .. .. .. 78 6.2.4 GeometryShader........................... 80 6.2.5 StreamOutput ............................ 81 6.2.6 Rasterizer............................... 83 6.2.6.1 Multi-Sample Anti-Aliasing . 86 6.2.7 PixelShader ............................. 88 6.2.8 OutputMerger ............................ 89 6.3 Computeshaderpipeline. 91 6.4 Memoryresources .............................. 95 6.4.1 Buffers................................. 96 6.4.2 Textures................................ 97 6.4.3 Accessingresourcesfromshaders . 98 6.4.3.1 Unordered access resources . 99 6.4.4 Typelessresourcesandviews . 100 6.5 Configuration and execution examples . 101 6.5.1 Graphics pipeline example: drawing a triangle using lines . 101 6.5.1.1 Managing pipeline state using Effects . 107 iv 6.5.2 Compute pipeline example: matrix addition . 107 7 Dynamic Polyline Simplification On The GPU 111 7.1 Quadsgeneration............................... 111 7.1.1 Vertexshaders ............................ 113 7.1.2 Geometryshaders .. .. .. .. .. .. .. .. 115 7.2 StreamOutputstatisticssupport . 116 7.3 D3DXUtilityLibrary ............................ 119 7.3.1 Common GUI components . 120 7.4 GPU polyline simplification implementations . 121 7.4.1 Simplification algorithm . 122 7.4.2 Polyline simplification using the Compute pipeline . 123 7.4.2.1 Simplification . 123 7.4.2.2 Rendering ......................... 127 7.4.2.3 Graphical user interface . 129 7.4.3 Polyline simplification using the Geometry Shader stage . 130 7.4.3.1 Geometry shader instancing . 134 7.4.3.2 Graphical user interfaces . 135 7.4.4 Polyline simplification in the tessellation stages . ........ 138 7.4.4.1 Implementation . 138 7.4.4.2 Hull Shader simplification . 142 7.4.4.3 Compiled tessellation shaders reutilization . 148 7.4.4.4 Graphical user interface . 148 8 GPU Polyline Simplification Results 151 8.1 Renderingperformance. 151 8.1.1 Frameratecomparison. 153 8.1.2 Optimum number of tessellation and geometry shaders . 154 8.2 Memoryconsumption ............................ 158 8.2.1 Buffers................................. 159 8.2.2 Shaders ................................ 160 8.2.2.1 Compilation times . 164 8.3 Visualimpact................................. 164 8.4 Conclusions .................................. 166 9 Conclusions 169 9.1 Worksummary ................................ 169 9.2 Futurework.................................. 171 9.2.1 Coordinate system translation on the GPU . 171 v 9.2.2 Adoption of other visualization patterns . 172 9.2.3 Introduction of more complex visualizations . 172 9.2.4 Revision of the polyline simplification algorithm . 173 9.2.5 Migration to DirectX 12 . 173 9.3 Publications.................................. 175 I Patterns For Information Visualization 177 I.1 Referencemodel ............................... 178 I.2 Renderer.................................... 178 I.3 Camera .................................... 180 I.4 Proxytuple .................................. 180 I.5 Operator ................................... 180 I.6 Dynamicquerybinding ........................... 181 I.7 Scheduler ................................... 181 I.8 Cascadedtable ................................ 181 I.9 Otherpatterns ................................ 182 II DirectX Integration Into Windowed Applications 183 II.1 Introduction.................................. 183 II.2 Windows applications development . 184 II.3 Windows Vista graphics architecture . 186 II.3.1 TheWindowsDisplayDriverModel . 186 II.3.2 The Desktop Window Manager . 187 II.4 Direct3D integration with Windows Forms and WPF . 188 II.5 Direct3D integration in this work . 190 IIIResumen en espa˜nol 193 III.1Contextualizaci´on. 193 III.2Objetivosyactuaciones . 194 III.2.1 Generaci´on de l´ıneas con grosor mediante hardware........ 195 III.2.2 Simplificaci´on de las redes mediante bases de datos espaciales . 195 III.2.3 Simplificaci´on de las redes en la GPU . 197 III.3Estructura................................... 199 III.4Conclusiones ................................. 201 III.5Trabajofuturo ................................ 202 III.6Publicaciones ................................. 203 IV Resumo en galego 205 IV.1Contextualizaci´on. 205 vi IV.2 Obxectivos e actuaci´ons . 206 IV.2.1 Xeraci´on de li˜nas con grosor mediante hardware . 207 IV.2.2 Simplificaci´on das redes mediante bases de datos espaciais . 207 IV.2.3 Simplificaci´on das redes na GPU . 209 IV.3Estructura................................... 211 IV.4Conclusi´ons .................................. 213 IV.5Traballofuturo ................................ 213 IV.6Publicaci´ons.................................. 214 Bibliograf´ıa 217 vii viii List of figures 2.1 Theelectricutilitysystem. 9 2.2 Unitary-width lines visualization of a distribution power grid. 11 2.3 Universal Transverse Mercator zones. ..... 13 2.4 Rendered visualization for the different datasets. ........ 16 3.1 Visualization of the whole Galicia power grid. ....... 19 3.2 Comparison of generalized and non-generalized visualizations of a metropoli- tanarea..................................... 30 4.1 Abstract rendering engine of the Voodoo Graphics [19]. ........ 37 4.2 Migration of different graphics pipeline parts from the CPU to the GPU. 39 4.3 Architecture of the Nvidia GeForce 6800 [39]. ...... 41 4.4 Architecture of the Nvidia GeForce 6800 vertex processing units [39]. 42 4.5 Architecture of the Nvidia GeForce 6800 pixel processing units [39]. 42 4.6 Unified shader architecture of the Nvidia GeForce 8800 [43]........ 43 5.1 Asimplegraphicspipeline. 48 5.2 Generatingameshfromanobject. 49 5.3 Parametric surface defined by 16 control points. ....... 51 5.4 Different levels of detail for a sphere. 51 5.5 Viewfrustum.................................. 53 5.6