Monte Carlo Ray-tracing and Rendering

Size: px
Start display at page:

Download "Monte Carlo Ray-tracing and Rendering"

Transcription

1 ITN, Norrko ping February 3, 2012 Monte Carlo Ray-tracing and Rendering P ROJECT IN A DVANCED G LOBAL I LLUMINATION AND R ENDERING TNCG15 Authors: Henrik Ba cklund Niklas Neijman Contact: henba892@student.liu.se nikne866@student.liu.se

2 Abstract Photo realistic images have been desired for as long as images have been rendered. The images produced with the early methods where not good enough in order to be considered realistic. The methods have however gotten better with time and are today fully capable of achieving photo realistic images. The purpose of this paper is to demonstrate how a Monte Carlo ray tracer has been implemented. A global illumination model that is able to render photo realistic images through stochastic sampling. The fundamentals of Monte Carlo ray tracing are discussed to give the reader a deep understanding of the method.

3 Contents 1 Introduction Whitted ray-tracing Radiosity Monte Carlo ray-tracing Two-pass rendering Photon mapping Ray-tracing of isosurfaces Method Scene intersection Material (BRDF) Diffuse Sampling hemisphere Sample hemisphere Cosine Lobe Specular reflection Transparancy Snell s Law Brewster angle Refracted ray Radiance distribution Direct Illumination Shadow ray Radiance contribution Geometry factor Distance factor Indirect Illumination Recursive stopping condition Anti-aliasing Gamma Correction Results and benchmarks Monte Carlo ray-tracer Color bleed Caustics Hemisphere Sampling Multi Sampling Benchmark

4 4 Discussion 15 Bibliography 16

5 List of Figures 2.1 Ray-sphere intersection. Source: Ray-plane intersection. Source: Approximation errors Perfect reflection. Source: TNCG /Lecture2.pdf Refraction and reflection. Source: TNCG /Lecture2.pdf Shadow rays Total occlusion Partially occluded. Source: Geometry factor Distance factor Anti-aliasing Final image, same image is shown in title page Color bleeding for the red wall Color bleeding for the blue wall Caustics effects With cosine importance sampling Without cosine importance sampling sample per pixel sample per pixel sample per pixel sample per pixel sample per pixel

6 Chapter 1 Introduction Today there is of greater interest to make photo realistic scenes in computer graphics. But to make these scenes, the old local lighting model is not good enough because it does not consider the global lightning, which is the most important part of photo realism. Therefore the focus is to make a scene that is affected by light as in the reality i.e make it physically correct as much as possible without using supercomputers. To obtain a scene that is physically correct illuminated in computer graphics is not a straight forward approach. There are some different methods and combination of methods that can compute such scenes, some of them are explained below i.e Whitted ray-tracing, Radiosity, Monte Carlo ray-tracing, Two-pass rendering, Photon mapping and ray-tracing of isosurfaces. These methods are different solutions to the so-called rendering equation that is an equation to make an advanced globally illuminated scene. A L(x θ) = L e (x θ)+ f r (x, ψ θ)l(y ψ) V (x, y)g(x, y)da y (1.1) The rendering equation is shown in equation 1.1 and it was introduced in 1986 by J. T. Kajiya [1]. The parts in the rendering equation are explained as; L(x θ) is the total light that is obtained at x in direction θ when solving the equation. L e (x θ) is the light that x emits in direction θ and this term is added to an integral over the hemisphere. The integral includes the BRDF (Bidirectional reflectance distribution function) of the surface which gives the amount of light reflected at x. The integral also includes the light arriving at point x from direction ψ and the cosine of the normal of x and ψ. 1.1 Whitted ray-tracing Whitted ray-tracing was introduced in 1979 by Turner Whitted and this algorithm is a backward ray-tracing algorithm. Which means that a ray is shot from the eye through a pixel on the screen and into the scene i.e a camera based ray-tracing algorithm. This kind of tracing makes it more efficient computationally compared to forward ray-tracing. Because the ray is guaranteed to hit the camera when it is traced, in contrast to forward ray-tracing when a ray is shot from the light source through the scene instead and hopes for the ray to reach the camera/eye. But what about reaching the light source with Whitted ray-tracing? That is solved by launching another ray from the surface point that have been intersected towards the light source. The ray is called shadow ray and have the task to store the information about the visibility of the surface point i.e if there is an object in between the light source and surface point in question, then the surface point is not affected by the light. Whitted ray-tracing is often used with perfect reflection and perfect refraction surfaces and this is usually the only indirect contribution of the illumination of the scene. 1

7 In contrast to Monte Carlo ray-tracing, Whitted ray-tracing just follows at most two paths through the scene; refracted ray and reflected ray, which can be done recursively. 1.2 Radiosity Another method to solve the rendering equation is the radiosity method, which is an scene based algorithm, unlike Whitted ray-tracing that is an camera based method. This makes radiosity have its advantages. One of the greatest is that radiosity can be precalculated i.e the radiosity just have to be rendered once within a scene and it does not have to be recalculated during a camera motion, but the method is only considering perfect diffuse surfaces. To be able to calculate the radiosity, the scene have to be divided into smaller surfaces (the triangles from the mesh) and then a radiosity value for each surface have to be calculated, this is an iterative calculation. Initially only one patch is a radiosity source i.e the light source. After the first iteration the source send radiosity to the other patches through the scene. The patches that are receiving have a coefficient that tells how much of the radiosity that should get reflected. Now the new paths also sends out radiosity, even to the source. 1.3 Monte Carlo ray-tracing So far radiosity and Whitted ray-tracing have been discussed, but both methods have their limits. The main limit is that they only handles perfect reflection/refraction or perfect diffuse reflectors (e.g Lambertian) and most material in reality are not as mentioned. So, to gain even more photo realism into the scene, materials should for example almost be perfect reflectors/refractors or a mix between reflection and diffuse (i.e Glossy). By including some knowledge in probability theory such material could be obtained. What makes this algorithm so powerful is that the path of the rays are totally random. E.g when intersecting a diffuse surface, instead of just terminating the ray, a new path is created and the direction of the path is sampled over the hemispehere of the intersection point. When solving the rendering equation with Monte Carlo ray-tracing, the equation can be split into different parts as follows; Le (light emitted), direct illumination and indirect illumination. Le have been discussed earlier in the report and direct illumination reminds of the Whitted algorithm, but instead of using point light sources, direct illumination uses area light. By sampling more then one shadow ray towards the light source, soft shadows can be obtained. The most interesting part in a Monte Carlo is the indirect illumination, because that term contributes with effects like; caustics, color bleeding, soft shadows etc. Indirect light is the part that makes the scene globally illuminated. 1.4 Two-pass rendering Two pass rendering [2] is a method to combine the view independent method radiosity for diffuse interreflections with the view dependent method ray tracing for speccular reflections and highlights. Radiosity is first calculated from the light source followed by calculating the ray tracer from the view point, the result is then interpolated to get the final solution. Both methods are able to construct shadows. But, by optimizing the two pass rendering to only calculate shadows with the radiosity method, a lot of computational time can be saved. This is because the ray tracer can avoid sending out shadow rays which is a major part of the ray tracer algorithm. 2

