Moments in Graphics
http://momentsingraphics.de/
A blog by Christoph Petersen-usWed, 28 Aug 2019 08:37:52 -0000http://backend.userland.com/rssBlogRedesign of the blogOver the past year, I have gotten dissatisfied with the setup of my blog. Discoverability of posts was not particularly good, maintenance work began to outgrow the work for new content and I grew tired of the Wordpress layout. Rather than fixing each issue individually, I decided to turn the whole thing into a static HTML page generated by my own set of Python scripts. The resulting redesign will hopefully make it easier for you to find the posts you care about and to read them without distraction and for me to create them. The following post discusses the changes in more detail.Tue, 27 Aug 2019 00:00:00 -0000
http://momentsingraphics.de/MetaPost2.html
http://momentsingraphics.de/MetaPost2.htmlBlogVoid-and-Cluster Sampling of Large Scattered Data and TrajectoriesWe propose a data reduction technique for scattered data based on statistical sampling. Our void-and-cluster sampling technique finds a representative subset that is optimally distributed in the spatial domain with respect to the blue noise property. In addition, it can adapt to a given density function, which we use to sample regions of high complexity in the multivariate value domain more densely. Moreover, our sampling technique implicitly defines an ordering on the samples that enables progressive data loading and a continuous level-of-detail representation. We extend our technique to sample time-dependent trajectories, for example pathlines in a time interval, using an efficient and iterative approach. Furthermore, we introduce a local and continuous error measure to quantify how well a set of samples represents the original dataset. We apply this error measure during sampling to guide the number of samples that are taken. Finally, we use this error measure and other quantities to evaluate the quality, performance, and scalability of our algorithm.Thu, 01 Aug 2019 00:00:00 -0000
http://momentsingraphics.de/Vis2019.html
http://momentsingraphics.de/Vis2019.htmlPublicationUsing Moments to Represent Bounded Signals for Spectral RenderingWe present a compact and efficient representation of spectra for accurate rendering using more than three dimensions. While tristimulus color spaces are sufficient for color display, a spectral renderer has to simulate light transport per wavelength. Consequently, emission spectra and surface albedos need to be known at each wavelength. It is practical to store dense samples for emission spectra but for albedo textures, the memory requirements of this approach are unreasonable. Prior works that approximate dense spectra from tristimulus data introduce strong errors under illuminants with sharp peaks and in indirect illumination. We represent spectra by an arbitrary number of Fourier coefficients. However, we do not use a common truncated Fourier series because its ringing could lead to albedos below zero or above one. Instead, we present a novel approach for reconstruction of bounded densities based on the theory of moments. The core of our technique is our bounded maximum entropy spectral estimate. It uses an efficient closed form to compute a smooth signal between zero and one that matches the given Fourier coefficients exactly. Still, a ground truth that localizes all of its mass around a few wavelengths can be reconstructed adequately. Therefore, our representation covers the full gamut of valid reflectances. The resulting textures are compact because each coefficient can be stored in 10 bits. For compatibility with existing tristimulus assets, we implement a mapping from tristimulus color spaces to three Fourier coefficients. Using three coefficients, our technique gives state of the art results without some of the drawbacks of related work. With four to eight coefficients, our representation is superior to all existing representations. Our focus is on offline rendering but we also demonstrate that the technique is fast enough for real-time rendering.Mon, 01 Jul 2019 00:00:00 -0000
http://momentsingraphics.de/Siggraph2019.html
http://momentsingraphics.de/Siggraph2019.htmlPublicationSpectral Rendering with the Bounded MESE and sRGB DataIn a recent journal paper, we introduced a technique to represent reflectance spectra by an arbitrary number of Fourier coefficients. As a special case, we converted tristimulus data to three Fourier coefficients. After summarizing this work, we introduce the Fourier sRGB color space. It is defined in terms of Fourier coefficients but designed to behave similar to sRGB. Textures stored in Fourier sRGB support efficient spectral rendering but can be compressed with techniques designed for sRGB textures. Compression errors are similar to sRGB.Mon, 01 Jul 2019 00:00:00 -0000
http://momentsingraphics.de/MAM2019.html
http://momentsingraphics.de/MAM2019.htmlPublicationSampling projected spherical caps with multiple importance samplingThis blog post answers a question that Tomáš Davidovič from Weta Digital had about the recently published projected solid angle sampling for spherical caps. In Monte Carlo rendering, it is very common to combine several sampling techniques through multiple importance sampling. In this case, any of the sampling techniques may produce a sample and then you need to compute the probability density for producing this sample with each of the other techniques.Mon, 10 Jun 2019 00:00:00 -0000
http://momentsingraphics.de/SphericalCapMIS.html
http://momentsingraphics.de/SphericalCapMIS.htmlBlogSampling Projected Spherical Caps in Real TimeStochastic shading with area lights requires methods to sample the light sources. For diffuse materials, the best strategy is to sample proportionally to projected solid angle. Recent work in offline rendering has addressed this problem for spherical light sources, but the solution is unsuitable for a GPU implementation. We present a far more efficient solution. It offers results without noteworthy noise for diffuse surfaces lit by an unoccluded spherical light source while being only two to three times more costly than simple sampling of the solid angle. The core insight of the technique is that a projected spherical cap can be decomposed into, or at least approximated by, cut disks. We present an efficient method to sample cut disks and show how to use it to sample projected spherical caps. In some cases, our method does not sample exactly proportionally to projected solid angle but the deviation is provably bounded.Sat, 01 Jun 2019 00:00:00 -0000
http://momentsingraphics.de/I3D2019.html
http://momentsingraphics.de/I3D2019.htmlPublicationA brief postscript on moment-based order-independent transparencyBack in May, we published moment-based order-independent transparency (MBOIT) at the Symposium on Interactive 3D Graphics and Games 2018. This brief post follows up on two things; a similar but independent work and some missing code.Thu, 23 Aug 2018 00:00:00 -0000
http://momentsingraphics.de/MissingTMBOITCode.html
http://momentsingraphics.de/MissingTMBOITCode.htmlBlogGradient Estimation for Real-time Adaptive Temporal FilteringWith the push towards physically based rendering, stochastic sampling of shading, e.g. using path tracing, is becoming increasingly important in real-time rendering. To achieve high performance, only low sample counts are viable, which necessitates the use of sophisticated reconstruction filters. Recent research on such filters has shown dramatic improvements in both quality and performance. They exploit the coherence of consecutive frames by reusing temporal information to achieve stable, denoised results. However, existing temporal filters often create objectionable artifacts such as ghosting and lag. We propose a novel temporal filter which analyzes the signal over time to derive adaptive temporal accumulation factors per pixel. It repurposes a subset of the shading budget to sparsely sample and reconstruct the temporal gradient. This allows us to reliably detect sudden changes of the sampled signal and to drop stale history information. We create gradient samples through forward-projection of surface samples from the previous frame into the current frame and by reevaluating the shading samples using the same random sequence. We apply our filter to improve real-time path tracers. Compared to previous work, we show a significant reduction of lag and ghosting as well as improved temporal stability. Our temporal filter runs in 2 ms at 1080p on modern graphics hardware and can be integrated into deferred renderers.Wed, 01 Aug 2018 00:00:00 -0000
http://momentsingraphics.de/HPG2018.html
http://momentsingraphics.de/HPG2018.htmlPublicationMoment-Based Order-Independent TransparencyCompositing transparent surfaces rendered in an arbitrary order requires techniques for order-independent transparency. Each surface color needs to be multiplied by the appropriate transmittance to the eye to incorporate occlusion. Building upon moment shadow mapping, we present a moment-based method for compact storage and fast reconstruction of this depth-dependent function per pixel. We work with the logarithm of the transmittance such that the function may be accumulated additively rather than multiplicatively. Then an additive rendering pass for all transparent surfaces yields moments. Moment-based reconstruction algorithms provide approximations to the original function, which are used for compositing in a second additive pass. We utilize existing algorithms with four or six power moments and develop new algorithms using eight power moments or up to four trigonometric moments. The resulting techniques are completely order-independent, work well for participating media as well as transparent surfaces and come in many variants providing different tradeoffs. We also utilize the same approach for the closely related problem of computing shadows for transparent surfaces.Sun, 01 Jul 2018 00:00:00 -0000
http://momentsingraphics.de/I3D2018.html
http://momentsingraphics.de/I3D2018.htmlPublicationMoment-Based Methods for Real-Time Shadows and Fast Transient ImagingWir wenden die Theorie der Momente auf Probleme des Visual Computings an. Aus dieser Theorie entwickeln wir effiziente Algorithmen, die eindimensionale Verteilungen durch eine geschlossene Form aus ihren Momenten rekonstruieren. Solche Rekonstruktionen nutzen aus, dass die ursprünglichen Verteilungen keine negativen Massen beinhalten. Dadurch können sie vor allem bei Verteilungen, die um wenige Punkte lokalisiert sind, mit wenigen Momenten außerordentlich gute Rekonstruktionen erreichen. Wir wenden diese Verfahren auf Messwerte von AMCW Lidar Systemen an. So erhalten wir für jeden Pixel dieser Lichtlaufzeitkameras eine vollständige Rekonstruktion der Impulsantwort des Lichts und können insbesondere Interferenzeffekte beseitigen. Außerdem betrachten wir das Rendern von Schatten in Echtzeitanwendungen. Speichert man Momente in einer Shadow Map, kann man diese direkt filtern und so effizient Aliasing vorbeugen. Durch diese direkte Filterung wird auch die Darstellung von weichen Schatten und atmosphärischer Lichtstreuung ermöglicht.Tue, 01 May 2018 00:00:00 -0000
http://momentsingraphics.de/LNI2018.html
http://momentsingraphics.de/LNI2018.htmlPublicationMy dissertation is available nowMy dissertation has been published digitially and is now available in its entirety as a free download. Most results have been published before through my papers at i3D 2015, SIGGRAPH Asia 2015 and JCGT. Though, there is some entirely new material. Since I spent a lot of time writing it, there better be somebody to read parts of it. Below I'll try to wet your appetite.Sun, 31 Dec 2017 00:00:00 -0000
http://momentsingraphics.de/DissertationAnnouncement.html
http://momentsingraphics.de/DissertationAnnouncement.htmlBlogMoment-Based Methods for Real-Time Shadows and Fast Transient ImagingWe apply the theory of moments to develop computationally efficient methods for real-time rendering of shadows and reconstruction of transient images from few measurements. Given moments of an unknown probability distribution, i.e. the expectations of known, real random variables, the theory of moments strives to characterize all distributions that could have led to these moments. Earlier works in computer graphics only use the most basic results of this powerful theory.Fri, 01 Dec 2017 00:00:00 -0000
http://momentsingraphics.de/Dissertation.html
http://momentsingraphics.de/Dissertation.htmlPublicationDemo with non-linearly quantized moment shadow maps and moreMy recent paper on non-linearly quantized moment shadow maps promises an executable demo. Preparing that took a little longer than expected but to make up for the delay, the demo has plenty of new features. Most notably it now uses dear imgui and includes the applications of blue noise I blogged about earlier. Rather than showing off the new technique only, this demo is an extension of earlier demos, so it also features soft shadows, single scattering and shadows for translucent occluders.Tue, 05 Sep 2017 00:00:00 -0000
http://momentsingraphics.de/HPG2017Demo.html
http://momentsingraphics.de/HPG2017Demo.htmlBlogNon-linearly Quantized Moment Shadow MapsMoment shadow maps enable direct filtering to accomplish proper antialiasing of dynamic hard shadows. For each texel, the moment shadow map stores four powers of the depth in either 64 or 128 bits. After filtering, this information enables a heuristic reconstruction. However, the rounding errors introduced at 64 bits per texel necessitate a bias that strengthens light leaking artifacts noticeably. In this paper, we propose a non-linear transform which maps the four moments to four quantities describing the depth distribution more directly. These quantities can then be quantized to a total of 32 or 64 bits. At 64 bits, the results are virtually indistinguishable from moment shadow mapping at 128 bits per texel. Even at 32 bits, there is hardly any additional light leaking but banding artifacts may occur. At the same time, the computational overhead for the reconstruction is reduced. As a prerequisite for the use of these quantization schemes, we propose a compute shader that applies a resolve for a multisampled shadow map and a 9² two-pass Gaussian filter in shared memory. The quantized moments are written back to device memory only once at the very end. This approach makes our technique roughly as fast as variance shadow mapping with 32 bits per texel. Since hardware-accelerated bilinear filtering is incompatible with non-linear quantization, we employ blue noise dithering as inexpensive alternative to manual bilinear filtering.Sat, 01 Jul 2017 00:00:00 -0000
http://momentsingraphics.de/HPG2017.html
http://momentsingraphics.de/HPG2017.htmlPublicationJCGT extension out nowThe invited extension of our i3D 2016 paper is now published in the Journal of Computer Graphics Techniques. It discusses techniques for real-time soft shadows, single scattering and shadows for translucent occluders with some novel improvements. All of these techniques are based on moment shadow mapping and the paper also introduces improvements to moment shadow mapping itself.Thu, 30 Mar 2017 00:00:00 -0000
http://momentsingraphics.de/JCGTAnnouncement.html
http://momentsingraphics.de/JCGTAnnouncement.htmlBlogImproved Moment Shadow Maps for Translucent Occluders, Soft Shadows and Single ScatteringLike variance shadow maps, the recently proposed moment shadow maps can be filtered directly but they provide a substantially higher quality. We combine them with earlier approaches to enable three new applications. Shadows for translucent occluders are obtained by simply rendering to a moment shadow map with alpha blending. Soft shadows in the spirit of percentage-closer soft shadows are rendered using two queries to a summed-area table of a moment shadow map. Single scattering is rendered through one lookup per pixel in a prefiltered moment shadow map with six channels. As a foundation we also propose improvements to moment shadow mapping itself. All these techniques scale particularly well to high output resolutions and enable proper antialiasing of shadows through extensive filtering.Wed, 01 Mar 2017 00:00:00 -0000
http://momentsingraphics.de/JCGT2017.html
http://momentsingraphics.de/JCGT2017.htmlPublicationThe problem with 3D blue noiseAfter the previous blog post several readers (namely Morgan McGuire, Mikkel Gjoel and Bart Wronski) expressed interest in 3D blue noise. Thus, this blog post provides a database of such blue noise textures. It also explains why you might not want to use it. The post relies on concepts introduced in the previous post so you should read this one first.Tue, 31 Jan 2017 00:00:00 -0000
http://momentsingraphics.de/3DBlueNoise.html
http://momentsingraphics.de/3DBlueNoise.htmlBlogFree blue noise texturesDithering is almost as old as computer graphics but recently it has received quite a lot of attention among game developers. To name two examples out of many, Mikkel Gjoel spoke about its use in Inside at GDC 2016 and Bart Wronski wrote a blog post series about it. This attention is well-deserved.Thu, 22 Dec 2016 00:00:00 -0000
http://momentsingraphics.de/BlueNoise.html
http://momentsingraphics.de/BlueNoise.htmlBlogNew shadow demo with documented HLSL codeIt's time to deliver on a recent promise. Moment shadow mapping and its applications have seen quite a few minor but useful improvements lately. The GDCE 2016 lecture covered some of them but only marginally. This post provides a brand-new release of my shadow mapping demo with documented shader code including all these improvements.Sun, 25 Sep 2016 00:00:00 -0000
http://momentsingraphics.de/JCGT2016Demo.html
http://momentsingraphics.de/JCGT2016Demo.htmlBlogHow to solve a cubic equation, revisitedThis post covers a little gem worth sharing: The fastest solution to cubic equations with three real roots that I am aware of. It is also fairly robust and I implemented it in HLSL. It is based on the work by Jim Blinn [Blinn07b] but tweaked for double speed.Sat, 10 Sep 2016 00:00:00 -0000
http://momentsingraphics.de/CubicRoots.html
http://momentsingraphics.de/CubicRoots.htmlBlogUsing Markdeep for a WordPress blogIn response to Morgan McGuire's request this post will explain how I set up this blog using his handy Markdeep, MathJax and Wordpress. The blog is hosted on my rented server and when you request a page it usually won't make connections to any other hosts to keep you from being tracked. Most of this post is specific to Markdeep, so you may also find it useful if you have no plans to use Wordpress.Sat, 20 Aug 2016 00:00:00 -0000
http://momentsingraphics.de/MetaPost.html
http://momentsingraphics.de/MetaPost.htmlBlogOf posts to comeI've got a blog now and you're reading its first post. This is not the place to tell you what the blog is all about or to ramble about past publications (though, you can download all of them here, including code and demos). I'd rather look into the future and tell you what to expect.Thu, 11 Aug 2016 00:00:00 -0000
http://momentsingraphics.de/FirstPost.html
http://momentsingraphics.de/FirstPost.htmlBlogRendering antialiased shadows with moment shadow mappingShadow map aliasing is a common artifact in games. Moment shadow maps can improve on this situation. Similar to exponential variance shadow maps, they can be filtered and antialiased directly. However, they offer reduced light leaking and greater robustness at comparable cost. Since they scale well to high output resolutions, they are particularly attractive for virtual reality and 4k rendering.Mon, 01 Aug 2016 00:00:00 -0000
http://momentsingraphics.de/GDCEurope2016.html
http://momentsingraphics.de/GDCEurope2016.htmlPublicationBeyond Hard Shadows: Moment Shadow Maps for Single Scattering, Soft Shadows and Translucent OccludersBuilding upon previous works, we transfer the recently proposed moment shadow mapping to three new applications. Like variance shadow maps and convolution shadow maps, moment shadow maps can be filtered directly. Classically, this is used to filter hard shadows but previous works explore other applications. Prefiltered single scattering uses convolution shadow maps to render single scattering in homogenous participating media, variance soft shadow mapping uses variance shadow maps for approximate soft shadows and Fourier opacity mapping uses convolution shadow maps for translucent occluders. We combine these three techniques with moment shadow mapping to arrive at better heuristics with less computational overhead.Mon, 01 Feb 2016 00:00:00 -0000
http://momentsingraphics.de/I3D2016.html
http://momentsingraphics.de/I3D2016.htmlPublicationSolving Trigonometric Moment Problems for Fast Transient ImagingTransient images help to analyze light transport in scenes. Besides two spatial dimensions, they are resolved in time of flight. Cost-efficient approaches for their capture use amplitude modulated continuous wave lidar systems but typically take more than a minute of capture time. We propose new techniques for measurement and reconstruction of transient images, which drastically reduce this capture time. To this end, we pose the problem of reconstruction as a trigonometric moment problem. A vast body of mathematical literature provides powerful solutions to such problems. In particular, the maximum entropy spectral estimate and the Pisarenko estimate provide two closed-form solutions for reconstruction using continuous densities or sparse distributions, respectively. Both methods can separate m distinct returns using measurements at m modulation frequencies. For m=3 our experiments with measured data confirm this. Our GPU-accelerated implementation can reconstruct more than 100000 frames of a transient image per second. Additionally, we propose modifications of the capture routine to achieve the required sinusoidal modulation without increasing the capture time. This allows us to capture up to 18.6 transient images per second, leading to transient video. An important byproduct is a method for removal of multipath interference in range imaging.Thu, 01 Oct 2015 00:00:00 -0000
http://momentsingraphics.de/SiggraphAsia2015.html
http://momentsingraphics.de/SiggraphAsia2015.htmlPublicationMoment Shadow MappingWe present moment shadow mapping, a novel technique for fast, filtered hard shadows. Like variance shadow mapping it allows for the application of all kinds of efficient texture filtering and antialiasing to its moment shadow map. However it is designed to provide a substantially higher quality. Moment shadow maps store four moments of the depth within the filter kernel. Using this information, our efficient algorithm computes the sharpest possible lower bound as approximation to the shadow intensity. The choice to compute such a bound using four moments is based upon an automated evaluation of thousands of alternatives and thus known to be optimal. To reduce memory and bandwidth requirements we present an optimized quantization scheme to allow 16-bit quantization of moment shadow maps. Our evaluation demonstrates that moment shadow mapping produces high quality results with a single shadow map sample per fragment using 64 bits per shadow map texel.Sun, 01 Feb 2015 00:00:00 -0000
http://momentsingraphics.de/I3D2015.html
http://momentsingraphics.de/I3D2015.htmlPublicationMoment Shadow MappingKeywords: automated evaluation, filtered hard shadows, moment problem, shadow mapping, varianceMon, 01 Jul 2013 00:00:00 -0000
http://momentsingraphics.de/MasterThesis.html
http://momentsingraphics.de/MasterThesis.htmlPublication