Game Development with Openxr

Total Page:16

File Type:pdf, Size:1020Kb

Game Development with Openxr Game Development with OpenXR Christoph Haag [email protected] 01/02/2020 1 Game Development with OpenXR ● OpenXR from a user/game developer vie ● !etting "tarted ith OpenXR – #ist of $%amples – C simple e%ample – !odot $ngine &lugin ● 'O(Os 2 OpenXR from a user/game developer view ● *R +nputs – Headset, Controller position/rotation -.pose/0 – 1uttons, touch, force, touchpad, thumbstic2, 3 ● *R Output – "tereoscopic, tailored to hard are parameters – #enses -distortion0 – $xtremel4 sensitive to latency/stutter ● *endor *R runtime – Hard are drivers -5"1 data → pose, button events) – &resentation of 7rames -distorted, as4nc) – &rovide 8&+ -vendor specific or OpenXR0 – 'hin2: libinput/X.org/;ayland ) OpenXR Runtimes/Hardware today ● ;indo s – Oculus -beta0 => Rift, Rift ", ?uest – ;indo s @R A()( onl4B => ;indo s @R ● #inu% – @onado => ● OpenH@(, 7#O"", often reverse engineered C incomplete drivers ● Dative drivers in development -psmove, psvr, hydra, O"*R H(E0 ● libsurvive < OpenXR from a user/game developer view ● (erived from *ulkan spec – +nherits some 8&+ concepts – "imilar loader/header la4out -provided b4 Ehronos: OpenXRG"(E0 ● libopenxrHloader.so ● openxr.h, open%rHplatform.h – $xtensions -EHR/$X', )( 8&+ support, unusual display configurations, input ...0 – 8&+ #a4ers -validation, ...0 ● Do compile time references to specific runtime, only loader ● 8t runtime, loader finds C dispatches to any OpenXR compliant runtime F Code Examples ● https://github.com/KhronosGroup/OpenXR-"(EG"ource/tree/master/src/tests/hello_xr – CJJ, abstracted, cross platform, OpenG#/*ul2an/()( ● https://github.com/$picGames/5nreal$ngine/tree/release/$ngine/&lugins/Runtime/OpenXR – CJJ, integrated/abstracted, indo s onl4 ● https://github.com/@icrosoft/OpenXRG"(EG*isual"tudio – CJJ, indo s onl4, ()( ● https://github.com/Kherico/OpenXRG"amples/ – CJJ, abstracted, indo s onl4, OpenG# ● https://gitlab.freedesktop.org/xrdesktop/gxr – C, glib, linux onl4, *ulkan ith OpenGL memor4 object ● https://gitlab.freedesktop.org/monado/demos/xrgears – CJJ, mildl4 abstracted, linux onl4, *ul2an ● https://gitlab.freedesktop.org/monado/demos/openxrGsimple-e%ample – C, no abstraction, linux only, OpenGL I Simple example ● gcc app.c Go app Mp2gGcon9g GGlibs GGcNags glx open%rM ● XR_R5D'+@$HO"OD=/path/open%rHmonadoGdev.json ./app ● "4mlin2: /etc/%dg/open%r/1/activeHruntime.json – ./app ● "imple e%ample: code C live demo L Godot Plugin ● live demo C code P !ODOs ● &ac2aging OpenXR #oader/Headers in Distributions – #i2e *ul2an #oader/Headers ● 8ction binding UI for godot – "hared 5+ ith Open*R pluginR – https://github.com/!odot*R/godotHopenvr/issues/L1 Q !ODOs ● !raphics Binding – glXGetCurrentConte%t-0S – glXGetCurrent(ra able-0 ● ;indo s Port – Some Tde9nes – Graphics binding – 'esting 10 Game Development with OpenXR "ny #uestions$ 7ossXR Conference 2020 https://fossxr.dev/ https://twitter.com/7ossXR/ 11.
Recommended publications
  • Introduction to the Vulkan Computer Graphics API
    1 Introduction to the Vulkan Computer Graphics API Mike Bailey mjb – July 24, 2020 2 Computer Graphics Introduction to the Vulkan Computer Graphics API Mike Bailey [email protected] SIGGRAPH 2020 Abridged Version This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License http://cs.oregonstate.edu/~mjb/vulkan ABRIDGED.pptx mjb – July 24, 2020 3 Course Goals • Give a sense of how Vulkan is different from OpenGL • Show how to do basic drawing in Vulkan • Leave you with working, documented, understandable sample code http://cs.oregonstate.edu/~mjb/vulkan mjb – July 24, 2020 4 Mike Bailey • Professor of Computer Science, Oregon State University • Has been in computer graphics for over 30 years • Has had over 8,000 students in his university classes • [email protected] Welcome! I’m happy to be here. I hope you are too ! http://cs.oregonstate.edu/~mjb/vulkan mjb – July 24, 2020 5 Sections 13.Swap Chain 1. Introduction 14.Push Constants 2. Sample Code 15.Physical Devices 3. Drawing 16.Logical Devices 4. Shaders and SPIR-V 17.Dynamic State Variables 5. Data Buffers 18.Getting Information Back 6. GLFW 19.Compute Shaders 7. GLM 20.Specialization Constants 8. Instancing 21.Synchronization 9. Graphics Pipeline Data Structure 22.Pipeline Barriers 10.Descriptor Sets 23.Multisampling 11.Textures 24.Multipass 12.Queues and Command Buffers 25.Ray Tracing Section titles that have been greyed-out have not been included in the ABRIDGED noteset, i.e., the one that has been made to fit in SIGGRAPH’s reduced time slot.
    [Show full text]
  • Standards for Vision Processing and Neural Networks
    Standards for Vision Processing and Neural Networks Radhakrishna Giduthuri, AMD [email protected] © Copyright Khronos Group 2017 - Page 1 Agenda • Why we need a standard? • Khronos NNEF • Khronos OpenVX dog Network Architecture Pre-trained Network Model (weights, …) © Copyright Khronos Group 2017 - Page 2 Neural Network End-to-End Workflow Neural Network Third Vision/AI Party Applications Training Frameworks Tools Datasets Trained Vision and Neural Network Network Inferencing Runtime Network Model Architecture Desktop and Cloud Hardware Embedded/Mobile Embedded/MobileEmbedded/Mobile Embedded/Mobile/Desktop/CloudVision/InferencingVision/Inferencing Hardware Hardware cuDNN MIOpen MKL-DNN Vision/InferencingVision/Inferencing Hardware Hardware GPU DSP CPU Custom FPGA © Copyright Khronos Group 2017 - Page 3 Problem: Neural Network Fragmentation Neural Network Training and Inferencing Fragmentation NN Authoring Framework 1 Inference Engine 1 NN Authoring Framework 2 Inference Engine 2 NN Authoring Framework 3 Inference Engine 3 Every Tool Needs an Exporter to Every Accelerator Neural Network Inferencing Fragmentation toll on Applications Inference Engine 1 Hardware 1 Vision/AI Inference Engine 2 Hardware 2 Application Inference Engine 3 Hardware 3 Every Application Needs know about Every Accelerator API © Copyright Khronos Group 2017 - Page 4 Khronos APIs Connect Software to Silicon Software Silicon Khronos is an International Industry Consortium of over 100 companies creating royalty-free, open standard APIs to enable software to access
    [Show full text]
  • Khronos Template 2015
    Ecosystem Overview Neil Trevett | Khronos President NVIDIA Vice President Developer Ecosystem [email protected] | @neilt3d © Copyright Khronos Group 2016 - Page 1 Khronos Mission Software Silicon Khronos is an Industry Consortium of over 100 companies creating royalty-free, open standard APIs to enable software to access hardware acceleration for graphics, parallel compute and vision © Copyright Khronos Group 2016 - Page 2 http://accelerateyourworld.org/ © Copyright Khronos Group 2016 - Page 3 Vision Pipeline Challenges and Opportunities Growing Camera Diversity Diverse Vision Processors Sensor Proliferation 22 Flexible sensor and camera Use efficient acceleration to Combine vision output control to GENERATE PROCESS with other sensor data an image stream the image stream on device © Copyright Khronos Group 2016 - Page 4 OpenVX – Low Power Vision Acceleration • Higher level abstraction API - Targeted at real-time mobile and embedded platforms • Performance portability across diverse architectures - Multi-core CPUs, GPUs, DSPs and DSP arrays, ISPs, Dedicated hardware… • Extends portable vision acceleration to very low power domains - Doesn’t require high-power CPU/GPU Complex - Lower precision requirements than OpenCL - Low-power host can setup and manage frame-rate graph Vision Engine Middleware Application X100 Dedicated Vision Processing Hardware Efficiency Vision DSPs X10 GPU Compute Accelerator Multi-core Accelerator Power Efficiency Power X1 CPU Accelerator Computation Flexibility © Copyright Khronos Group 2016 - Page 5 OpenVX Graphs
    [Show full text]
  • Migrating from Opengl to Vulkan Mark Kilgard, January 19, 2016 About the Speaker Who Is This Guy?
    Migrating from OpenGL to Vulkan Mark Kilgard, January 19, 2016 About the Speaker Who is this guy? Mark Kilgard Principal Graphics Software Engineer in Austin, Texas Long-time OpenGL driver developer at NVIDIA Author and implementer of many OpenGL extensions Collaborated on the development of Cg First commercial GPU shading language Recently working on GPU-accelerated vector graphics (Yes, and wrote GLUT in ages past) 2 Motivation for Talk Coming from OpenGL, Preparing for Vulkan What kinds of apps benefit from Vulkan? How to prepare your OpenGL code base to transition to Vulkan How various common OpenGL usage scenarios are re-thought in Vulkan Re-thinking your application structure for Vulkan 3 Analogy Different Valid Approaches 4 Analogy Fixed-function OpenGL Pre-assembled toy car fun out of the box, not much room for customization 5 AZDO = Approaching Zero Driver Overhead Analogy Modern AZDO OpenGL with Programmable Shaders LEGO Kit you build it yourself, comes with plenty of useful, pre-shaped pieces 6 Analogy Vulkan Pine Wood Derby Kit you build it yourself to race from raw materials power tools used to assemble, adult supervision highly recommended 7 Analogy Different Valid Approaches Fixed-function OpenGL Modern AZDO OpenGL with Vulkan Programmable Shaders 8 Beneficial Vulkan Scenarios Has Parallelizable CPU-bound Graphics Work yes Can your graphics Is your graphics work start work creation be CPU bound? parallelized? yes Vulkan friendly 9 Beneficial Vulkan Scenarios Maximizing a Graphics Platform Budget You’ll yes do whatever Your graphics start it takes to squeeze platform is fixed out max perf. yes Vulkan friendly 10 Beneficial Vulkan Scenarios Managing Predictable Performance, Free of Hitching You put yes You can a premium on manage your start avoiding graphics resource hitches allocations yes Vulkan friendly 11 Unlikely to Benefit Scenarios to Reconsider Coding to Vulkan 1.
    [Show full text]
  • Augmented Reality and Its Aspects: a Case Study for Heating Systems
    Augmented Reality and its aspects: a case study for heating systems. Lucas Cavalcanti Viveiros Dissertation presented to the School of Technology and Management of Bragança to obtain a Master’s Degree in Information Systems. Under the double diploma course with the Federal Technological University of Paraná Work oriented by: Prof. Paulo Jorge Teixeira Matos Prof. Jorge Aikes Junior Bragança 2018-2019 ii Augmented Reality and its aspects: a case study for heating systems. Lucas Cavalcanti Viveiros Dissertation presented to the School of Technology and Management of Bragança to obtain a Master’s Degree in Information Systems. Under the double diploma course with the Federal Technological University of Paraná Work oriented by: Prof. Paulo Jorge Teixeira Matos Prof. Jorge Aikes Junior Bragança 2018-2019 iv Dedication I dedicate this work to my friends and my family, especially to my parents Tadeu José Viveiros and Vera Neide Cavalcanti, who have always supported me to continue my stud- ies, despite the physical distance has been a demand factor from the beginning of the studies by the change of state and country. v Acknowledgment First of all, I thank God for the opportunity. All the teachers who helped me throughout my journey. Especially, the mentors Paulo Matos and Jorge Aikes Junior, who not only provided the necessary support but also the opportunity to explore a recent area that is still under development. Moreover, the professors Paulo Leitão and Leonel Deusdado from CeDRI’s laboratory for allowing me to make use of the HoloLens device from Microsoft. vi Abstract Thanks to the advances of technology in various domains, and the mixing between real and virtual worlds.
    [Show full text]
  • Building the Metaverse One Open Standard at a Time
    Building the Metaverse One Open Standard at a Time Khronos APIs and 3D Asset Formats for XR Neil Trevett Khronos President NVIDIA VP Developer Ecosystems [email protected]| @neilt3d April 2020 © Khronos® Group 2020 This work is licensed under a Creative Commons Attribution 4.0 International License © The Khronos® Group Inc. 2020 - Page 1 Khronos Connects Software to Silicon Open interoperability standards to enable software to effectively harness the power of multiprocessors and accelerator silicon 3D graphics, XR, parallel programming, vision acceleration and machine learning Non-profit, member-driven standards-defining industry consortium Open to any interested company All Khronos standards are royalty-free Well-defined IP Framework protects participant’s intellectual property >150 Members ~ 40% US, 30% Europe, 30% Asia This work is licensed under a Creative Commons Attribution 4.0 International License © The Khronos® Group Inc. 2020 - Page 2 Khronos Active Initiatives 3D Graphics 3D Assets Portable XR Parallel Computation Desktop, Mobile, Web Authoring Augmented and Vision, Inferencing, Machine Embedded and Safety Critical and Delivery Virtual Reality Learning Guidelines for creating APIs to streamline system safety certification This work is licensed under a Creative Commons Attribution 4.0 International License © The Khronos® Group Inc. 2020 - Page 3 Pervasive Vulkan Desktop and Mobile GPUs http://vulkan.gpuinfo.org/ Platforms Apple Desktop Android (via porting Media Players Consoles (Android 7.0+) layers) (Vulkan 1.1 required on Android Q) Virtual Reality Cloud Services Game Streaming Embedded Engines Croteam Serious Engine Note: The version of Vulkan available will depend on platform and vendor This work is licensed under a Creative Commons Attribution 4.0 International License © The Khronos® Group Inc.
    [Show full text]
  • Openxr 1.0 Reference Guide Page 1
    OpenXR 1.0 Reference Guide Page 1 OpenXR™ is a cross-platform API that enables a continuum of real-and-virtual combined environments generated by computers through human-machine interaction and is inclusive of the technologies associated with virtual reality, augmented reality, and mixed reality. It is the interface between an application and an in-process or out-of-process XR runtime that may handle frame composition, peripheral management, and more. Color-coded names as follows: function names and structure names. [n.n.n] Indicates sections and text in the OpenXR 1.0 specification. Specification and additional resources at khronos.org/openxr £ Indicates content that pertains to an extension. OpenXR API Overview A high level overview of a typical OpenXR application including the order of function calls, creation of objects, session state changes, and the rendering loop. OpenXR Action System Concepts [11.1] Create action and action spaces Set up interaction profile bindings Sync and get action states xrCreateActionSet xrSetInteractionProfileSuggestedBindings xrSyncActions name = "gameplay" /interaction_profiles/oculus/touch_controller session activeActionSets = { "gameplay", ...} xrCreateAction "teleport": /user/hand/right/input/a/click actionSet="gameplay" "teleport_ray": /user/hand/right/input/aim/pose xrGetActionStateBoolean ("teleport_ray") name = “teleport” if (state.currentState) // button is pressed /interaction_profiles/htc/vive_controller type = XR_INPUT_ACTION_TYPE_BOOLEAN { actionSet="gameplay" "teleport": /user/hand/right/input/trackpad/click
    [Show full text]
  • Conference Booklet
    30th Oct - 1st Nov CONFERENCE BOOKLET 1 2 3 INTRO REBOOT DEVELOP RED | 2019 y Always Outnumbered, Never Outgunned Warmest welcome to first ever Reboot Develop it! And we are here to stay. Our ambition through Red conference. Welcome to breathtaking Banff the next few years is to turn Reboot Develop National Park and welcome to iconic Fairmont Red not just in one the best and biggest annual Banff Springs. It all feels a bit like history repeating games industry and game developers conferences to me. When we were starting our European older in Canada and North America, but in the world! sister, Reboot Develop Blue conference, everybody We are committed to stay at this beautiful venue was full of doubts on why somebody would ever and in this incredible nature and astonishing choose a beautiful yet a bit remote place to host surroundings for the next few forthcoming years one of the biggest worldwide gatherings of the and make it THE annual key gathering spot of the international games industry. In the end, it turned international games industry. We will need all of into one of the biggest and highest-rated games your help and support on the way! industry conferences in the world. And here we are yet again at the beginning, in one of the most Thank you from the bottom of the heart for all beautiful and serene places on Earth, at one of the the support shown so far, and even more for the most unique and luxurious venues as well, and in forthcoming one! the company of some of the greatest minds that the games industry has to offer! _Damir Durovic
    [Show full text]
  • Portable VR with Khronos Openxr
    Portable VR with Khronos OpenXR Kaye Mason, Nick Whiting, Rémi Arnaud, Brad Grantham July 2017 © Copyright Khronos Group 2016 - Page 1 Outline for the Session • Problem, Solution • Panelist Introductions • Technical Issues • Audience Questions • Lightning Round • How to Join • Party! © Copyright Khronos Group 2016 - Page 2 Problem Without a cross-platform standard, VR applications, games and engines must port to each vendors’ APIs. In turn, this means that each VR device can only run the apps that have been ported to its SDK. The result is high development costs and confused customers – limiting market growth. © Copyright Khronos Group 2016 - Page 3 Solution The cross-platform VR standard eliminates industry fragmentation by enabling applications to be written once to run on any VR system, and to access VR devices integrated into those VR systems to be used by applications. © Copyright Khronos Group 2016 - Page 4 Architecture OpenXR defines two levels of API interfaces that a VR platform’s runtime can use to access the OpenXR ecosystem. Apps and engines use standardized interfaces to interrogate and drive devices. Devices can self- integrate to a standardized driver interface. Standardized hardware/software interfaces reduce fragmentation while leaving implementation details open to encourage industry innovation. © Copyright Khronos Group 2016 - Page 5 OpenXR Participant Companies © Copyright Khronos Group 2016 - Page 6 Panelist Introduction • Kaye Mason Dr. Kaye Mason is a senior software engineer at Google and the API Lead for Google Daydream, as well as working on graphics and distortion. She is also the Specification Editor for the Khronos OpenXR standard. Kaye has a PhD in Computer Science from research focused on using AIs to do non- photorealistic rendering.
    [Show full text]
  • The Opengl ES Shading Language
    The OpenGL ES® Shading Language Language Version: 3.20 Document Revision: 12 246 JuneAugust 2015 Editor: Robert J. Simpson, Qualcomm OpenGL GLSL editor: John Kessenich, LunarG GLSL version 1.1 Authors: John Kessenich, Dave Baldwin, Randi Rost 1 Copyright (c) 2013-2015 The Khronos Group Inc. All Rights Reserved. This specification is protected by copyright laws and contains material proprietary to the Khronos Group, Inc. It or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast, or otherwise exploited in any manner without the express prior written permission of Khronos Group. You may use this specification for implementing the functionality therein, without altering or removing any trademark, copyright or other notice from the specification, but the receipt or possession of this specification does not convey any rights to reproduce, disclose, or distribute its contents, or to manufacture, use, or sell anything that it may describe, in whole or in part. Khronos Group grants express permission to any current Promoter, Contributor or Adopter member of Khronos to copy and redistribute UNMODIFIED versions of this specification in any fashion, provided that NO CHARGE is made for the specification and the latest available update of the specification for any version of the API is used whenever possible. Such distributed specification may be reformatted AS LONG AS the contents of the specification are not changed in any way. The specification may be incorporated into a product that is sold as long as such product includes significant independent work developed by the seller. A link to the current version of this specification on the Khronos Group website should be included whenever possible with specification distributions.
    [Show full text]
  • A Research Agenda for Augmented and Virtual Reality in Architecture
    Advanced Engineering Informatics 45 (2020) 101122 Contents lists available at ScienceDirect Advanced Engineering Informatics journal homepage: www.elsevier.com/locate/aei A research agenda for augmented and virtual reality in architecture, T engineering and construction ⁎ ⁎ Juan Manuel Davila Delgadoa, , Lukumon Oyedelea, , Peter Demianc, Thomas Beachb a Big Data Enterprise and Artificial Intelligence Laboratory, University of West of England Bristol, UK b School of Engineering, Cardiff University, UK c School of Architecture, Building and Civil Engineering, Loughborough University, UK ARTICLE INFO ABSTRACT Keywords: This paper presents a study on the usage landscape of augmented reality (AR) and virtual reality (VR) in the Augmented reality architecture, engineering and construction sectors, and proposes a research agenda to address the existing gaps Virtual reality in required capabilities. A series of exploratory workshops and questionnaires were conducted with the parti- Construction cipation of 54 experts from 36 organisations from industry and academia. Based on the data collected from the Immersive technologies workshops, six AR and VR use-cases were defined: stakeholder engagement, design support, design review, Mixed reality construction support, operations and management support, and training. Three main research categories for a Visualisation future research agenda have been proposed, i.e.: (i) engineering-grade devices, which encompasses research that enables robust devices that can be used in practice, e.g. the rough and complex conditions of construction sites; (ii) workflow and data management; to effectively manage data and processes required by ARandVRtech- nologies; and (iii) new capabilities; which includes new research required that will add new features that are necessary for the specific construction industry demands.
    [Show full text]
  • The State of Vulkan on Apple 03June 2021
    The State of Vulkan on Apple Devices Why you should be developing for the Apple ecosystem with Vulkan, and how to do it. Richard S. Wright Jr., LunarG June 3, 2021 If you are reading this, you likely already know what Vulkan is -- a low-overhead, high-performance, cross-platform, graphics and compute API designed to take maximum advantage of today's highly parallel and scalable graphics and compute hardware. To be sure, there are other APIs with this goal such as Microsoft’s DirectX and Apple’s Metal API. For a long time OpenGL matured to meet the needs of rapidly evolving hardware and met well the challenges of cross-platform development of high-performance graphics applications. OpenGL will remain viable for a very long time for many applications (and can actually be layered on top of Vulkan), but to take maximum advantage of modern hardware, a new and somewhat reinvented approach is called for. Everyone does not need the level of control that Vulkan provides, but if you do, you can think of Vulkan as a lower-level successor to OpenGL in that it attempts to enable highly portable, yet high-performance, application development across desktop and mobile device platforms. Writing platform specific code does have its advantages, and vendors such as Microsoft and Apple certainly adore having best of breed titles available exclusively for their customers as it adds value to their ecosystem. For developers though, it is often in our best interests to make our products available as widely as possible. Aside from gaming consoles with their mostly closed development environments, Windows, Linux, Apple, and Android combined represent most of the market for developers of end user software and games today.
    [Show full text]