8 1.5 Photon mapping Photon mapping [3] is a method where photons are traced into the scene from the light source. The photons intersect with objects and are either reflected, refracted or absorbed at the surface point. The photon and the incoming direction are stored in a photon map at each intersection point. There are two different photon maps; a global photon map and a caustics photon map. The caustics photon map is created by sending photons towards the specular objects, while the global photon map is created by sending photons towards the whole scene. The caustics photon map has a higher density of photons then the global photon map in order to obtain more accurate caustics. Besides from photons, the photon map also stores shadow photons (position of shadow), and indirect photons (positions of indirect light). The photon maps are used when rays are traced from the camera point into the scene where the shadow map is used to avoid the use of shadow rays. The indirect photon map is used to create soft indirect illumination. By combining the incoming direction and the BRDF, it is possible to calculate how much radiance is leaving a surface point in a given direction. reflections, indirect illumination etc. which is wanted if a photo realistic image is the aim. The algorithm traces a ray through the volume data (Voxel space) and calculates radiance in the intersection of the isosurface. But it can be heavy computational if an intersection test have to be done for every voxel. Therefore the process can be optimized by making bigger voxels (lower resolution of the voxels) outside the surface and the closer the ray gets surface, the higher the resolution gets. The following report will first discuss how the intersection between a ray and an object is handled and how the material of the object influences the final result. Next the report talks about how direct light works and how it is calculated by using shadow rays, geometry factors and distance factors. Indirect illumination is discussed followed by a description of how the stopping condition, anti aliasing and OpenMP is implemented. The report ends with the results obtained and a short discussion. 1.6 Ray-tracing of isosurfaces Rendering volume data have become popular and a volume is defined as a three dimensional scalar field. The data is obtained from e.g MRI scanners, CT etc. Which leads to that ray-tracing of isosurfaces [4] is useful within the medical field. The reason of using ray-tracing would be because, it could be possible to make the rendering in real time, which would not be possible for the older methods e.g Marching Cubes. The advantage of using a ray-tracer in volume rendering algorithms, is that it can contribute with some effects such as; shadows, 3

9 Chapter 2 Method 2.1 Scene intersection A ray that is shot into a scene can either miss an object or intersect with it. If an intersection has occurred it is desired to know what object and at what surface point that object got intersected by the ray. Since the scene is built up by planes and spheres there are only two types of intersection that can occur. The first type of intersection is the ray-sphere intersection. When a ray intersects a sphere there can be either one intersection point if the ray is parallel with the surface it hits. Or in the more general case where there are two intersection points. Figure 2.1 illustrates the two kinds of intersection that can occur when intersecting a sphere. p = t l + p 0 (2.1) ( p c) ( p c) = r 2 (2.2) By substituting equation 2.1 into the equation 2.2 the final ray-sphere equation is created (equation 2.3). This equation is then used to calculate if there are any points on the ray that intersects the sphere. (t l + p 0 c) (t l + p 0 c) r 2 = 0 (2.3) The second kind of intersection is the ray-plane intersection. Ray-plane intersection can either intersect at one point, or infinite number of intersection points if the line is parallel and within the plane. This can be seen in figure 2.2. Figure 2.1: Ray-sphere intersection. Source: To be able to calculate the intersection with a sphere, two equations are needed. The first one is the definition of a ray (equation 2.1) and the second one that defines the surface of a sphere (equation 2.2). Figure 2.2: Ray-plane intersection. Source: 4

