Distributed VR Rendering Using NVIDIA OptiX

Virtual reality is rapidly becoming a pervasive component in the field of computing. From head mounted displays to CAVE virtual environments, realism in user immersion has continued to increase dramatically. While user interaction has made significant gains in the past few years, visual quality within the virtual environment has not. Many CAVE frameworks are built on libraries that use rasterization methods which limit the extent to which complex lighting models can be implemented. In this paper, we seek to remedy this issue by introducing the NVIDIA OptiX real-time raytracing framework to the CAVE virtual environment. A rendering engine was first developed using NVIDIA OptiX before being ported to the CalVR virtual reality framework, which allows running OptiX in CAVE environments as well as modern consumer HMDs such as the Oculus Rift. Introduction Before delving into the solution, it is important to understand the problem. Equally as important, we must know how we have arrived at this problem. Advancements have been made in the field of computer graphics driven by different motivations. On one end, there is interactive rendering. Rendering in which a user is able to move around the scene, move objects within the scene, or move the scene itself. The advancements in this region have been largely motivated by the gaming industry, visualization, and computeraided design to name a few. In these applications, interactive frame rates are integral to a usable product. On the other end, there is photorealistic rendering, a field which has been largely motivated by the special effects industry as well as advertisement. It is often more possible to create a good looking view of a product by using photorealistic rendering rather than having to deal with complex lighting systems and cameras to capture a photograph in a physical environment. Similarly, it is often easier (and sometimes necessary) to create a frame of a movie through rendering techniques to allow for unreal appearances or to cut cost of production. In recent years though, there has been an increased need to have realism in virtual environments. As virtual reality becomes more a part of our every day lives, it too becomes integrated with other fields within academia as well as in industry. Virtual reality has become a key part of training within the military. Service men and women are currently being trained using head mounted displays, omni-directional treadmills, and virtual cockpits. In this sense, it is imperative to create a sense of realism for the individual in training. A lack of realism could lead to a disconnect to one’s training when out in the field. Another field in which virtual reality applications have seen a marked increase in quantity is the field of medicine. Whether it is for surgical training or phobia treatment, the desire for realism stands. In this publication we describe how we integrated the NVIDIA Optix [12] real-time raytracing library into our virtual reality framework CalVR [11] so that we can render VR environments interactively. Related Work As previously mentioned, knowing where to start building a solution requires knowledge not only of the problem itself, but why the problem exists in the first place and how it developed. Before the 1970s, shading methods were performed on a coarse-grained polygon level until the introduction of shading models which more realistically modeled lighting and materials within the real world. Diffuse shading on the polygon level a method developed by Gouraud [5], was the method of choice for rendering at this time until 1974 when Phong [6] and Blinn [7] introduced specular shading on the fragment (pixel) granularity. By the 1980s and 1990s, a lot more focus had been dedicated to the implementation of complex lighting models. Various methods such as ray tracing introduced by Whitted [8], Radiosity by Goral/Torrance [9], and path tracing developed by Kajiya [10], were able to achieve new levels of lighting complexity that existing methods could not. The development of physically accurate lighting models has been an important factor which has brought us to the visual results we see in graphics applications every day. Over the years, there has been a great divergence between the interactive and photorealistic sectors of the field of Computer Graphics. Today, there are various libraries to choose from for development of interactive graphics applications. Some examples include OpenGL, a cross platform API, and DirectX, a Windowsspecific graphics API. Over the years, much of the focus has been on increasing the amount of geometry within a scene while maintaing interactive frame rates as well as efficient texturing techniques. Unfortunately, very few tweaks for realism have been made over the years. Real-world phenomena such as shadows have been poorly addressed within the world of interactive graphics. Current methods only allow for hard shadows to be rendered at interactive frame rates within these graphics APIs. Photorealistic rendering has seen many more techniques introduced since the 1990s such as bi-directional path tracing, Metropolis Light Transport, and Photon Mapping. These techniques allow for high levels of realism by allowing global illumination, realistic soft shadowing, and refraction through multiple media. Historically, though, these methods are very slow. To generate a single frame using these complex algorithmic methods, it may take minutes, hours, or even days. Motivation In comparing the two methods of polygonal rendering and ray tracing, a distinguishing factor emerges. In interactive, polygonal graphics, much of the time spent generating a frame for display on the screen is spent sending data to the GPU. Interactive graphics relies on a method called rasterization; an inherently serial process. For each object in a given scene, all data must be directed to the GPU serially. Current frameworks implement the aforementioned Z-buffer algorithm for determining object depth with respect to a specific viewer. As such, generation of visual data in an interactive rendering context is not conducive to multithreading. Ray tracing, a photorealistic rendering technique, is an inherently parallel workload. This allows implementation to take advantage of multiple processing units in parallel. This is especially attractive when considering scalability. Rasterization techniques find performance increases in determining what is able to be avoided whereas photorealistic rendering is driven by the desire to achieve better results based on what is even possible with lighting models that have yet been discovered. Normally, CAVE environments are mechanized by a cluster of nodes, where each node is dedicated to generating display data for a specific screen or set of screens within the viewing region. In the context of photorealistic rendering, this lends itself perfectly to the idea of parallelization. For a given scene, the workload can easily be divided amongst various nodes within the cluster to generate various parts of the frame which can be stitched together to form a complete image.