Scalable Immersive Audio for Virtual Environments
Total Page:16
File Type:pdf, Size:1020Kb
Scalable Immersive Audio for Virtual Environments By Mirza Beig A Thesis Submitted in Partial Fulfillment of the Requirements for the Degree of Master of Science in Computer Science University of Ontario Institute of Technology Supervisors: Dr. Bill Kapralos and Dr. Pejman Mirza-Babaei May 2018 Copyright © Mirza Beig, 2018 P a g e | 2 Abstract This thesis discusses the history of game sound and how it developed to become increasingly more immersive and realistic by accounting for the spatial aspects of sound. It then compares several 3D sound technologies before continuing on to present a custom spatial sound system that uses the highly parallel nature of modern graphics processing units (GPUs) to process large amounts of data for simulated sound propagation. In a real-time virtual reality game environment, the system is able to handle dynamic geometry and movable sound sources in full 3D at interactive rates. To test the implementation, I developed a VR-compatible video game for desktop and mobile platforms with an emphasis on play-by-sound gameplay mechanics. Results demonstrated low overhead on all devices tested when used with the appropriate pathfinding backend (CPU/GPU). Additional testing yielded that the GPU part of the system is capable of processing several thousand 3D paths at interactive rates. P a g e | 3 Acknowledgements I would like to gratefully acknowledge the support of both my parents who helped me not only all the way through my masters, but all throughout my life as well. I would also like to thank my exceptionally helpful supervisors, Dr. Bill Kapralos and Dr. Pejman Mirza-Babaei, who constantly gave me direct input and were available for advice when I needed it. I would not have gotten into this program and had the remarkable support that I did if it wasn’t also for additional professors such as Dr. Andrew Hogue, Dr. Lennart Nacke, Dr. Karen Collins, Dr. Richard Pazzi, and James Robb. I’d also like to thank the committee members Dr. Alvarro Joffre Uribe Quevedo and Dr. Loutfouz Zaman who gave me feedback after reviewing my thesis. I’d like to thank all my friends who made my journey more fun. A special shout-out goes to Naeem Moosajee, who advised me to get involved with doing my masters early on, as well as Albert Bushara, Lucas Lupinski, and Oliver Pollard. They all showed up when I was sick with yummy chocolates. That was pretty cool. Finally, the financial support of the Social Sciences and Humanities Research of Council of Canada (Insight grant led by Dr. Karen Collins) is gratefully acknowledged. P a g e | 4 Table of Contents Abstract ......................................................................................................................................................... 2 Acknowledgements ....................................................................................................................................... 3 Table of Contents .......................................................................................................................................... 4 List of Figures ................................................................................................................................................ 8 List of Tables ............................................................................................................................................... 10 List of Code.................................................................................................................................................. 11 Acronyms .................................................................................................................................................... 12 Chapter 1: Introduction .............................................................................................................................. 14 1.1 Overview ........................................................................................................................................... 14 1.2 Motivation ......................................................................................................................................... 14 1.3 Thesis Statement ............................................................................................................................... 16 1.4 Thesis Outline .................................................................................................................................... 17 1.5 Summary ........................................................................................................................................... 17 Chapter 2: Literature Review ...................................................................................................................... 19 2.1 Overview ........................................................................................................................................... 19 2.2 Video Games ..................................................................................................................................... 19 2.3 The Importance of Game State Feedback......................................................................................... 20 2.4 Localizing Sounds and Establishing Presence in Virtual Environments ............................................ 22 2.5 Sound Source Localization: Direction ............................................................................................... 24 2.5.1 Overview .................................................................................................................................... 24 2.5.2 Binaural Cues: ITD and ILD ......................................................................................................... 24 2.5.3 Monaural Cue: Spectral Cue / HRTFs ......................................................................................... 26 2.6 Sound Source Localization: Distance ................................................................................................ 27 2.7 Sound Source Localization: Acuity .................................................................................................... 28 2.8 Sound Source Localization: The Environment .................................................................................. 29 2.8.1 Reflections and Reverb .............................................................................................................. 29 2.8.2 Parametric Reverb ..................................................................................................................... 32 2.8.3 Convolution Reverb ................................................................................................................... 33 2.8.4 Occlusion, Obstruction, Transmission, and Diffraction ............................................................. 35 2.9 Acoustical Modelling ......................................................................................................................... 37 P a g e | 5 2.9.1 Overview .................................................................................................................................... 37 2.9.2 Distance, Velocity, and Directionality ........................................................................................ 38 2.9.3 Impulse Response ...................................................................................................................... 39 2.9.4 Wave-Based Acoustics ............................................................................................................... 40 2.9.5 Geometrical Acoustics-Based Acoustics .................................................................................... 42 2.9.6 Geometrical Acoustics: The Image-Source Method .................................................................. 42 2.9.7 Geometrical Acoustics: Ray Tracing ........................................................................................... 43 2.9.8 Geometrical Acoustics: Beam Tracing........................................................................................ 44 2.9.9 Geometrical Acoustics: Diffraction ............................................................................................ 44 2.10 Summary ......................................................................................................................................... 45 Chapter 3: The History of Sound in Video Games ....................................................................................... 47 3.1 Overview ........................................................................................................................................... 47 3.2 The Early Years .................................................................................................................................. 47 3.3 The First Generation: Silence, Bleeps, and Bloops ............................................................................ 48 3.4 The Second Generation: Programmable Game Sound and Synths .................................................. 48 3.5 Home Computers and the Fourth Generation: DSP and Stereo for Everyone ................................. 49 3.6 Enter the CD-ROM: Massive Storage = Quality Sampled Audio ....................................................... 50 3.7 First-Person Shooters: Play-by-Sound Mechanics ............................................................................ 50 3.8 Surround Sound and 3D Audio: Maximum Localization ..................................................................