10 To calculate if a ray intersects with a plane, it s just as in ray sphere intersection, needed to use two equations. The first one, is once again equation (2.1) and the second is the definition of a plane (equation 2.4). ( p p 0 ) n = 0 (2.4) By combining equation 2.1 and 2.4 into equation 2.5 it is possible to find a point on the ray that lies on the plane. (d l + l 0 p 0 ) n = 0 (2.5) A problem that can occur when calculating intersection points is that the actual starting position of the ray has been sampled to lie below the actual surface. The result can be that the ray intersects the same surface as it was launched from. This is illustrated in figure Material (BRDF) There is some different material out there that could be implemented, during this project the materials have been limited to; diffuse-, specular- (mirror) and transparent surfaces (glass), these three materials will be discussed in detail later. When talking about materials in global illumination, the term that is used is BRDF, denoted as: f r (x, ψ θ). Which is a part of the rendering equation, which also was mentioned in the beginning of the report. The BRDF computes how much radiance and in which direction the ray should reflect. This can vary, depending on what material the surface have. 2.3 Diffuse A diffuse surface have the properties that it reflect light uniformly over the hemisphere, i.e a diffuse surface would look the same from any viewing direction and the value of the BRDF is constant Sampling hemisphere Figure 2.3: Approximation errors. A solution to this problem is to move the rays starting point in the new direction of the ray according to equation 2.6. Startingpoint + ɛ direction (2.6) Where ɛ is small, but still able to lift the point to the surface. To compute the radiance at an intersection point on a diffuse surface, a random direction have to be calculated. To do that, a new direction ( ψ) is sampled over the hemisphere in the direction of the surface normal. This is done by randomly pick the azimuth angle (φ) between [0, 2π[ and the inclination angle between [0, π]. To be sure that the ray 2 points in the desired direction, a dot-product is calculated, if the value is negative then ψ is multiplied with Sample hemisphere Cosine Lobe 5 Even better results can be obtained by including the cosine importance sampling according to equation 2.7.

11 p( ψ) = cos( ψ, N x ) π (2.7) What it does is to prevent directions that is sampled perpendicular to the normal and decrease the probability to generate directions that forms a large angle with respect to the normal, which result in reduced noise in the final image. This is because the probability of the sampled direction is lower near the horizon of the hemisphere. This is desired since it has low effect, due to the geometry factor. 2.5 Transparancy Another interesting surface is the transparent surface which makes the object look like glass. In this part additional laws have to be taken into consideration to handle both reflected rays and refracted rays and also how the radiance should be distributed over the rays. 2.4 Specular reflection By using reflection laws from the physics, the perfect reflection of a surface point x can be obtained according to figure 2.4. Figure 2.5: Refraction and reflection. Source: TNCG /Lecture2.pdf Figure 2.4: Perfect reflection. Source: TNCG /Lecture2.pdf To be able to calculate the reflected ray, the angle α between the incoming ray I and the normal N is needed. R = I 2( I N) N (2.8) With some knowledge in linear algebra the ray R can be obtain without using any trigonometric functions according to equation 2.8, which will speed up the rendering process Snell s Law As shown in figure 2.5 the ray T is desired in order to create a transparent object. As before there is an incoming ray I and the angle θ 1 between I and the normal N x. By using Snell s law (equation 2.9), the angle θ 1 can be obtained, which made it possible to compute the refracted ray T. sin(θ 1 ) sin(θ 2 ) = η 2 η 1 (2.9) How much the refracted ray will be refracted depends on the material and its refraction index i.e η 1 and η 2. It also depends on the order of the intersected mediums, e.g from air to glass or vice versa. 6

12 2.5.2 Brewster angle The brewster angle is the critical angle where the ray is totally reflected or is divided into one refracted and one reflected. But, this just have to be taken into consideration if η 1 > η 2. Which gives that any angle of a ray with α > α brewster are totally reflected Refracted ray When calculating the refracted ray T, some simplification can be done, which makes the trigonometric function be eliminated. Equation 2.10 below shows the final expression of the calculations, it have been formed by combining Snell s law with some linear algebra theory. By using this equation a refracted ray can be computed. T = η 1 η 2 I+ N ( η1 η 2 ( N I) 1 ( η ) 1 ) η 2 (1 ( N I) Radiance distribution (2.10) 2.6 Direct Illumination Direct illumination sends out rays into the scene. The rays intersect with objects in the scene and at the intersection point some calculations are made; check if the surface is occluded, if there is any radiance contribution from the surface, how the surface geometry is in relation to the area light source and how much light reaches the surface depending on its distance to the light source. The ray is then recursively traced into the scene, depending on material. The procedure then starts all over again. A more detailed explanation is given below for the different calculations Shadow ray At the intersection points one has to decide whether or not the surface points are in the shadow or if they are lit by a light source. This is done by randomly sampling shadow rays towards the area light source. The surface point is lit if the shadow rays can reach the light source as seen in figure 2.6, or in the shadow if the surface is occluded by an object and thereby can t reach the light source. So far, we know how to compute the refracted and the reflected ray. But how much radiance flows through each of the rays? This is decided by equation ( ) 2 η1 η 2 R = (2.11) η 1 + η 2 The expression 2.11 shows an approximation of how much radiance that should be distributed to the reflected ray, which is only decided by the index of refraction. T = 1 R = 4η 1η 2 (η 1 + η 2 ) 2 (2.12) Even the refracted distribution of the refracted ray is an simple expression (2.12) and the computation is only dependent of the refraction index of the materials. Figure 2.6: Shadow rays. 7

13 The surface points that is totally in shadow is said to lie within the umbra. This is illustrated in figure Radiance contribution Once it s determined that an surface point is lit, one can calculate the radiance distribution from that surface. The more light that can reach the surface the more radiance will be contributed from the surface Geometry factor Surfaces who are parallel to the area light source will receive much more radiance, than surfaces that are perpendicular to the area light source that will receive little radiance from the light, if none at all. This can be seen in figure 2.9. Figure 2.7: Total occlusion. The use of an area light source however will lead to surface points that are partially occluded by an object. The effect is smooth shadows between the totally shaded surfaces to the totally illuminated surfaces. The area where the smooth shadows occur is called the penumbra. The effect of area light sources is shown in figure 2.8. Figure 2.9: Geometry factor. Figure 2.8: Partially occluded. Source: The geometry factor is included in the project by calculating the scalar product between the area light source normal and the surface normal. The scalar product produces values between [ 1.0, 1.0]. Surfaces that are parallel to each other result in a scalar product whose value is equal to 1.0. Surfaces that are perpendicular to each other will produce a scalar product equal to 0.0. Values that is bigger than 0.0 indicates that the surfaces are not facing towards each other. Values that are closer to 1.0 receive more light than values that are equal to or bigger than 0.0 who receives no light. 8

14 2.6.4 Distance factor The distance between a light source and a surface will affect the amount of light reaching the surface. The further away a surface is from the light source the less light the surface receives from it. Since the rays are launched in different directions from the light source, the rays of light will thus get sparser the further away from the source of light one gets. Figure 2.10 illustrates how the surface receives less light as it get further away from the light source. up intersecting the light source. No radiance flows through rays that does not end up at the light source. And the final radiance contribution of the ray becomes zero, which contributes to noise in the image. The noise is reduced by multi sampling the image. With indirect illumination the caustic effect can be obtained, due to the random paths and reflection laws. 2.8 Recursive stopping condition Figure 2.10: Distance factor. 2.7 Indirect Illumination Indirect illumination focuses on making the paths as random as possible, the random paths produces a global illumination model. This part of the rendering equation have an important role in the final rendering since it adds the effect of photo realism. The whole algorithm is recursive, even for diffuse surfaces. The reason of having diffuse surfaces reflect rays is because that will add color bleeding into the scene. As mentioned earlier in section 2.3 Diffuse the sampling of a ray have to be done over the hemisphere. To make it realistic, a diffuse surface have a high chance of absorbing the ray, which is decided by Russian Roulette (discussed in section 2.8 Recursive stopping condition ). In order for a ray to contribute with radiance to a pixel the recursion of a ray have to end As rays are traced recursively in the scene they get less important to the final result. If no stopping condition is introduced the rays will bounce around for an infinite number of times calculating values with little importance to the scene. A natural situation for rays to stop its recursive search for light emitting surfaces is when one of the surfaces along the traced path absorbs the light. The first method used to terminate rays is Russian roulette. It s a method based on that different materials have different chances to absorb light. Diffuse materials have a higher chance of absorption than specular materials. The chance to absorb rays is represented with a number α between [0.0, 1.0], where 0.0 represents no chance of absorption and 1.0 is guaranteed to absorb rays. A random number is then generated between [0.0, 1.0]. The ray get reflected or refracted as long as the random number is below the reflection value (1.0 α), otherwise it is absorbed. The Russian roulette is however combined with a second stopping condition. There is a depth variable whose purpose is to keep track of how many times a ray has been reflected or refracted. If the depth variable exceeds a predefined value it stops the recursion. The purpose of this second condition is to ensure termination of the recursion. 9

15 2.9 Anti-aliasing When sending out one sample per virtual pixel it is likely to get aliasing in the final image. The reason for aliasing is explained in figure 2.11 below Gamma Correction The reason of using gamma correction is because the human eye is not adjust to linear luminance functions, which the final rendering without gamma correction happens to be. I.e most of the data of the illumination is stored in highlights and not so much in shadow values, which the humans are most sensitive to. So, to compensate this, a gamma correction function is applied to the pixel values. This function is adapted to suit the properties of the eyes and equation 2.13 is an simplification of that. P ixel O = Intensity max P ixel γ I (2.13) Figure 2.11: Anti-aliasing. Two different directions through the same virtual pixel will give different result in the final image. In figure 2.11 a ray is launched through the virtual pixel, if the selected direction is direction 1 the returned value will be red, while if direction 2 is selected the returned value will be blue. This will lead to pixels either being perfectly red or perfectly blue. Which will lead to an aliased image. The solution to avoid aliasing is to use multi sampling, Multi sampling is a technique that sends multiple rays through the same virtual pixel and use the average of the rays result. If two rays where to be launched into the scene like in figure 2.11 the final result would be the average of blue and red, thereby returning purple. The first terms in equation 2.13 is a constant of the maximum value that a pixel can have. The first term is followed by the old pixel value (newly rendered pixel value) powered with an factor γ. The γ is chose to be

16 Chapter 3 Results and benchmarks 3.1 Monte Carlo ray-tracer The image in figure 3.1 was rendered in 4 hour and 12 minutes and the resolution is 1024x768 with 4 threads. It was sampled with 20,000 sample per pixel with cosine importance over the hemisphere. the blue wall is seen through the transparent sphere. It is also possible to see the reflections of the light source and the reflective sphere in the transparent sphere. Other interesting effects affecting the scene, are color bleeding and caustics. These effects are hard to see in 3.1 and they are therefore divided into two separate sections below. The soft shadows in figure 3.1 is a result of the multiple shadow rays sent towards the light source. This was discussed in section Shadow ray. Figure 3.1: Final image, same image is shown in title page. In figure 3.1 one can see four spheres, two of them is diffuse reflectors, one is reflective (left big sphere) and one is transparent (right big sphere). In the reflective sphere one can see the reflections of the room, the backside of the two diffuse reflective spheres and the reflection of the light source. This gives a visual proof that the ray shot toward the reflective sphere is totally reflected. The transparent sphere is a visual proof that rays shot from the view point is both reflected and refracted. This can be seen since the corner between the floor, the back wall and 11

17 3.2 Color bleed The color bleed in figure 3.2 and 3.3 is a result of the indirect light where the path to the light is randomly generated. Path from the floor to the light source including the walls will generate a surface partially affected by the wall included in its path. 3.3 Caustics Figure 3.4 shows the caustics effects and the image is a cutting from figure 3.1. As seen, there are two caustic effects, one directly under the glass ball, which is caused by the light source. The second effect (the one on the wall) is created by the mirror ball that reflects light from the light source. Figure 3.2: Color bleeding for the red wall. Figure 3.2 shows the color bleed from the red wall. The randomly generated path from the floor to the light source have included the red wall into its path, the floor has thereby been partially coloured red. Figure 3.4: Caustics effects. The area below the sphere is brighter due to the fact that the path of the ray ends up at the light source i.e the importance factor is high. The ray from the view point is sent towards the floor, where it gets reflected towards the sphere. On the sphere surface, the ray gets both reflected and refracted. However, the refracted ray carries more importance since it reaches the light source through non-absorptive surfaces. Figure 3.3: Color bleeding for the blue wall. The floor in figure 3.3 is blue due to that the blue wall has been included in the path of the ray. The bright area in the figure is called caustics and is discussed in the next section. 12

18 3.4 Hemisphere Sampling 3.5 Multi Sampling The image in figure 3.5 was rendered in 11 hours with 1 threads and the resolution is 800x600. It was sampled with 20,000 sample per pixel with cosine importance over the hemisphere. Figure 3.7: 10 sample per pixel. Figure 3.5: With cosine importance sampling. The image in figure 3.5 was rendered in 6 hour and 6 minutes with 1 threads and the resolution is 800x600. It was sampled with 20,000 sample per pixel without cosine importance over the hemisphere. Figure 3.8: 50 sample per pixel. Figure 3.6: sampling. Without cosine importance Figure 3.9: 100 sample per pixel. 13

19 3.6 Benchmark Table 3.1 shows benchmark for the figures in section 3.5 Multi Sampling. Image resolutions are 400x300 with 4 threads. Figure 3.10: 500 sample per pixel. Sample per pixel Rendering time (min) Table 3.1: Multi samplings inpact on rendering time. Figure 3.11: 5000 sample per pixel. In figure 3.7, 10 rays per pixel have been applied. Most likely, less then 10 rays ends up at the light source and thereby resulting in a noisy image. The solution is to send out a high amount of rays. The rays that reaches the light source will be less then the amount sent out, but since so many rays is sent out, the final image results in an image with reduced noise. This can be seen in figure

20 Chapter 4 Discussion By looking at the final results, we can say that to get good result from our renderer, a lot of time need to be spend on the computations. In order to get rid of most of the noise one have to include multi sampling. The images that where rendered with 20,000 sample per pixel took around 6 hours (with 1 thread) to render, time is although worth spending here since the result is a photo realistic image. In order to speed up the computations some other methods should be implemented for example photon mapping. When focusing on the algorithm, the first thing that needs to be improved is the transparent surfaces and the radiance distribution. The used equation for radiance distribution, is just an approximation of the radiance that flows through each reflected and/or refracted ray. If Fresnel s equation instead where to be used one would have received an much more accurate radiance distribution. Another part of our scene in the need of improvement is the area between the roof and the back wall where a white line occurs. The reason for its appearance is that the offset moves some of the rays above the roof, when a ray starts above the roof the chance of intersecting with the light sphere are high (since the light sphere existing above the roof is large) resulting in a bright surface point. The use of OpenMP has in some cases created bad artifacts, we believe that this is a consequence from the use of a random number generator originally generating numbers based on the current time. At first the threads is in sync and thereby generating the same random numbers but with time less artifacts occurs as the calculations of different threads get separated in time. The scene just consists of implicit surfaces like spheres and planes with corresponding intersections testing. So, to make the scene more interesting, an object loader could be implemented. Meaning, shapes could be made in any 3d-program and then be imported to our program. With an object loader implemented, a ray-triangle intersection and bounding boxes would also be needed. 15

21 Bibliography [1] James T. Kajiya. THE RENDERING EQUATION. California Institute of Technology Pasadena, Ca Last collected: [2] Francois Sillion, Claude Puech. A General Two-Pass Method Integrating Specular and Diffuse Reflection. Laboratoire d Informatique de l Ecole Normale Sup rieure U.R.A. 1327, CNRS. Last collected [3] Henrik Wann Jensen. Global Illumination using Photon Maps. Department of Graphical Communication The Technical University of Denmark. Last collected [4] Ingo Wald, Heiko Friedrich, Gerd Marmitt, Philipp Slusallek. Faster Isosurface Ray Tracing Using Implicit KD-Trees. IEEE Computer Society. Last collected [5] Philip Dutre, Kavita Bala, Philippe Bekaert. Advanced Global Illumination, Second Edition. A K Peters, Ltd. 888 Worcester Street, Suite 230, Wellesley, MA

MIT Monte-Carlo Ray Tracing. MIT EECS 6.837, Cutler and Durand 1

MIT Monte-Carlo Ray Tracing. MIT EECS 6.837, Cutler and Durand 1 MIT 6.837 Monte-Carlo Ray Tracing MIT EECS 6.837, Cutler and Durand 1 Schedule Review Session: Tuesday November 18 th, 7:30 pm bring lots of questions! Quiz 2: Thursday November 20 th, in class (one weeks

More information

A Brief Overview of. Global Illumination. Thomas Larsson, Afshin Ameri Mälardalen University

A Brief Overview of. Global Illumination. Thomas Larsson, Afshin Ameri Mälardalen University A Brief Overview of Global Illumination Thomas Larsson, Afshin Ameri Mälardalen University 1 What is Global illumination? Global illumination is a general name for realistic rendering algorithms Global

More information

Path Tracing part 2. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Path Tracing part 2. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017 Path Tracing part 2 Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017 Monte Carlo Integration Monte Carlo Integration The rendering (& radiance) equation is an infinitely recursive integral

More information

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura Computer Graphics Lecture 13 Global Illumination 1: Ray Tracing and Radiosity Taku Komura 1 Rendering techniques Can be classified as Local Illumination techniques Global Illumination techniques Local

More information

Local vs. Global Illumination & Radiosity

Local vs. Global Illumination & Radiosity Last Time? Local vs. Global Illumination & Radiosity Ray Casting & Ray-Object Intersection Recursive Ray Tracing Distributed Ray Tracing An early application of radiative heat transfer in stables. Reading

More information

The Rendering Equation. Computer Graphics CMU /15-662

The Rendering Equation. Computer Graphics CMU /15-662 The Rendering Equation Computer Graphics CMU 15-462/15-662 Review: What is radiance? Radiance at point p in direction N is radiant energy ( #hits ) per unit time, per solid angle, per unit area perpendicular

More information

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15 Computer Graphics Lecture 10 Global Illumination 1: Ray Tracing and Radiosity Taku Komura 1 Rendering techniques Can be classified as Local Illumination techniques Global Illumination techniques Local

More information

The Rendering Equation and Path Tracing

The Rendering Equation and Path Tracing The Rendering Equation and Path Tracing Louis Feng April 22, 2004 April 21, 2004 Realistic Image Synthesis (Spring 2004) 1 Topics The rendering equation Original form Meaning of the terms Integration Path

More information

The Rendering Equation. Computer Graphics CMU /15-662, Fall 2016

The Rendering Equation. Computer Graphics CMU /15-662, Fall 2016 The Rendering Equation Computer Graphics CMU 15-462/15-662, Fall 2016 Review: What is radiance? Radiance at point p in direction N is radiant energy ( #hits ) per unit time, per solid angle, per unit area

More information

Lecture 10: Ray tracing

Lecture 10: Ray tracing Interactive Computer Graphics Lecture 10: Ray tracing Graphics Lecture 10: Slide 1 Some slides adopted from H. Pfister, Harvard Graphics Lecture 10: Slide 2 Direct and Global Illumination Direct illumination:

More information

Global Illumination. COMP 575/770 Spring 2013

Global Illumination. COMP 575/770 Spring 2013 Global Illumination COMP 575/770 Spring 2013 Final Exam and Projects COMP 575 Final Exam Friday, May 3 4:00 pm COMP 770 (and 575 extra credit) Projects Final report due by end of day, May 1 Presentations:

More information

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University Global Illumination CS334 Daniel G. Aliaga Department of Computer Science Purdue University Recall: Lighting and Shading Light sources Point light Models an omnidirectional light source (e.g., a bulb)

More information

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome! INFOGR Computer Graphics J. Bikker - April-July 2015 - Lecture 10: Ground Truth Welcome! Today s Agenda: Limitations of Whitted-style Ray Tracing Monte Carlo Path Tracing INFOGR Lecture 10 Ground Truth

More information

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch CSCI 420 Computer Graphics Lecture 18 Global Illumination Jernej Barbic University of Southern California BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch. 13.4-13.5] 1 Global Illumination

More information

The Rendering Equation & Monte Carlo Ray Tracing

The Rendering Equation & Monte Carlo Ray Tracing Last Time? Local Illumination & Monte Carlo Ray Tracing BRDF Ideal Diffuse Reflectance Ideal Specular Reflectance The Phong Model Radiosity Equation/Matrix Calculating the Form Factors Aj Ai Reading for

More information

Sung-Eui Yoon ( 윤성의 )

Sung-Eui Yoon ( 윤성의 ) CS380: Computer Graphics Ray Tracing Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Class Objectives Understand overall algorithm of recursive ray tracing Ray generations Intersection

More information

Schedule. MIT Monte-Carlo Ray Tracing. Radiosity. Review of last week? Limitations of radiosity. Radiosity

Schedule. MIT Monte-Carlo Ray Tracing. Radiosity. Review of last week? Limitations of radiosity. Radiosity Schedule Review Session: Tuesday November 18 th, 7:30 pm, Room 2-136 bring lots of questions! MIT 6.837 Monte-Carlo Ray Tracing Quiz 2: Thursday November 20 th, in class (one weeks from today) MIT EECS

More information

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources. 11 11.1 Basics So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources. Global models include incident light that arrives

More information

COMP371 COMPUTER GRAPHICS

COMP371 COMPUTER GRAPHICS COMP371 COMPUTER GRAPHICS SESSION 15 RAY TRACING 1 Announcements Programming Assignment 3 out today - overview @ end of the class Ray Tracing 2 Lecture Overview Review of last class Ray Tracing 3 Local

More information

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows. CSCI 420 Computer Graphics Lecture 18 Global Illumination Jernej Barbic University of Southern California BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Angel Ch. 11] 1 Global Illumination

More information

Photon Mapping. Due: 3/24/05, 11:59 PM

Photon Mapping. Due: 3/24/05, 11:59 PM CS224: Interactive Computer Graphics Photon Mapping Due: 3/24/05, 11:59 PM 1 Math Homework 20 Ray Tracing 20 Photon Emission 10 Russian Roulette 10 Caustics 15 Diffuse interreflection 15 Soft Shadows 10

More information

Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ]

Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ] CSCI 420 Computer Graphics Lecture 15 Ray Tracing Ray Casting Shadow Rays Reflection and Transmission [Ch. 13.2-13.3] Jernej Barbic University of Southern California 1 Local Illumination Object illuminations

More information

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows. CSCI 480 Computer Graphics Lecture 18 Global Illumination BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch. 13.4-13.5] March 28, 2012 Jernej Barbic University of Southern California

More information

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye Ray Tracing What was the rendering equation? Motivate & list the terms. Relate the rendering equation to forward ray tracing. Why is forward ray tracing not good for image formation? What is the difference

More information

Final Project: Real-Time Global Illumination with Radiance Regression Functions

Final Project: Real-Time Global Illumination with Radiance Regression Functions Volume xx (200y), Number z, pp. 1 5 Final Project: Real-Time Global Illumination with Radiance Regression Functions Fu-Jun Luan Abstract This is a report for machine learning final project, which combines

More information

Korrigeringar: An introduction to Global Illumination. Global Illumination. Examples of light transport notation light

Korrigeringar: An introduction to Global Illumination. Global Illumination. Examples of light transport notation light An introduction to Global Illumination Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Korrigeringar: Intel P4 (200): ~42M transistorer Intel P4 EE (2004): 78M

More information

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination Global Illumination Why Global Illumination Last lecture Basic rendering concepts Primitive-based rendering Today: Global illumination Ray Tracing, and Radiosity (Light-based rendering) What s Global Illumination

More information

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading CENG 477 Introduction to Computer Graphics Ray Tracing: Shading Last Week Until now we learned: How to create the primary rays from the given camera and image plane parameters How to intersect these rays

More information

Photon Maps. The photon map stores the lighting information on points or photons in 3D space ( on /near 2D surfaces)

Photon Maps. The photon map stores the lighting information on points or photons in 3D space ( on /near 2D surfaces) Photon Mapping 1/36 Photon Maps The photon map stores the lighting information on points or photons in 3D space ( on /near 2D surfaces) As opposed to the radiosity method that stores information on surface

More information

Stochastic Path Tracing and Image-based lighting

Stochastic Path Tracing and Image-based lighting EDA101 : Advanced Shading and Rendering Stochastic Path Tracing and Image-based lighting Michael Doggett 2008 Tomas Akenine-Möller 1 This is what we want: Courtesy of Henrik Wann Jensen Courtesy of Paul

More information

Lecture 7 - Path Tracing

Lecture 7 - Path Tracing INFOMAGR Advanced Graphics Jacco Bikker - November 2016 - February 2017 Lecture 7 - I x, x = g(x, x ) ε x, x + S ρ x, x, x I x, x dx Welcome! Today s Agenda: Introduction Advanced Graphics 3 Introduction

More information

Raytracing & Epsilon. Today. Last Time? Forward Ray Tracing. Does Ray Tracing Simulate Physics? Local Illumination

Raytracing & Epsilon. Today. Last Time? Forward Ray Tracing. Does Ray Tracing Simulate Physics? Local Illumination Raytracing & Epsilon intersects light @ t = 25.2 intersects sphere1 @ t = -0.01 & Monte Carlo Ray Tracing intersects sphere1 @ t = 10.6 Solution: advance the ray start position epsilon distance along the

More information

REAL-TIME GPU PHOTON MAPPING. 1. Introduction

REAL-TIME GPU PHOTON MAPPING. 1. Introduction REAL-TIME GPU PHOTON MAPPING SHERRY WU Abstract. Photon mapping, an algorithm developed by Henrik Wann Jensen [1], is a more realistic method of rendering a scene in computer graphics compared to ray and

More information

Monte Carlo Ray Tracing. Computer Graphics CMU /15-662

Monte Carlo Ray Tracing. Computer Graphics CMU /15-662 Monte Carlo Ray Tracing Computer Graphics CMU 15-462/15-662 TODAY: Monte Carlo Ray Tracing How do we render a photorealistic image? Put together many of the ideas we ve studied: - color - materials - radiometry

More information

CS-184: Computer Graphics. Administrative

CS-184: Computer Graphics. Administrative CS-184: Computer Graphics Lecture #10: Raytracing Prof. James O Brien University of California, Berkeley V2005-10-1.1 Administrative Prof. O Brien away this Thursday and Friday Available after class today

More information

Lecture 12: Photon Mapping. Biased Methods

Lecture 12: Photon Mapping. Biased Methods Lecture 12: Photon Mapping CS 6620, Spring 2009 Kavita Bala Computer Science Cornell University MC problems Biased Methods Biased methods: store information (caching) Better type of noise: blurring Greg

More information

CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside CS130 : Computer Graphics Lecture 8: Lighting and Shading Tamar Shinar Computer Science & Engineering UC Riverside Why we need shading Suppose we build a model of a sphere using many polygons and color

More information

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL: CS580: Ray Tracing Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/gcg/ Recursive Ray Casting Gained popularity in when Turner Whitted (1980) recognized that recursive ray casting could

More information

Lighting and Shading

Lighting and Shading Lighting and Shading Today: Local Illumination Solving the rendering equation is too expensive First do local illumination Then hack in reflections and shadows Local Shading: Notation light intensity in,

More information

Assignment 3: Path tracing

Assignment 3: Path tracing Assignment 3: Path tracing EDAN30 April 2, 2011 In this assignment you will be asked to extend your ray tracer to support path tracing. In order to pass the assignment you need to complete all tasks. Make

More information

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing Lecture 11 Ray tracing Introduction Projection vs. ray tracing Projection Ray tracing Rendering Projection vs. ray tracing Projection Ray tracing Basic methods for image generation Major areas of computer

More information

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction Effects needed for realism Global Rendering Computer Graphics 1, Fall 2005 Lecture 7 4th ed.: Ch 6.10, 12.1-12.5 Shadows Reflections (Mirrors) Transparency Interreflections Detail (Textures etc.) Complex

More information

Ray tracing. EECS 487 March 19,

Ray tracing. EECS 487 March 19, Ray tracing EECS 487 March 19, 2007 http://radsite.lbl.gov/radiance/book/ 1 Conventional pipeline (rasterization) For each triangle Compute lighting at vertices For each pixel within triangle Compute interpolated

More information

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project To do Continue to work on ray programming assignment Start thinking about final project Lighting Course Outline 3D Graphics Pipeline Modeling (Creating 3D Geometry) Mesh; modeling; sampling; Interaction

More information

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity Today Anti-aliasing Surface Parametrization Soft Shadows Global Illumination Path Tracing Radiosity Exercise 2 Sampling Ray Casting is a form of discrete sampling. Rendered Image: Sampling of the ground

More information

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping Advanced Graphics Path Tracing and Photon Mapping Part 2 Path Tracing and Photon Mapping Importance Sampling Combine importance sampling techniques Reflectance function (diffuse + specular) Light source

More information

11/2/2010. In the last lecture. Monte-Carlo Ray Tracing : Path Tracing. Today. Shadow ray towards the light at each vertex. Path Tracing : algorithm

11/2/2010. In the last lecture. Monte-Carlo Ray Tracing : Path Tracing. Today. Shadow ray towards the light at each vertex. Path Tracing : algorithm Comuter Grahics Global Illumination: Monte-Carlo Ray Tracing and Photon Maing Lecture 11 In the last lecture We did ray tracing and radiosity Ray tracing is good to render secular objects but cannot handle

More information

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker CMSC427 Advanced shading getting global illumination by local methods Credit: slides Prof. Zwicker Topics Shadows Environment maps Reflection mapping Irradiance environment maps Ambient occlusion Reflection

More information

Recent Advances in Monte Carlo Offline Rendering

Recent Advances in Monte Carlo Offline Rendering CS294-13: Special Topics Lecture #6 Advanced Computer Graphics University of California, Berkeley Monday, 21 September 2009 Recent Advances in Monte Carlo Offline Rendering Lecture #6: Monday, 21 September

More information

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping Topic 12: Texture Mapping Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping Texture sources: Photographs Texture sources: Procedural Texture sources: Solid textures

More information

Illumination Algorithms

Illumination Algorithms Global Illumination Illumination Algorithms Digital Lighting and Rendering CGT 340 The goal of global illumination is to model all possible paths of light to the camera. Global Illumination Global illumination

More information

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized Topic 11: Texture Mapping Motivation Sources of texture Texture coordinates Bump mapping, mip mapping & env mapping Texture sources: Photographs Texture sources: Procedural Texture sources: Solid textures

More information

Global Illumination The Game of Light Transport. Jian Huang

Global Illumination The Game of Light Transport. Jian Huang Global Illumination The Game of Light Transport Jian Huang Looking Back Ray-tracing and radiosity both computes global illumination Is there a more general methodology? It s a game of light transport.

More information

Topic 9: Lighting & Reflection models 9/10/2016. Spot the differences. Terminology. Two Components of Illumination. Ambient Light Source

Topic 9: Lighting & Reflection models 9/10/2016. Spot the differences. Terminology. Two Components of Illumination. Ambient Light Source Topic 9: Lighting & Reflection models Lighting & reflection The Phong reflection model diffuse component ambient component specular component Spot the differences Terminology Illumination The transport

More information

Part I The Basic Algorithm. Principles of Photon Mapping. A two-pass global illumination method Pass I Computing the photon map

Part I The Basic Algorithm. Principles of Photon Mapping. A two-pass global illumination method Pass I Computing the photon map Part I The Basic Algorithm 1 Principles of A two-pass global illumination method Pass I Computing the photon map A rough representation of the lighting in the scene Pass II rendering Regular (distributed)

More information

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch 15-462 Computer Graphics I Lecture 7 Lighting and Shading February 12, 2002 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/ Light Sources Phong Illumination Model

More information

Computer Graphics. Ray Tracing. Based on slides by Dianna Xu, Bryn Mawr College

Computer Graphics. Ray Tracing. Based on slides by Dianna Xu, Bryn Mawr College Computer Graphics Ray Tracing Based on slides by Dianna Xu, Bryn Mawr College Ray Tracing Example Created by Anto Matkovic Ray Tracing Example Ray Tracing Example Ray Tracing Most light rays do not reach

More information

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural Topic 11: Texture Mapping Motivation Sources of texture Texture coordinates Bump mapping, mip mapping & env mapping Topic 11: Photographs Texture Mapping Motivation Sources of texture Texture coordinates

More information

Topic 9: Lighting & Reflection models. Lighting & reflection The Phong reflection model diffuse component ambient component specular component

Topic 9: Lighting & Reflection models. Lighting & reflection The Phong reflection model diffuse component ambient component specular component Topic 9: Lighting & Reflection models Lighting & reflection The Phong reflection model diffuse component ambient component specular component Spot the differences Terminology Illumination The transport

More information

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows Recollection Models Pixels Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows Can be computed in different stages 1 So far we came to Geometry model 3 Surface

More information

Local Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Local Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller Local Illumination CMPT 361 Introduction to Computer Graphics Torsten Möller Graphics Pipeline Hardware Modelling Transform Visibility Illumination + Shading Perception, Interaction Color Texture/ Realism

More information

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics Announcements Assignment 4 will be out later today Problem Set 3 is due today or tomorrow by 9am in my mail box (4 th floor NSH) How are the machines working out? I have a meeting with Peter Lee and Bob

More information

Lecture 17: Recursive Ray Tracing. Where is the way where light dwelleth? Job 38:19

Lecture 17: Recursive Ray Tracing. Where is the way where light dwelleth? Job 38:19 Lecture 17: Recursive Ray Tracing Where is the way where light dwelleth? Job 38:19 1. Raster Graphics Typical graphics terminals today are raster displays. A raster display renders a picture scan line

More information

To Do. Real-Time High Quality Rendering. Motivation for Lecture. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing

To Do. Real-Time High Quality Rendering. Motivation for Lecture. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing Real-Time High Quality Rendering CSE 274 [Fall 2015], Lecture 5 Tour of Modern Offline Rendering To Do Project milestone (1-2 pages), final project proposal Due on Oct 27 Please get in touch with me if

More information

Monte-Carlo Ray Tracing. Antialiasing & integration. Global illumination. Why integration? Domains of integration. What else can we integrate?

Monte-Carlo Ray Tracing. Antialiasing & integration. Global illumination. Why integration? Domains of integration. What else can we integrate? Monte-Carlo Ray Tracing Antialiasing & integration So far, Antialiasing as signal processing Now, Antialiasing as integration Complementary yet not always the same in particular for jittered sampling Image

More information

Global Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Global Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller Global Illumination CMPT 361 Introduction to Computer Graphics Torsten Möller Reading Foley, van Dam (better): Chapter 16.7-13 Angel: Chapter 5.11, 11.1-11.5 2 Limitation of local illumination A concrete

More information

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

Announcements. Written Assignment 2 out (due March 8) Computer Graphics Announcements Written Assignment 2 out (due March 8) 1 Advanced Ray Tracing (Recursive) Ray Tracing Antialiasing Motion Blur Distribution Ray Tracing Ray Tracing and Radiosity Assumptions Simple shading

More information

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects Basic Ray Tracing Rendering: Reality Eye acts as pinhole camera Photons from light hit objects Rendering: Reality Eye acts as pinhole camera Photons from light hit objects Rendering: Reality Eye acts as

More information

Lecture 18: Primer on Ray Tracing Techniques

Lecture 18: Primer on Ray Tracing Techniques Lecture 18: Primer on Ray Tracing Techniques 6.172: Performance Engineering of Software Systems Joshua Slocum November 16, 2010 A Little Background Image rendering technique Simulate rays of light - ray

More information

Biased Monte Carlo Ray Tracing

Biased Monte Carlo Ray Tracing Biased Monte Carlo Ray Tracing Filtering, Irradiance Caching, and Photon Mapping Henrik Wann Jensen Stanford University May 23, 2002 Unbiased and Consistent Unbiased estimator: E{X} =... Consistent estimator:

More information

CPSC GLOBAL ILLUMINATION

CPSC GLOBAL ILLUMINATION CPSC 314 21 GLOBAL ILLUMINATION Textbook: 20 UGRAD.CS.UBC.CA/~CS314 Mikhail Bessmeltsev ILLUMINATION MODELS/ALGORITHMS Local illumination - Fast Ignore real physics, approximate the look Interaction of

More information

Computer Graphics. - Ray Tracing I - Marcus Magnor Philipp Slusallek. Computer Graphics WS05/06 Ray Tracing I

Computer Graphics. - Ray Tracing I - Marcus Magnor Philipp Slusallek. Computer Graphics WS05/06 Ray Tracing I Computer Graphics - Ray Tracing I - Marcus Magnor Philipp Slusallek Overview Last Lecture Introduction Today Ray tracing I Background Basic ray tracing What is possible? Recursive ray tracing algorithm

More information

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Lecture 15: Shading-I. CITS3003 Graphics & Animation Lecture 15: Shading-I CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Learn that with appropriate shading so objects appear as threedimensional

More information

Advanced Graphics. Global Illumination. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

Advanced Graphics. Global Illumination. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd Advanced Graphics Global Illumination 1 Alex Benton, University of Cambridge A.Benton@damtp.cam.ac.uk Supported in part by Google UK, Ltd What s wrong with raytracing? Soft shadows are expensive Shadows

More information

Lecture 7: Monte Carlo Rendering. MC Advantages

Lecture 7: Monte Carlo Rendering. MC Advantages Lecture 7: Monte Carlo Rendering CS 6620, Spring 2009 Kavita Bala Computer Science Cornell University MC Advantages Convergence rate of O( ) Simple Sampling Point evaluation Can use black boxes General

More information

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1) Computer Graphics Lecture 14 Bump-mapping, Global Illumination (1) Today - Bump mapping - Displacement mapping - Global Illumination Radiosity Bump Mapping - A method to increase the realism of 3D objects

