A Case Study in Implementation-Space Exploration - Lier, Alexander; Franke, Linus; Stamminger, Marc; Selgrad, Kai (Proceedings of the 9th European Lisp Symposium on European Lisp Symposium, 2016)
In this paper we show how a feature-oriented development methodology can be exploited to investigate a large set of possible implementations for a real-time rendering algorithm. We rely on previously published work to explore potential dimensions of the implementation space of an algorithm to be run on a graphics processing unit (GPU) using CUDA. The main contribution of our paper is to provide a clear example of the benefit to be gained from existing methods in a domain that only slowly moves toward higher level abstractions. Our method employs a generative approach and makes heavy use of Common Lisp-macros before the code is ultimately transformed to CUDA.
Keywords: Meta-Programming; Real-time; Rendering algorithms

A Compressed Representation for Ray Tracing Parametric Surfaces - Selgrad, Kai; Lier, Alexander; Martinek, Magdalena; Buchenau, Christoph; Guthe, Michael; Kranz, Franziska; Schäfer, Henry; Stamminger, Marc (ACM Transactions on Graphics, 2017)
Parametric surfaces are an essential modeling tool in computer aided design and movie production. Even though their use is well established in industry, generating ray-traced images adds significant cost in time and memory consumption. Ray tracing such surfaces is usually accomplished by subdividing the surfaces on the fly, or by conversion to a polygonal representation. However, on-the-fly subdivision is computationally very expensive, whereas polygonal meshes require large amounts of memory. This is a particular problem for parametric surfaces with displacement, where very fine tessellation is required to faithfully represent the shape. Hence, memory restrictions are the major challenge in production rendering. In this article, we present a novel solution to this problem. We propose a compression scheme for a priori Bounding Volume Hierarchies (BVHs) on parametric patches, that reduces the data required for the hierarchy by a factor of up to 48. We further propose an approximate evaluation method that does not require leaf geometry, yielding an overall reduction of memory consumption by a factor of 60 over regular BVHs on indexed face sets and by a factor of 16 over established state-of-the-art compression schemes. Alternatively, our compression can simply be applied to a standard BVH while keeping the leaf geometry, resulting in a compression rate of up to 2:1 over current methods. Although decompression generates additional costs during traversal, we can manage very complex scenes even on the memory restrictive GPU at competitive render time

A High-Performance Image Processing DSL for Heterogeneous Architectures - Selgrad, Kai; Lier, Alexander; Dörntlein, Jan; Reiche, Oliver; Stamminger, Marc (Proceedings of ELS 9th European Lisp Symposium, 2016)
Over the last decade a number of high performance, domain-specific languages (DSLs) have started to grow and help tackle the problem of ever diversifying hard- and software employed in fields such as HPC (high performance computing), medical imaging, computer vision etc. Most of those approaches rely on frameworks such as LLVM for efficient code generation and, to reach a broader audience, take input in C-like form. In this paper we present a DSL for image processing that is on-par with competing methods, yet its design principles are in strong contrast to previous approaches. Our tool chain is much simpler, easing the burden on implementors and maintainers, while our output, C-family code, is both adaptable and shows high performance. We believe that our methodology provides a faster evaluation of language features and abstractions in the domains above.
Keywords: GRK-1773

Defmacro for C: Lightweight, Ad Hoc Code Generation - Selgrad, Kai; Lier, Alexander; Wittmann, Markus; Lohmann, Daniel; Stamminger, Marc (Proceedings of ELS 2014 7th European Lisp Symposium, 2014)
We describe the design and implementation of CGen, a C code generator with support for Common Lisp-style macroexpansion. Our code generator supports the simple and efficient management of variants, ad hoc code generation to capture reoccurring patterns, composable abstractions as well as the implementation of embedded domain specific languages by using the Common Lisp macro system. We demonstrate the applicability of our approach by numerous examples from small scale convenience macros over embedded languages to real-world applications in high-performance computing.
Keywords: GRK-1773

