GPU, Graphics and Game Engines

Total Page:16

File Type:pdf, Size:1020Kb

GPU, Graphics and Game Engines Peter Mileff PhD Programming of Graphics GPU overview Graphics and Game Engines University of Miskolc Department of Information Technology Overview of the GPU... 2 GPU Overview ⦿ Graphics Processing Unit (GPU) is the central unit of your graphics card ⦿ Its objective: ● Performing complex graphical operations ● Directly accelerate the visualization ● Offload the CPU: ○ taking high-level visualization tasks from the CPU ○ therefore CPU can be used to do other things ⦿ The reason of the spread of the GPUs: ● Hardware manufacturers quickly recognized the business opportunities. Creating: ○ Multimedia applications (e.g. Photoshop) ○ Engineering systems (e.g. CAD systems) ○ Games 3 First Achievements ⦿ In 1996, 3dfx company released Voodoo I ⦿ Voodoo I characteristics: ● The first 3D accelerator card (4MB RAM, 50 Mhz) ● Huge success ● Support only the 3D visualization ○ It required an additional 2D video card ⦿ The idea: ● The 2D transformations are performed by a fast 2D video card ○ E.g. the popular Matrox video card ● The 3D transformations are performed by the Voodoo card ○ its hardware were able to make faster calculations than software rendering. 4 Other important events ⦿ In the same year: ● NVIDIA and the ATI started their own GPU series ● Nvidia: NV1, RIVA 128, Geforce 256 ● ATI: 3D Rage, Rage Pro, Rage 128 ⦿ The video cards immediately became very popular ⦿ The reasons of this are: ● Reasonable price ● These cards could be buy in every computer shop ● Cards were supported by games and operating systems (mainly by windows) 5 Today main (GPU) trades 6 Architecture of the GPU… 7 CPU vs GPU ⦿ The GPU architecture is very different from the CPU (already from the very beginning!) ⦿ Reason 1: ● They are designed for specific purposes: typically to speed up graphical calculations ● Graphical calculations have different requirements than the needs against the CPU ● The CPU is for general purposes ⦿ Reason 2: ● Graphical calculations and the process of the rasterization can be heavily parallelized ⦿ The development of the GPUs started to this direction 8 CPU vs GPU ⦿ CPU: implements a single-threaded computing architecture ● allows to run multiple processes on a single threaded pipeline ● application data can be reached through one memory interface ⦿ GPU: the architecture follows the stream processing technology ● This is much more efficient approach to process large amount of data ● A GPU can contain even thousands of stream processors ● There are no conflicts and the wait like at the CPU ○ Stream processors form a pipeline 9 CPU vs GPU 10 Geforce 8800 11 Geforce GTX 280 12 CPU vs GPU ⦿ CPU: uses a lot of resources to ● the control of the programs, ● to switch between instructions and tasks ⦿ GPU: is totally unsuitable for this ● GPU contains a lot of arithmetic logic units (ALU), ○ has the ability to calculate faster with order of magnitude ● Limitations: ○ every processing unit should run the same command – Data parallelism! ⦿ CPU also supports data parallelism! ● with extended instruction sets (e.g.. SSE, SSE2, SSE3, SSE4, AVX, ALTIVEC, stb), ● with multicore CPUs 13 The problem of data transfer ⦿ There is a distance between the GPU and CPU ● they are connected through the system bus ⦿ The data transfer problem appeared soon! ● Transfer data from main memory to the GPU memory is time consulting 14 The problem of data transfer ⦿ For this reason, numerous bus types were developed ● Former standards: ISA, MCA, VLB, PCI ● In 1997, the AGP (Accelerated Graphics Port) standard was developed ⦿ Very fast data transfer between CPu and GPU ⦿ Today is still present in the AGP standard ⦿ Today, the dominant solution is the PCI Express standard ● a high-speed serial computer expansion bus standard PCIe 1.0 PCIe 2.0 PCIe 3.0 PCIe 4.0 250 MB/s 500 MB/s 984,6 MB/s 1969.2 MB/s 15 Tendency of evolution ⦿ The GPUs evolution far exceeds the development of CPUs ⦿ Moore's law (1965): ● is the observation that the number of transistors in a dense integrated circuit doubles approximately every two years. ⦿ Today: ● CPU: the speed slowed to 18 months ● GPU: doubling rate reduced to 6 months 16 Tendency of evolution ⦿ Example: ATI Radeon HD 3800 GPU family: ● 320 stream processor ● 666 million transistors ● Performance > 1 terraFLOPS Intel Core 2 Quad CPU ● 582 million transistors ● Performance ~ 9.8 gigaFLOPS 17 Tendency 18 Tendency 19 Programming the GPU… 20 Programming APIs ⦿ In parallel with the development of video cards numerous low-level programming interfaces (API) were developed ● Under strong influence of hardware vendors ⦿ First well known API: Glide API ● Developed by 3dfx for their own Voodoo cards ● OpenGL like interface ● Targeted games in terms of performance and functionality ● It was dominant in game industry until mid-1990s ● In 2000, Nvidia acquired 3dfx 21 Direct3D vs OpenGL ⦿ Direct3D ● Part of the Microsoft’s DirectX graphical API ● Available only for Windows platforms ○ Desktops, XBox, Windows Phone ● The most popular graphical APIs for game developers ⦿ The reason of its popularity: ● development is perfectly follows the evolution of graphics hardwares ● Provides also built in higher level solutions: ○ Optimized mathematical solutions. E.g. matrices, vectors, collision detection, etc ○ Own 3D bone animation based model format called X ● Other additional higher-level APIs: DirectDraw, DirectInput, DirectSound, etc 22 Direct3D vs OpenGL ⦿ OpenGL (Open Graphics Library): ● Specification standard for platform independent 2D és 3D visualization ● Introduced in 1992 by Silicon Graphics Inc ● The ARB (Architecture Review Board) consortium was responsible for its development ○ Members are the major software and hardware manufacturers: ○ ATI, NVIDIA, Intel, Microsoft, etc.) ● In 2006 Khronos Group consortium took over its development ○ https://www.khronos.org/ ● Slower development: the development of the specification is a slow process, which significantly hinders the graphics-intensive applications developers. 23 Direct3D vs OpenGL ⦿ Real competitors in the field of game development ⦿ Both API has its own advantages and drawbacks ● Mainly there are only structural differences, the two APIs are almost identical in functionality ⦿ Advantage of the OpenGL (the future): ● Platform independence: opengl has the opportunity to run on almost all devices ● OpenGL can also be used for embedded systems and mobile devices. ○ This version is called OpenGL ES ● Popular operating systems are using OpenGL ○ iOS - OpenGL ES ○ Linux, Unix, BSD - OpenGL ○ Playstation - OpenGL ○ AmigaOS, MorphOS, Haiku OS ○ etc 24 Game and Graphics Engines… 25 Game engines ⦿ Objective 1: to provide a toolkit for the developers team (developer, designer, tester), ● E.g.: editors,runtime environment, network, audio ⦿ Efficient, convenient and fast game development becomes possible ⦿ It is a layer between the Operating System and the game logic. ⦿ It simplifies the routine programming tasks: ● Otherwise these should be performed for all games ● E.g: creating a window, audio, play video, loading assets, collision detection, etc. ⦿ Objective 2: representing an appropriate technical quality ● in terms graphics quality and performance 26 Structure of a Game Engine ⦿ The process of game development requires a complex IT knowledge! ● The game engine supports these process and therefore it’s functionality should be also complex They are organized into well-defined subsystems: ⦿ Core subsystem: core functions, controls the modules and other subsystems. Provides platform independency, forwards events to other engine parts. ⦿ Graphics subsystem: responsible for visualization. It is typically built upon an API (OpenGL, DirectX) ● Display models, lights, effects, post-processing, particle systems, etc. 27 Structure of a Game Engine ⦿ Audio and Music subsystem: playing audio effects and music ⦿ Artificial intelligence subsystem ⦿ Network subsystem: support for network connections and data transfer ⦿ Input and Event subsystem: handle input devices and event management ⦿ Scripting subsystem: support script based development ⦿ Resource subsystem: functions to access to resources ⦿ Physics subsystem: make physical based simulations possible. (E.g. racing games) ⦿ Other subsystems: for math calculations, video playing, etc. 28 Structure of a Game Engine ⦿ Subsystems should be a replaceable unit ⦿ Sometimes a subsystem is not developed by in-house ● the companies may decide to buy an existing and well-functioning technology. ● If the development of the new subsystem will cost more than licensing an existing ○ Typical example is integrating a physical subsystem ⦿ Examining today's major game engines modularity can be seen ● Main components are written using a low level language (e.g. C/C++) ○ Because of performance ● Game logic is written using a higher level language ○ fewer errors ○ Cheaper developers 29 Today’s major Engines ⦿ Thanks to technology, the graphics and game engines can offer sumptuous visuals ⦿ Games become increasingly complex ● They contain even more cinematic parts, and functionality ⦿ A modern game engine can be very expensive ● In return: developers will receive multiple years of experience in the form of implemented algorithms 30 Today’s major Engines ⦿ Unreal Engine 4 - Epic Games ⦿ Engine is free, but 5% royalty should be payed after the first $3,000 of revenue per product per quarter ⦿ ID Tech 5 – ID Software ⦿ Frostbite 3 - EA Digital Illusions CE ⦿ Cryengine 3 - Crytek ⦿ Source Engine – Valve ⦿ Unity Engine - Unity ⦿ ShiVa 3D - Stonetrip ⦿ C4 Engine - Terathon
Recommended publications
  • Tasosuunnittelu Source Engine -Pelimoottorilla
    Tasosuunnittelu Source Engine -pelimoottorilla Viestintä 3D-visualisointi Opinnäytetyö 31.5.2009 Arttu Mäki Kulttuurialat Koulutusohjelma Suuntautumisvaihtoehto Viestintä 3D-visualisointi Tekijä Arttu Mäki Työn nimi Tasosuunnittelu Source Engine -pelimoottorilla Työn ohjaaja/ohjaajat Kristian Simolin Työn laji Aika Numeroidut sivut + liitteiden sivut Opinnäytetyö 31.5.2009 31 TIIVISTELMÄ Opinnäytetyön tutkimuksen kohteena selvitettiin ja ratkaistiin yleisiä ongelmia ja haasteita liittyen Valve Softwaren kehittämään, Source Engine –pelimoottorilla toimivaan tasosuunnit- teluohjelmaan ja sen käyttöön. Työ käy läpi tärkeimmät suunnitteluun liittyvät työtavat geometrian rakentamisesta valaistuksen määrittämiseen. Työnä esitellään Valve Softwarelle 2008 keväällä myyty projekti ”Fastlane”, josta tuli yksi virallisista kartoista Team Fortress 2 – moninpeliin. Tasosuunnittelulla tarkoitetaan kentän rakentamista alkuperäisten suunnitelmien perusteella aina toimivaksi pelikentäksi asti. Kenttään rakennetaan pelimekaaniset elementit, valaistus, mallit ja äänet. Opinnäytetyössä on tarkasteltu pelisuunnittelun historiaa, yritysten taustaa, sekä käyty läpi käytettävän ohjelmiston työkalut ja toiminnot. Työssä on käytetty apuna laajaa valikoimaa eri lähdemateriaaleja koskien taso- ja pelisuun- nittelua ja käyty läpi tapauskohtaisesti se, miten voitaisiin selvitä prosessista mahdollisim- man tehokkaasti hyödyntäen Valve Softwaren tarjoamia monipuolisia työkaluja. Teos/Esitys/Produktio Säilytyspaikka Metropolia Ammattikorkeakoulu Avainsanat tasosuunnittelu,
    [Show full text]
  • Advanced Computer Graphics Spring 2011
    CSCI 4830/7000 Advanced Computer Graphics Spring 2011 Instructor ● Willem A (Vlakkies) Schreüder ● Email: [email protected] – Begin subject with 4830 or 7000 – Resend email not answered promptly ● Office Hours: – Before and after Class – By appointment ● Weekday Contact Hours: 6:30am - 9:00pm Course Objectives ● Explore advanced topics in Computer Graphics – Pipeline Programming (Shaders) – Embedded System (OpenGL ES) – GPU Programming (OpenCL) – Ray Tracing – Special topics ● Particle systems ● Assignments: Practical OpenGL – Building useful applications Course Organization and Grading ● Class participation (50% grade) – First hour: Discussion/Show and tell ● Weekly homework assignments ● Volunteers and/or round robin – Second hour: Introduction of next topic ● Semester project (50% grade) – Build a significant application in OpenGL – 15 minute presentation last class periods ● No formal tests or final Assumptions ● You need to be fluent in C – Examples are in C (or simple C++) – You can do assignments in any language ● I may need help getting it to work on my system ● You need to be comfortable with OpenGL – CSCI 4229/5229 or equivalent – You need a working OpenGL environment Grading ● Satisfactory complete all assignments => A – The goal is to impress your friends ● Assignments must be submitted on time unless prior arrangements are made – Due by Thursday morning – Grace period until Thursday noon ● Assignments must be completed individually – Stealing ideas are encouraged – Code reuse with attribution is permitted ● Class attendance HIGHLY encouraged Code Reuse ● Code from the internet or class examples may be used – You take responsibility for any bugs in the code – Make the code your own ● Understand it ● Format it consistently – Improve upon what you found – Credit the source ● The assignment is a minimum requirement Text ● OpenGL Shading Language (3ed) – Randi J.
    [Show full text]
  • Opengl Basics What Is Opengl?
    CS312 OpenGL basics What is openGL? A low-level graphics library specification. A small set of geometric primitives: Points Lines Geometric primitives Polygons Images Image primitives Bitmaps OpenGL Libraries OpenGL core library OpenGL32 on Windows GL/Mesa on most unix/linux systems OpenGL Utility Library (GLU) Provides functionality in OpenGL core but avoids having to rewrite code GL is window system independent Extra libraries are needed to connect GL to the OS GLX – X windows, Unix AGL – Apple Macintosh WGL – Microsoft Windows GLUT OpenGL Utility Toolkit (GLUT) Provides functionality common to all window systems Open a window Get input from mouse and keyboard Menus Event-driven Code is portable but GLUT is minimal Software Organization application program OpenGL Motif widget or similar GLUT GLX, AGL or WGL GLU X, Win32, Mac O/S GL software and/or hardware OpenGL Architecture Immediate Mode Geometric pipeline Per Vertex Polynomial Operations & Evaluator Primitive Assembly Display Per Fragment Frame Rasterization CPU List Operations Buffer Texture Memory Pixel Operations OpenGL State OpenGL is a state machine OpenGL functions are of two types Primitive generating Can cause output if primitive is visible How vertices are processed and appearance of primitive are controlled by the state State changing Transformation functions Attribute functions Typical GL Program Structure Configure and open a window Initialize GL state Register callback functions Render Resize Events Enter infinite event processing loop Render/Display Draw simple geometric primitives Change states (how GL draws these primitives) How they are lit or colored How they are mapped from the user's two- or three-dimensional model space to the two- dimensional screen.
    [Show full text]
  • Mobile Developer's Guide to the Galaxy
    Don’t Panic MOBILE DEVELOPER’S GUIDE TO THE GALAXY U PD A TE D & EX TE ND 12th ED EDITION published by: Services and Tools for All Mobile Platforms Enough Software GmbH + Co. KG Sögestrasse 70 28195 Bremen Germany www.enough.de Please send your feedback, questions or sponsorship requests to: [email protected] Follow us on Twitter: @enoughsoftware 12th Edition February 2013 This Developer Guide is licensed under the Creative Commons Some Rights Reserved License. Editors: Marco Tabor (Enough Software) Julian Harty Izabella Balce Art Direction and Design by Andrej Balaz (Enough Software) Mobile Developer’s Guide Contents I Prologue 1 The Galaxy of Mobile: An Introduction 1 Topology: Form Factors and Usage Patterns 2 Star Formation: Creating a Mobile Service 6 The Universe of Mobile Operating Systems 12 About Time and Space 12 Lost in Space 14 Conceptional Design For Mobile 14 Capturing The Idea 16 Designing User Experience 22 Android 22 The Ecosystem 24 Prerequisites 25 Implementation 28 Testing 30 Building 30 Signing 31 Distribution 32 Monetization 34 BlackBerry Java Apps 34 The Ecosystem 35 Prerequisites 36 Implementation 38 Testing 39 Signing 39 Distribution 40 Learn More 42 BlackBerry 10 42 The Ecosystem 43 Development 51 Testing 51 Signing 52 Distribution 54 iOS 54 The Ecosystem 55 Technology Overview 57 Testing & Debugging 59 Learn More 62 Java ME (J2ME) 62 The Ecosystem 63 Prerequisites 64 Implementation 67 Testing 68 Porting 70 Signing 71 Distribution 72 Learn More 4 75 Windows Phone 75 The Ecosystem 76 Implementation 82 Testing
    [Show full text]
  • Blinding Silence a Sound-Based Puzzle Game Interactive Media and Game Development
    Project Number: RL1-P009 Blinding Silence A Sound-Based Puzzle Game Interactive Media and Game Development A Major Qualifying Project Report submitted to the faculty of WORCESTER POLYTECHNIC INSTITUTE In partial fulfillment of the requirements for the Degree of Bachelor of Science by Ryan Bedell Elliot Borenstein Drew Hickcox Lukas Wong-Achorn Advised by Professor Jennifer deWinter Professor Robert W. Lindeman Abstract for the development of Blinding Silence: A Sound Based Puzzle Game By Ryan Bedell, Elliot Borenstein, Drew Hickcox, Lukas Wong-Achorn This is an Interactive Media and Game Development Major Qualifying Project report, focusing on the state and development of a video game based on Terathon’s C4 Engine. The game, titled Blinding Silence, is a single player game with a unique sound-based visual aesthetic and Wiimote-based control scheme. This document discusses the state, development, and original design of the game Blinding Silence. Blinding Silence has a unique control scheme that uses two Wiimotes and an infrared LED headset for in- game navigation. The game also has a unique visual design where every noise makes a burst of light, allowing players to “see” sound. Through these the player solves physical puzzles. The player controls a blind man with a mysterious staff he uses as a cane. The world has been taken over by darkness, with people endlessly repeating the same task forever. The man discovers he can influence people with sound and begins uncovering the chain of events that led to the catastrophe. Blinding Silence has a visual style indentified by its sound-based lighting. Models are viewed in silhouette, which removes the importance of textures and increases the importance of models.
    [Show full text]
  • IT Acronyms.Docx
    List of computing and IT abbreviations /.—Slashdot 1GL—First-Generation Programming Language 1NF—First Normal Form 10B2—10BASE-2 10B5—10BASE-5 10B-F—10BASE-F 10B-FB—10BASE-FB 10B-FL—10BASE-FL 10B-FP—10BASE-FP 10B-T—10BASE-T 100B-FX—100BASE-FX 100B-T—100BASE-T 100B-TX—100BASE-TX 100BVG—100BASE-VG 286—Intel 80286 processor 2B1Q—2 Binary 1 Quaternary 2GL—Second-Generation Programming Language 2NF—Second Normal Form 3GL—Third-Generation Programming Language 3NF—Third Normal Form 386—Intel 80386 processor 1 486—Intel 80486 processor 4B5BLF—4 Byte 5 Byte Local Fiber 4GL—Fourth-Generation Programming Language 4NF—Fourth Normal Form 5GL—Fifth-Generation Programming Language 5NF—Fifth Normal Form 6NF—Sixth Normal Form 8B10BLF—8 Byte 10 Byte Local Fiber A AAT—Average Access Time AA—Anti-Aliasing AAA—Authentication Authorization, Accounting AABB—Axis Aligned Bounding Box AAC—Advanced Audio Coding AAL—ATM Adaptation Layer AALC—ATM Adaptation Layer Connection AARP—AppleTalk Address Resolution Protocol ABCL—Actor-Based Concurrent Language ABI—Application Binary Interface ABM—Asynchronous Balanced Mode ABR—Area Border Router ABR—Auto Baud-Rate detection ABR—Available Bitrate 2 ABR—Average Bitrate AC—Acoustic Coupler AC—Alternating Current ACD—Automatic Call Distributor ACE—Advanced Computing Environment ACF NCP—Advanced Communications Function—Network Control Program ACID—Atomicity Consistency Isolation Durability ACK—ACKnowledgement ACK—Amsterdam Compiler Kit ACL—Access Control List ACL—Active Current
    [Show full text]
  • Game Engines
    3/16/10 Game Engines Technical Game Development II Professor Charles Rich Computer Science Department [email protected] IMGD 4000 (D 10) 1 Pedagogical Goal . Your technical skills should not be tied to any particular game engine . Just like your programming skills should not be tied to any particular programming language . Use the best tools for each job . ... or the tools you were given IMGD 4000 (D 10) 2 1 3/16/10 Definition Game Engine A series of modules and interfaces that allows a development team to focus on product game- play content, rather than technical content. [Julian Gold, OO Game Dev.] . But this class is about “the technical content” ! IMGD 4000 (D 10) 3 Buy versus Build . Depends on your needs, resources and constraints • technical needs (e.g., “pushing the envelope” ?) • financial resources (e.g., venture capital ?) • time constraints (e.g., 1 mo. or 2 yr. ?) • platform constraints (e.g., Flash ?) • other factors (e.g., sequel ?) . Most games commonly built today with some sort of “engine layer” IMGD 4000 (D 10) 4 2 3/16/10 Types of Engine Architectures (Roughly) . Monolithic (e.g., Unreal Engine) . Modular (e.g., C4 Engine) . Tool Kit (e.g., jME) IMGD 4000 (D 10) 5 Monolithic Engines (e.g., Unreal) . “old style”--typically grew out of specific game . tend to be genre-specific . difficult to go beyond extensions/modifications not anticipated in (e.g., scripting) API . proven, comprehensive capabilities IMGD 4000 (D 10) 6 3 3/16/10 Modular Engines (e.g., C4) . “modern”--often developed by game engine company . use object-oriented techniques for greater modularity .
    [Show full text]
  • Introduction to the Software Libraries Opengl: Open Graphics Library GLU: Opengl Utility Library Glut: Opengl Utility Toolkit
    Introduction to the software libraries This course makes use of several popular libraries to help build sophisticated portable graphics applications with minimal effort. The following diagram gives an overview of the packages and how they interact. For the purposes of this course, one can think of the GLU and glut libraries as being part of the OpenGL library or the OpenGL API (application programmer's interface), eventhough this is not really the case. -provides a software interface to graphics hardware and OpenGL implements most of the graphics functionality. provides support for some additional operations and primitive GLU types, and is implemented using OpenGL function calls designed specifically to be used with OpenGL and it takes care of things like opening windows, redraw events, and keyboard and glut mouse input. It effectively hides all the windowing system dependencies for OpenGL. OpenGL: Open Graphics Library • standardized 3D graphics library (API) • available on many platforms, often with hardware support • derivative of the Silicon Graphics' GL library • all function calls have the gl prefix, e.g.: glScale3fv() • OpenGL resources on the Internet** GLU: OpenGL Utility Library • support for NURBS surfaces, quadric surfaces, surface trimming, ... • all function calls have the glu prefix, e.g.: gluOrtho2D() • comes with all OpenGL implementations, including Windows and Mesa, no separate installation required • typically involves no hardware acceleration • glu32.dll on Win95/Win98/WinNT, look in same directory as Opengl32.dll
    [Show full text]
  • Opengl API Introduction Agenda
    OpenGL API Introduction Agenda • Structure of Implementation • Paths and Setup • API, Data Types & Function Name Conventions • GLUT • Buffers & Colours 2 OpenGL: An API, Not a Language • OpenGL is not a programming language; it is an application programming interface (API). • An OpenGL application is a program written in some programming language (such as C or C++) that makes calls to one or more of the OpenGL libraries. • Does not mean program uses OpenGL exclusively to do drawing: • It might combine the best features of two different graphics packages. • Or it might use OpenGL for only a few specific tasks and environment- specific graphics (such as the Windows GDI) for others. 3 Implementations • Although OpenGL is a “standard” programming library, this library has many implementations and versions. • On Microsoft Windows the implementation is in the opengl32.dll dynamic link library, located in the Windows system directory. • The OpenGL library is usually accompanied by the OpenGL utility library (GLU), which on Windows is in glu32.dll,. • GLU is a set of utility functions that perform common tasks, such as special matrix calculations, or provide support for common types of curves and surfaces. • On Mac OS X, OpenGL and the GLU libraries are both included in the OpenGL Framework. • The steps for setting up your compiler tools to use the correct OpenGL headers and to link to the correct OpenGL libraries vary from tool to tool and from platform to platform. 4 Include Paths • On all platforms, the prototypes for all OpenGL functions, types, and macros #include<windows.h> are contained (by convention) in the #include<gl/gl.h> header file gl.h.
    [Show full text]
  • Multithreaded Rendering for Cross-Platform 3D Visualization Based on Vulkan Api
    The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLIV-4/W1-2020, 2020 3rd BIM/GIS Integration Workshop and 15th 3D GeoInfo Conference, 7–11 September 2020, London, UK MULTITHREADED RENDERING FOR CROSS-PLATFORM 3D VISUALIZATION BASED ON VULKAN API C. Ioannidis, A.-M. Boutsi* Laboratory of Photogrammetry, School of Rural and Surveying Engineering, National Technical University of Athens, Greece; [email protected], [email protected] KEY WORDS: Computer graphics, 3D visualization, graphics API, Vulkan, geospatial data ABSTRACT: The visualization of large-sized 3D geospatial models is a graphics intensive task. With ever increasing size and complexity, more computing resources are needed to attain speed and visual quality. Exploiting the parallelism and the multi-core performance of the Graphics Processing Unit (GPU), a cross-platform 3D viewer is developed based on the Vulkan API and modern C++. The proposed prototype aims at the visualization of a textured 3D mesh of the Cultural Heritage by enabling a multi-threaded rendering pipeline. The rendering workload is distributed across many CPU threads by recording multiple command buffers in parallel and coordinating the host and the GPU rendering phases. To ensure efficient multi-threading behavior and a minimum overhead, synchronization primitives are exploiting for ordering the execution of queues and command buffers. Furthermore, push-constants are used to send uniform data to the GPU and render passes to adapt to the tile-based rendering of the mobile devices. The proposed methodology and technical solution are designed, implemented and tested for Windows, MacOS and Android on Vulkan-compatible GPU hardware by compiling the same codebase.
    [Show full text]
  • 3.2.1 Opengl Context and Window Creation
    OpenGL Context and Window Stefano Markidis and Sergio Rivas-Gomez Four Key-points • OpenGL does not include window creation and management. You will need separate libraries to manage the windows • As window creation and management, we suggest that you use either GLUT/FreeGLUT or GLFW • GLUT/FreeGLUT are easy to use and likely already installed on your systems, GLFW is the future but you need to install it • When using OpenGL, it is better to install and use a library for OpenGL function pointer management. We will install and use GLAD OpenGL Initialization … Without OpenGL! • We initialize OpenGL, by creating an OpenGL context, which is essentially a state machine that stores all data related to the rendering of our application. • Problem: Creating a window and an OpenGL context is not part of the OpenGL specification. • The reason that this is done differently on different platforms and OpenGL can’t guarantee portability. • There are libraries, not included in OpenGL, out there that supports window creation and management. Typical Program Flow with Window Management Libraries Every application making use of real-time graphics will have a program flow that comes down to this render loop Suggested Libraries to Create/Manage Windows • GLUT: OpenGL Utility Toolkit (GLUT) library • Easiest to use • Already installed on lab machines and likely on your laptop. • Not designed for core-profile OpenGL • Free-GLUT newly developed version of GLUT, supported and new license type • GLFW: • Little more difficult to use than GLUT • Most modern and best integration with modern OpenGL. • It doesn’t support deprecated immediate-mode legacy OpenGL Create a Window with GLUT / Free GLUT • We first initialize window with glutInit, glutInitWindowSize(), glutCreateWindow() • We tell GLUT what is the function responsible for the rendering and define it.
    [Show full text]
  • Game Creation Blueprint What You Need to Know to Build Your Own Games
    1 Terms and Conditions LEGAL NOTICE The Publisher has strived to be as accurate and complete as possible in the creation of this report, notwithstanding the fact that he does not warrant or represent at any time that the contents within are accurate due to the rapidly changing nature of the Internet. While all attempts have been made to verify information provided in this publication, the Publisher assumes no responsibility for errors, omissions, or contrary interpretation of the subject matter herein. Any perceived slights of specific persons, peoples, or organizations are unintentional. In practical advice books, like anything else in life, there are no guarantees of income made. Readers are cautioned to reply on their own judgment about their individual circumstances to act accordingly. This book is not intended for use as a source of legal, business, accounting or financial advice. All readers are advised to seek services of competent professionals in legal, business, accounting and finance fields. You are encouraged to print this book for easy reading. 2 Table of Contents Foreword Chapter 1: Game Creation Basics Chapter 2: What Tools Are Needed? Chapter 3: 2D Game Creation Software Chapter 4: 3D Game Creation Software Chapter 5: Game Modification Chapter 6: Building a Game on a Social Site 3 Foreword Video gaming can be a very entertaining experience for many people. Sometimes you will notice that hours have gone by while you are playing. If you are a person who enjoys playing video games you may want to consider creating your own video game. The market for video games continuously expands.
    [Show full text]