More information

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1 Ray tracing Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 3/19/07 1 From last time Hidden surface removal Painter s algorithm Clipping algorithms Area subdivision BSP trees Z-Buffer

More information

Reflection and Shading

Reflection and Shading Reflection and Shading R. J. Renka Department of Computer Science & Engineering University of North Texas 10/19/2015 Light Sources Realistic rendering requires that we model the interaction between light

More information

Illumination. The slides combine material from Andy van Dam, Spike Hughes, Travis Webb and Lyn Fong

Illumination. The slides combine material from Andy van Dam, Spike Hughes, Travis Webb and Lyn Fong INTRODUCTION TO COMPUTER GRAPHIC S Illumination The slides combine material from Andy van Dam, Spike Hughes, Travis Webb and Lyn Fong Andries van Dam October 29, 2009 Illumination Models 1/30 Outline Physical

More information

Ø Sampling Theory" Ø Fourier Analysis Ø Anti-aliasing Ø Supersampling Strategies" Ø The Hall illumination model. Ø Original ray tracing paper

Ø Sampling Theory Ø Fourier Analysis Ø Anti-aliasing Ø Supersampling Strategies Ø The Hall illumination model. Ø Original ray tracing paper CS 431/636 Advanced Rendering Techniques Ø Dr. David Breen Ø Korman 105D Ø Wednesday 6PM 8:50PM Presentation 6 5/16/12 Questions from ast Time? Ø Sampling Theory" Ø Fourier Analysis Ø Anti-aliasing Ø Supersampling