DIY Meta Languages with Common Lisp. - Lier, Alexander; Selgrad, Kai; Stamminger, Marc (Proceedings of the 10th European Lisp Symposium, 2017)
In earlier work we described C-Mera, an S-Expression to C-style code transformator, and how it can be used to provide high-level abstractions to the C-family of programming languages. In this paper we provide an in-depth description of its internals that would have been out of the scope of the earlier presentations. These implementation details are presented as a toolkit of general techniques for implementing similar meta languages on top of Common Lisp and illustrated on the example of C-Mera, with the goal of making our experience in implementing them more broadly available.

Efficient Ray Tracing of Subdivision Surfaces using Tessellation Caching - Nießner, Matthias; Selgrad, Kai; Woop, Sven; Benthin, Carsten; et al. (Proceedings of the 7th High-Performance Graphics Conference, 2015)
UnivIS-Import:2015-07-08:Pub.2015.tech.IMMD.IMMD9.effici

Efficient Visibility Queries and Metalinguistic Abstractions for Graphics Algorithms - Selgrad, Kai (Verlag Dr. Hut, 2017)
UnivIS-Import:2017-07-10:Pub.2017.tech.IMMD.IMMD9.effici

Faster Ray-Traced Shadows for Hybrid Rendering of Fully Dynamic Scenes by Pre-BVH Culling - Selgrad, Kai; Müller, Jonas; Stamminger, Marc (Proc. Smart Tools and Apps for Graphics, 2015)
UnivIS-Import:2015-10-26:Pub.2015.tech.IMMD.IMMD9.improv
Keywords: GRK-1773

Fast Shadow Map Rendering for Many-Lights Settings - Selgrad, Kai; Müller, Jonas; Reintges, Christian; Stamminger, Marc (Eurographics Symposium on Rendering - Experimental Ideas & Implementations, 2016)
In this paper we present a method to efficiently cull large parts of a scene prior to shadow map computations for many-lights settings. Our method is agnostic to how the light sources are generated and thus works with any method of light distribution. Our approach is based on previous work in culling for ray traversal to speed up area light sampling. Applied to shadow mapping our method works for high- and low-resolution shadow maps and, in contrast to previous work on many-lights rendering, does neither entail scene approximations nor imposes limits on light range, while still providing significant gains in performance. In contrast to standard culling methods shadow map rendering itself is sped up by a factor of 1.5 to 8.6 while the speedup of shadow map rendering, lookup and shading together ranges from 1.1 to 4.2.
UnivIS-Import:2017-01-09:Pub.2016.tech.IMMD.IMMD9.fastsh

Filtering Multilayer Shadow Maps for Accurate Soft Shadows - Selgrad, Kai; Dachsbacher, Carsten; Meyer, Quirin; Stamminger, Marc (Computer Graphics Forum, 2014)
UnivIS-Import:2015-03-09:Pub.2014.tech.IMMD.IMMD9.filter

Hierarchical Multi-Layer Screen-Space Ray Tracing - Hofmann, Nikolai; Bogendörfer, Phillip; Stamminger, Marc; Selgrad, Kai (Proceedings of the 9th High-Performance Graphics Conference, 2017)
In this paper we present a method for fast screen-space ray tracing. Single-layer screen-space ray marching is an established tool in high-performance applications, such as games, where plausible and appealing results are more important than strictly correct ones. However, even in such tightly controlled environments, missing scene information can cause visible artifacts. This can be tackled by keeping multiple layers of screen-space information, but might not be afforable on severely limited time-budgets. Traversal speed of single-layer ray marching is commonly improved by multi-resolution schemes, from sub-sampling to stepping through mip-maps to achieve faster frame rates. We show that by combining these approaches, keeping multiple layers and tracing on multiple resolutions, images of higher quality can be computed rapidly. Figure 1 shows this for two scenes with multi-bounce reflections that would show strong artifacts when using only a single laye
UnivIS-Import:2017-07-10:Pub.2017.tech.IMMD.IMMD9.hierar

