Image-Space Caustics and Curvatures
Total Page:16
File Type:pdf, Size:1020Kb
Image-space Caustics and Curvatures Xuan Yu Feng Li Jingyi Yu Department of Computer and Information Sciences University of Delaware Newark, DE 19716, USA fxuan,feng,[email protected] Abstract Caustics are important visual phenomena, as well as challenging global illumination effects in computer graph- ics. Physically caustics can be interpreted from one of two perspectives: in terms of photons gathered on scene geom- etry, or in terms of a pair of caustic surfaces. These caustic surfaces are swept by the foci of light rays. In this paper, we develop a novel algorithm to approximate caustic sur- faces of sampled rays. Our approach locally parameterizes rays by their intersections with a pair of parallel planes. We show neighboring ray triplets are constrained to pass simul- taneously through two slits, which rule the caustic surfaces. We derive a ray characteristic equation to compute the two slits, and hence, the caustic surfaces. Using the characteris- tic equation, we develop a GPU-based algorithm to render the caustics. Our approach produces sharp and clear caus- tics using much fewer ray samples than the photon mapping method and it also maintains high spatial and temporal co- herency. Finally, we present a normal-ray surface repre- Figure 1. We use our caustic-surface-based sentation that locally parameterizes the normals about a algorithm to render the refraction caustics surface point as rays. Computing the normal ray caustic cast by a crystal bunny of 69473 triangles. On surfaces leads to a novel real-time discrete shape operator. an NVidia GeForce7800, our method renders at 115 fps at an image resolution of 512x512. 1. Introduction tons. Alternatively, caustics can be interpreted from the stand- Caustics are important visual phenomena, as well as point of caustic surfaces. These caustic surfaces are swept challenging global illumination effects in computer graph- by the foci of light rays [6, 10]. In applied optics and com- ics. Bright caustic patterns are caused by the close bunching puter vision, researchers have explored using the geometric together of light rays. Traditionally, accurate caustics are attributes of the caustic surfaces to design catadioptric mir- rendered offline using backward ray-tracing [1] or photon rors [17]. Although the basic theory of caustic surfaces is mapping [9]. Both methods require tracing and gathering well understood, very little work has been done on estimat- a large number of rays or photons to produce photorealis- ing caustic surfaces of sampled rays. We [22] have recently tic results. Recently, GPU-based variants of path tracing proposed a local ray model [21] to approximate the reflec- algorithms have been developed to support near real-time tion caustic surfaces of discrete mirror surfaces. They have caustics rendering [4, 20, 16]. There, the focus has been to also shown reflection distortions can be analyzed from the determine the distribution, the size, and the density of pho- perspective of the reflection caustics. This indicates the im- portance of correctly estimating the caustic surfaces when rendering. In this paper, we develop a novel algorithm to approx- Rays imate the caustic surfaces of sampled rays using graphics Photons hardware. Our approach locally parameterizes rays by their intersections with a pair of parallel planes. We show neigh- boring ray triplets are constrained to pass simultaneously Caustic Surface through two slits, which rule the caustic surfaces. We then derive a ray characteristic equation to compute the two slits, Receiver and hence, the caustic surfaces. Based on this characteris- D E tic equation, we develop a GPU-based algorithm to render the caustics. Our approach produces sharp and clear caus- Figure 2. Caustics can be interpreted from tics using much fewer ray samples than the photon map- one of two perspectives: (a) in terms of pho- ping method and it maintains high spatial and temporal co- tons gathered on scene geometry, or (b) in herency. Finally, we present a novel normal-ray surface rep- terms of the caustic surfaces formed by light resentation that locally parameterizes the normals about a rays. surface point as rays. Computing the normal ray caustic surfaces leads to a new real-time discrete shape operator. Our key contributions include: and Pattanik [16] developed a similar method using vertex ² A new framework that relates the caustic surfaces, the tracing to construct a caustic map. They have also explored caustics, and the two-slit ray structure. tracing fewer photons using fixed- or variable-sized photon ² A GPU-based algorithm that estimates the caustic sur- splats. To maintain the rendering quality, they applied spa- faces by locally fitting the two-slit structure. tial and temporal filters to reduce the aliasing artifacts, but ² A real-time caustics rendering algorithm using the ray at the cost of additional computations [2, 19, 16]. characteristic equation. Caustics can also be rendered using beam tracing [7, 8]. ² An image-space algorithm that estimates the curva- Beam tracing computes the caustic polygons formed by the tures from the normal caustic surfaces. light rays on the receiver. To estimate the intensity for each caustic polygon, Nishita and Nakamae [11] used prism- 2. Previous Work shaped caustic volumes to calculate the energy flux passed onto the polygon. Ernest et al. [4] simplified this compu- tation using a caustic volume warping. Their result show When light rays interact with a reflective or refractive that high quality caustics can be produced with much fewer surface, they may bend and alter their path. These refracted polygons than photons. or reflected rays bundle together to form bright caustics on nearby scenes. In computer graphics, rendering caustics We present a third approach based on the geometry of has been a challenging global illumination problem. Pho- caustic surfaces. In the literature, these surfaces represent ton mapping and beam tracing have been two classical ap- an envelop of light rays [6]. In computer vision, such caus- proaches to produce photorealistic caustics. tic surfaces have been used to guide the design of cata- Photon mapping tracks photons emitted from the light dioptric imaging systems. Conventional catadioptric mir- source and stores their intersections with scene geometry rors place a pinhole camera at the focus of a hyperbolic [9]. These photons are then gathered on the receiving ge- or parabolic surface to synthesize a different camera with a ometry and their density is estimated to compute the in- wider field of view. When the camera moves off the focus, tensity of the caustics. However, to render photorealistic the caustic surfaces quickly evolve into complicated shapes caustics, a large number of photons need to be traced and [17]. We have [22] proposed a ray space algorithm to es- gathered. Distributed algorithms have been proposed to ac- timate the reflection caustic surfaces of arbitrarily shaped celerate photon mapping [5]. Purcell et al [15] used a GPU- mirrors. In this paper, we extend this ray space framework based ray tracer [14] to track photons stored on a uniform to compute the caustic surfaces formed by an arbitrary set grid. Wand and Strasser [18] sampled each reflective object of sampled rays using graphics hardware. and treated each sample as a light source. They then gath- Before proceeding, we explain our notation. Super- ered the contributions from each light sample using graph- scripts, such as pX , pY , and pZ represent the x and y and z ics hardware. component of a point or vector. Subscripts, such as f» and Recently, Wyman and Davis [20] proposed an image- f´ represents the first-order partial derivatives of f with re- space technique to efficiently emit and gather photons. Shah spect to » and ´. S Γ P P [s, t, u, v] u-v s-t (a) (b) (c) Figure 3. (a) The caustic surface represents (a) (b) the envelop (blue) of the rays (red). (b) The caustic surfaces (blue) formed by the rays Figure 4. (a) At each point on the surface, the emitted from a point light source (red) and re- reflected (refracted) light ray is mapped into flected by a cylindric mirror (cyan). (c) The the ray space by intersecting with the two caustic surfaces (cyan) are ruled by the loci parametrization planes. (b) The neighboring of the slits (blue). ray triplets are constrained to pass simulta- neously through two slits, which are parallel to the specified parametrization planes and rule the caustic surfaces. 3. Caustic Surfaces Given a point light source P and a reflective or a re- sampled rays. This is because accurately estimating the sur- fractive surface S, our goal is to compute the caustic sur- face and direction differentials (e.g., S_ , D_ ) from sampled face ¡ formed by the light rays that are transmitted through » » rays can be difficult. S, as shown in Figure 3. Assume S is parameterized We present a new caustic surface estimation algorithm in (»; ´), we can represent each exiting light ray as r = based on the recently proposed General Linear Camera _ ~ _ S(»; ´) + ¸D(»; ´), where S(»; ´) represents the origin of (GLC) [21]. In the GLC framework, every ray is parameter- ~ the ray and D represents the direction. ized by its intersections with the two parallel planes, where The caustic surfaces correspond to the envelop of the [u; v] is the intersection with the first and [s; t] the second, rays (Figure 3(a)) and they are tangential to each ray r along as shown in Figure 4(a). This parametrization is often called ~ D. Therefore, for some ¸ the caustic surface lies at a two-plane parametrization (2PP). _ ~ For each reflected/refracted ray r, we choose the uv ¡(»; ´) = S(»; ´) + ¸D(»; ´) (1) plane to be perpendicular to r. We also orient the local frame to align the z = 0 plane with the uv plane.