More information

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11. Chapter 11 Global Illumination Part 1 Ray Tracing Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.3 CG(U), Chap.11 Part 1:Ray Tracing 1 Can pipeline graphics renders images

More information

Computer Graphics. Illumination and Shading

Computer Graphics. Illumination and Shading () Illumination and Shading Dr. Ayman Eldeib Lighting So given a 3-D triangle and a 3-D viewpoint, we can set the right pixels But what color should those pixels be? If we re attempting to create a realistic

More information

Interactive Methods in Scientific Visualization

Interactive Methods in Scientific Visualization Interactive Methods in Scientific Visualization GPU Volume Raycasting Christof Rezk-Salama University of Siegen, Germany Volume Rendering in a Nutshell Image Plane Eye Data Set Back-to-front iteration

More information

The Rendering Equation Philip Dutré. Course 4. State of the Art in Monte Carlo Global Illumination Sunday, Full Day, 8:30 am - 5:30 pm

The Rendering Equation Philip Dutré. Course 4. State of the Art in Monte Carlo Global Illumination Sunday, Full Day, 8:30 am - 5:30 pm The Rendering Equation Philip Dutré Course 4. State of the Art in Monte Carlo Global Illumination Sunday, Full Day, 8:30 am - 5:30 pm 1 Overview Rendering Equation Path tracing Path Formulation Various