Lightweight, generative variant exploration for high-performance graphics applications - Selgrad, Kai; Lier, Alexander; Köferl, Franz; Stamminger, Marc; Lohmann, Daniel (ACM Bd. 51, Nr. 3, 2015)
Rendering performance is an everlasting goal of computer graphics and significant driver for advances in both, hardware architecture and algorithms. Thereby, it has become possible to apply advanced computer graphics technology even in low-cost embedded appliances, such as car instruments. Yet, to come up with an efficient implementation, developers have to put enormous efforts into hardware/problem-specific tailoring, fine-tuning, and domain exploration, which requires profound expert knowledge. If a good solution has been found, there is a high probability that it does not work as well with other architectures or even the next hardware generation. Generative DSL-based approaches could mitigate these efforts and provide for an efficient exploration of algorithmic variants and hardware-specific tuning ideas. However, in vertically organized industries, such as automotive, suppliers are reluctant to introduce these techniques as they fear loss of control, high introduction costs, and additional constraints imposed by the OEM with respect to software and tool-chain certification. Moreover, suppliers do not want to share their generic solutions with the OEM, but only concrete instances. To this end, we propose a light-weight and incremental approach for meta programming of graphics applications. Our approach relies on an existing formulation of C-like languages that is amenable to meta programming, which we extend to become a lightweight language to combine algorithmic features. Our method provides a concise notation for meta programs and generates easily sharable output in the appropriate C-style target language.

Real-time Depth of Field using Multi-Layer Filtering - Selgrad, Kai; Reintges, Christian; Penk, Dominik; Wagner, Pascal; Stamminger, Marc (Proceedings of the ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games 2015, 2015)
We present a novel technique for rendering depth of field that addresses difficult overlap cases, such as close, but out-of-focus, geometry in the near-field. Such scene configurations are not managed well by state-of-the-art post-processing approaches since essential information is missing due to occlusion. Our proposed algorithm renders the scene from a single camera position and computes a layered image using a single pass by constructing per-pixel lists. These lists can be filtered progressively to generate differently blurred representations of the scene. We show how this structure can be exploited to generate depth of field in real-time, even in complicated scene constellations.
UnivIS-Import:2015-04-17:Pub.2015.tech.IMMD.IMMD9.realti
Keywords: GRK-1773

Real-time Simulation of Human Vision using Temporal Compositing with CUDA on the GPU - Nießner, Matthias; Kuhnert, Nadine; Selgrad, Kai; Stamminger, Marc; Michelson, Georg (Proceedings 25th Workshop on Parallel Systems and Algorithms (PARS 2013), 2013)
We present a novel approach that simulates human vision including visual defects such as glaucoma by temporal composition of human vision in real-time on the GPU. Therefore, we determine eye focus points every time step and adapt the lens accommodation of our virtual eye model accordingly. The focal distance is then used to determine bluriness of observed scene regions; i.e., we compute defocus for all visible pixels. In order to simulate the visual memory we introduce a sharpness field where we integrate defocus values temporally. That allows for memorizing sharply perceived scene points. For visualization, we ray trace the virtual scene environment while incorporating depth of field based on the sharpness field data. Thus, our algorithm facilitates the simulation of human vision mimicing the visual memory. We consider this to be particularly useful for illustration purposes for patients with visual defects such as glaucoma. In order to run our algorithm in real-time we employ massively parallel graphics hardware.
UnivIS-Import:2015-04-16:Pub.2013.tech.IMMD.IMMD9.realti_9
Keywords: GRK-1773

Tiled Depth of Field Splatting - Selgrad, Kai; Franke, Linus; Stamminger, Marc (Eurograhpics 2016 - Posters, 2016)
UnivIS-Import:2016-06-01:Pub.2016.tech.IMMD.IMMD9.tiledd
Keywords: GRK 1773