The Research and Implementation of WebGL Based3D Graphics Engine

Author
FangQiang
Advisor
ZouHai
School
Anhui University
Major
Computer Software and Theory
Classification
TP391.41 Image recognition device
Degree
Master's thesis
Year
2013
Downloads
85
Citations
0

Request the full text

Abstract

With the vigorous development of the Internet industry, Web related technology became increasingly valuable. Graphics is the key element of an attractive Web application. But as the complexity of the web application increases, tranditional2D graphics have been unable to meet the needs of the application. Interactive3D graphics application is the answer to this problem. But early Web interactive3D graphics application has some defieciencies, such as Java applets can’t use graphics hardware acceleration, Flash and Silverlight technology need plug-in support.The emergence of the WebGL technology perfect solved these problems. WebGL is a new3D graphics API which adds a JavaScript binding to OpenGL ES2.0. WebGL provides3d rendering hardware acceleration for HTML5Canvas. So Web developers can use graphics hardware to display complex3D scenes and models more smoothly in the browsers which also provide the possibility for the development of high performance web-side interactive3D graphics applications.But direct use of the underlying WebGL interface for development is inefficiency, so we need to encapsulate WebGL functionality to provide users with a mechanism of middleware, and users need not to know details of WebGL to the develop rapidly of the Web interactive3D graphics applications. This middleware system is often referred to as3D graphics engine. The main work of this article is to study and implement WebGL-based3D graphics engine.This paper introduces the basic architecture of3D game engines, and then we discuss the most popular3D game engines and the related theories. Finally, we study the design and implementation of the WebGL based game engine, SimpleGL and analyse the advantages and disadvantages of the SimpleGL engine by comparison with other engines. This paper is composed of five parts:Part1, Introduction. Firstly, this part introduces the background of the WebGL technology emergency and the necessity for study and implementation of the WebGL-based3D graphics engine. Then we introduce the basic3D game engine architecture and modules, and the main function of each module. Secondly, it introduces the most popular3D game engines(such as commercial game engines: Quake family Engines and Unreal family Engines, and open source game engines: Irrlicht engine and Torque engine). Finally, it discusses the game engine development technology trends.Part2, Background. This part mainly introduces the3D game engine development related mathematical basis:including coordinate system and frame, homogeneous coordinate, the commonly used affine transformations(e.g., translation, scaling, rotation) and perspective projection technology, lighting technology (including parallel light, point light, ambient light, etc.). Then we introduce the WebGL rendering pipeline and shaders.Part3, The design and implementation of system. Firstly, this part introduces the basic architecture of SimpleGL engine, including scene graph module, resource management module, mesh module, game assets serialization module, textures and shaders module, input management module,3d model import module and math library. Secondly, it discusses the design and implementation of these modules, including the design principles, and the introduction of main methods and properties.Part4. System performance tests and analysis. This paper uses unique draw call, view volume culling and material change tests benchmark the performance of the SimpleGL engine. Advantages and disadvantages of SimpleGL engine are analyzed through comparing with the Three.js engine and Unity engine.Part5, Summary. Firstly, this part evaluates the design and implementation of the SimpleGL engine, and summarizes the work in this paper. And then we point out the merits and demerits of the design and implementation of the engine. And then, it suggests some improvements for the future of the engine (such as adds sound module, physics engine module, animation module, etc.).

Table of contents