More information

Motivation. Advanced Computer Graphics (Fall 2009) CS 283, Lecture 11: Monte Carlo Integration Ravi Ramamoorthi

Motivation. Advanced Computer Graphics (Fall 2009) CS 283, Lecture 11: Monte Carlo Integration Ravi Ramamoorthi Advanced Computer Graphics (Fall 2009) CS 283, Lecture 11: Monte Carlo Integration Ravi Ramamoorthi http://inst.eecs.berkeley.edu/~cs283 Acknowledgements and many slides courtesy: Thomas Funkhouser, Szymon

More information

Shading I Computer Graphics I, Fall 2008

Shading I Computer Graphics I, Fall 2008 Shading I 1 Objectives Learn to shade objects ==> images appear threedimensional Introduce types of light-material interactions Build simple reflection model Phong model Can be used with real time graphics

More information

Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015

Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015 Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015 What is rendering? Generating an image from a 3D scene model Ingredients Representation of 3D geometry Specification for camera & lights

More information

Irradiance Gradients. Media & Occlusions

Irradiance Gradients. Media & Occlusions Irradiance Gradients in the Presence of Media & Occlusions Wojciech Jarosz in collaboration with Matthias Zwicker and Henrik Wann Jensen University of California, San Diego June 23, 2008 Wojciech Jarosz

More information

Global Illumination using Photon Maps

Global Illumination using Photon Maps This paper is a slightly extended version of the paper in Rendering Techniques 96 (Proceedings of the Seventh Eurographics Workshop on Rendering), pages 21 30, 1996 Global Illumination using Photon Maps

More information

Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes

Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes Miloš Hašan Jaroslav Křivánek * Bruce Walter Kavita Bala Cornell University * Charles University in Prague Global Illumination Effects

More information

Visual cues to 3D geometry. Light Reflection and Advanced Shading. Shading. Recognizing materials. size (perspective) occlusion shading

Visual cues to 3D geometry. Light Reflection and Advanced Shading. Shading. Recognizing materials. size (perspective) occlusion shading Visual cues to 3D geometry Light Reflection and Advanced Shading size (perspective) occlusion shading CS 4620 Lecture 17 1 2 Shading Recognizing materials Variation in observed color across an object strongly

More information

Supplement to Lecture 16

Supplement to Lecture 16 Supplement to Lecture 16 Global Illumination: View Dependent CS 354 Computer Graphics http://www.cs.utexas.edu/~bajaj/ Notes and figures from Ed Angel: Interactive Computer Graphics, 6 th Ed., 2012 Addison

More information

Photon Mapping. Michael Doggett Department of Computer Science Lund university