Summary 3-5 Abstract 5-11 first chapter 11-22 1.1 Background and Significance 11 - 12 1.2 3D engine basic framework 12-17 1.2.1 target hardware 12 1.2.2 device driver 12-13 <br / > 1.2.3 operating system 13 1.2.4 SDK and third-party middleware 13 1.2.5 platform independent layer 13-14 1.2.6 core System 14 1.2.7 resource Management System 14 1.2.8 rendering engine 14-15 1.2.9 scene graph and cutting optimization system 15 1.2.10 visual effects system 15-16 1.2.11 collision detection and physics engine system 16 1.2. 12 character animation system 16 1.2.13 sound System 16 1.2.14 \game-specific subsystems domestic and foreign research status quo 1.3 17 17-20 1.3.1 Quake series engine 17-18 1.3.2 Unreal series engine 18 1.3.3 Source engine 18 1.3.4 XNA Game Studio 18-19 1.3.5 other commercial engine 19 1.3.6 proprietary internal engine 19 1.3.7 open Source engine organizational structure 19-20 1.4 article 20 - 22 Chapter II 3D engine related theoretical background 22-37 2.1 three-dimensional mathematical overview 22-27 2.1.1 coordinate and frame 22-23 2.1.2 homogeneous coordinates 23-24 2.1.3 affine transformation homogeneous coordinates 24 2.1.4 transform representation 24-27 2.1.4.1 pan 25 2.1.4.2 zoom 25-26 2.1.4.3 rotation 26-27 2.2 perspective projection 27-31 2.2.1 a general perspective projection model 28 2.2.2 perspective projection of the main tasks 28-29 2.2.3 perspective projection matrix is ??derived 29-31 2.3 illumination model 31-34 2.3.1 source 31-33 <br / > 2.3.1.1 ambient light 31-32 2.3.1.2 point Light 32 2.3.1.3 parallel light 32-33 2.3.2 Lambert diffuse reflectance model 33 2.3.3 Phong reflection model 33-34 2.4 WebGL shader pipelines and 34-37 third system Design and Implementation 37-80 3.1 SimpleGL basic engine architecture 37 3.2 scene graph module , rendering and game loop 37-51 3.2.1 design ideas 38-44 3.2.1.1 entity -based approach 38 3.2.1.2 component-based approach 38-39 3.2.1.3 components and coding 39-40 3.2.1.4 update and rendering 40-41 3.2.1.5 SimpleGL event queue 41-42 <br / > 3.2.1.6 game loop 42 3.2.1.7 camera 42-43 3.2.1.8 illumination 43-44 3.2.2 specific achieve 44-51 3.2.2.1 scene class 44-45 3.2.2.2 game object class 45-47 3.2.2.3 component class 47 3.2.2.4 event queue class 47-48 3.2.2.5 camera class 48-50 3.2.2.6 illumination class 50-51 3.3 resource Management module 51-56 3.3.1 design ideas 51-54 3.3.1.1 project Management 53 3.3.1.2 resource provider 53-54 3.3.2 implementation 54-56 3.3.2.1 project class 54-55 3.3.2.2 resource provider class 55-56 3.4 grid module 56-62 3.4.1 design ideas 56-58 <br / > 3.4.1.1 grid 56-57 3.4.1.2 mesh rendering 57 3.4.1.3 MeshData class 57-58 3.4. 2 concrete realization 58-62 3.4.2.1 grid class 58-59 3.4.2.2 grid rendering class 59-60 3.4 .2.3 grid data class 60-62 3.5 materials and shaders module 62-68 3.5.1 design ideas 62-64 3.5.1.1 shader 62 3.5.1.2 material 62-63 3.5.1.3 Built- shader 63-64 /> <br 3.5.2 specific achieve 64-68 3.5.2.1 material Uniform variable class 64 3.5.2.2 material class 64-65 3.5.2.3 shader class 65-68 3.6 serialization module 68-72 3.6.1 design ideas 68-70 3.6.1.1 unique identifier (uid ) 68 3.6.1.2 project assets (ProjectAsset) serialization 68-69 3.6.1.3 scene objects (Scene) serialization 69-70 serialization 3.6.1.4 grid data 70 3.6.2 implementation 70-72 3.6.2.1 block data class 70 - 72 3.7 3D model import module 72-74 3.7.1 design ideas 72 3.7.2 implementation 72-74 <br / > 3.7.2.1 Obj file into class 72-73 3.7.2.2 dae file into class 73-74 3.8 input management module 74-78 <br / > 3.8.1 design ideas 74-76 3.8.1.1 keyboard input 74-75 3.8.1.2 mouse input 75-76 3.8.2 implementation 76-78 3.8.2.1 keyboard input class 76 3.8.2.2 mouse input class 76-78 3.9 Mathematics libraries and conversion module 78-80 3.9.1 design ideas 78 3.9.2 implementation 78-80 3.9.2.1 transformation class 78-80 Chapter IV system performance testing and analysis 80-87 4.1 benchmark : single draw call 81-83 4.1 .1 testing purposes 81 4.1.2 test Case Description 81-82 4.1.3 test Results 82 4.1.4 evaluate test results 82-83 4.2 benchmark : Depending on volume clipping 83-84 4.2.1 testing purposes 83 4.2.2 Description of test cases 83-84 4.2.3 test Results 84 4.2.4 test Results assessment 84 4.3 benchmark : Material change 84-86 4.3.1 testing purposes 84-85 4.3.2 test Case Description 85 4.3.3 test Results 85-86 4.3.4 test Results assessment 86 4.4 the test results are summarized and analyzed 86-87 Chapter summary and Outlook 87-88 References 88-91 Thanks 91

Related dissertations

  1. The Research on Development of Private Enterprises in Shanxi Province
    TianHui ·Shanxi University of Finance ·2014 ·Master's thesis
  2. Study on Brain Drain of New Energy Chemical Enterprises
  3. Research of Distributed Resource Management Model for Controller
  4. On-demanded Resource Prediction and Optimal Resource Allocation Method Research in Cloud Computing Environment
    XuDaYu ·Hefei University of Technology ·2014 ·Doctoral dissertation
  5. Design and Implementation of Hot Rolling Simulation Platform Based on Computer Simulation Technology
  6. Design and Implementation of Flight Game Based on Android Platform
  7. Yinchuan Telecom’s Fixed-line Subscriber Loop Management System
  8. Design and Implementation of Animation Resources Management System Based on XML
    WangXu ·Dalian University of Technology ·2013 ·Master's thesis
  9. The Design and Implement of Resource Permissions Management Platform in Information System
  10. OWL-based Product Information Geometric Reconstruction
    GuChao ·Zhejiang University of Technology ·2013 ·Master's thesis
  11. The Information Management System Design and Implement of University Evaluation Materials
    WenHua ·Xiangtan University ·2013 ·Master's thesis
  12. Research and Implementation of the Digital Library Service Platform
    ZhengLiangZuo ·Zhejiang University ·2014 ·Master's thesis
  13. The Optimization Model of Grid Resource and Task Scheduling Strategy Based on Market Mechanisms
    ChenNa ·Northeastern University ·2012 ·Master's thesis
  14. Research on Cognitive Decision Technology and Its Application in Constructing Reconfigurable Systems
  15. Key Technologies of the Tracking System in Phased Array Radars
  16. Functional Simulation about Phased Array Radar and Research on Scheduling Algorithm
  17. Research on the Mobile Grid Based on Overlay-network and Its Key Technology
  18. Research on the Resource Management in Cognitive Radio Networks
    ZhangWeiQing ·South China University of Technology ·2011 ·Doctoral dissertation
  19. Research on the Key Technologe for Resource Management in Cognitive Radio Networks
  20. Research on the Handoff Technology in Heterogeneous Wireless Internetworked Networks
    ZhaoZuoLi ·Ningbo University ·2013 ·Master's thesis