Photon Mapping. Michael Doggett Department of Computer Science Lund university Photon Mapping Michael Doggett Department of Computer Science Lund university Outline Photon Mapping (ch. 14 in textbook) Progressive Stochastic 2011 Michael Doggett How to make light sampling faster?

More information

Ray Tracing: Special Topics CSCI 4239/5239 Advanced Computer Graphics Spring 2018

Ray Tracing: Special Topics CSCI 4239/5239 Advanced Computer Graphics Spring 2018 Ray Tracing: Special Topics CSCI 4239/5239 Advanced Computer Graphics Spring 2018 Theoretical foundations Ray Tracing from the Ground Up Chapters 13-15 Bidirectional Reflectance Distribution Function BRDF

More information

MITOCW MIT6_172_F10_lec18_300k-mp4

MITOCW MIT6_172_F10_lec18_300k-mp4 MITOCW MIT6_172_F10_lec18_300k-mp4 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for

More information

Bioluminescence Chris Fontas & Forrest Browning

Bioluminescence Chris Fontas & Forrest Browning Bioluminescence Chris Fontas & Forrest Browning Introduction Our goal for the final project was to render a bioluminescent organism. Bioluminescence is a type of luminescence (cold light) resulting from

More information

Recall: Basic Ray Tracer

Recall: Basic Ray Tracer 1 Recall: Ray Tracing Generate an image by backwards tracing the path of light through pixels on an image plane Simulate the interaction of light with objects Recall: Basic Ray Tracer Trace a primary ray

More information

Raytracing CS148 AS3. Due :59pm PDT

Raytracing CS148 AS3. Due :59pm PDT Raytracing CS148 AS3 Due 2010-07-25 11:59pm PDT We start our exploration of Rendering - the process of converting a high-level object-based description of scene into an image. We will do this by building

More information

Recursive Ray Tracing. Ron Goldman Department of Computer Science Rice University

Recursive Ray Tracing. Ron Goldman Department of Computer Science Rice University Recursive Ray Tracing Ron Goldman Department of Computer Science Rice University Setup 1. Eye Point 2. Viewing Screen 3. Light Sources 4. Objects in Scene a. Reflectivity b. Transparency c. Index of Refraction

More information

03 RENDERING PART TWO

03 RENDERING PART TWO 03 RENDERING PART TWO WHAT WE HAVE SO FAR: GEOMETRY AFTER TRANSFORMATION AND SOME BASIC CLIPPING / CULLING TEXTURES AND MAPPING MATERIAL VISUALLY DISTINGUISHES 2 OBJECTS WITH IDENTICAL GEOMETRY FOR NOW,

More information