Shadow Casting with Stencil Buffer for Real-Time Rendering

Size: px
Start display at page:

Download "Shadow Casting with Stencil Buffer for Real-Time Rendering"

Transcription

1 102 The International Arab Journal o Inormation Technology, Vol. 5, No. 4, October Shadow Casting with Stencil Buer or Real-Time Rendering Lee Weng, Daut Daman, and Mohd Rahim Faculty o Computer Science and Inormation System, Universiti Teknologi Malaysia, Malaysia Abstract: We present a new method or real-time rendering o sot shadows in dynamic scenes. Our approach is based on shadow volume algorithm which provides ast, accurate and high quality shadows. The shadow volume algorithm is used to generate hard shadows beore adding ake sot shadows onto it. Although the generated sot shadows are physically inaccurate, this method provides sot shadows that are smooth and perceptually convincing. This proposed hybrid method adds more realism to a dynamic scene which is an important actor in computer graphics. Keywords: Shadow volume, silhouette detection, rendering, depth-pass, sot shadow. Received November 14, 2006; accepted May 31, Introduction Shadows are essential elements to realistic and visually appealing images, but are diicult to compute in most display environments especially in computer games. Similar to lighting, there are increasing levels o realism possible, paid or with decreasing levels o rendering perormance. Since the introduction o shadow volume [7], shadow map [14] and ake shadows [5], there have been numerous developments done to improve shadow algorithm in real-time graphic application. Among current issues concerns real-time dynamic sot shadows and hardware improvement that improvise real-time shadow generation. The important element in shadows is the dynamic and accuracy o the hard shadow as it provides inormation and spatial cue while the sot shadow determines the type o light source. Thus in this research, we attempt to create an accurate real-time dynamic ake sot shadow, where the hard shadow will be accurate and dynamic and the sot shadow will be ake. Stencil shadow volume algorithm will be combined with plateaus sot shadow in order to create the dynamic ake sot shadow. 2. Related Work Early work on shadows bring us back to 1977 where Frank Crow irst published his paper on shadow algorithm or computer graphics [7], in which his method explicitly clip shadows geometry to the view rustums, generating perect caps where the volume crosses a clipping plane. [11] suggested the use o stencil buer in implementing crow's original algorithm which gave the algorithm the name by which it is best known today. Stencil shadows belong to the group o volumetric shadow algorithms as the shadowed volume in the scene is explicit in the algorithm. In 2000, Carmack suggested a slightly dierent approach which entails that the view rays are traced rom ininity towards the eye, stopping when encountering the pixel on the geometry that is closest to the eye [6]. This reversal o the view rays' direction has given the algorithm the name Carmack s Reverse. [13] created a hybrid algorithm that uses a aster z- pass rendering when the viewport is not shadowed and reverts to robust z-ail rendering when the viewport is shadowed. Following this, several other shadow volume improvements have also been suggested; papers [1, 2, 3] or example described how to create sot shadows using penumbra wedges rendered rom shadow volume. [9] developed a technique or highly eicient coverage calculation or spherical light sources. The technique can avoid clipping operations in the pixel shader and let the texture sampler do the clipping or ree. The only setback is the technique is limited to spherical shaped light source only. 3. Algorithm Our proposed method combines the existing stencil shadow volume algorithm with the concepts o Heckbert and Her s sot shadow technique [10] which was originally or shadow map. This research was divided into two important steps, as shown in Figure Step 1: Creating Hard Shadow - Shadow Volume A shadow volume or an object and light is the volume o space that is shadowed. That is, all points in the volume are in the shadow or that light. In

2 103 The International Arab Journal o Inormation Technology, Vol. 5, No. 4, October generating shadow volume, the irst step is to create the shadow volume using the silhouette edges o shadowing object/ occluder as seen by the light source. The edges are then extruded away rom the light as shown in Figure 2. should not depend on any particular light source. Make sure depth buer is written. B. Starting with a light source, clear the stencil buer and calculate the silhouette o all the occluders with respect to the light source. C. Extrude the silhouette away rom the light source to an ininite distance to orm the shadow. D. Render the shadow volumes using the depth-pass. E. Using the updated stencil buer, do a lighting pass to shade (make it a tone darker) the ragments that corresponds to non-zero stencil values. F. Repeat step 2 to 5 or all the lights in the scene. Figure 1. Research methodology. Figure 3. Shadow volume clipping with view volume. Figure 2. Silhouette edge. Next, as shown in Figure 3, the shadow volume is clipped to the view/ camera volume, and orms the polygons that bound the shadow volume. The inal result is a set o shadow volume boundary polygons with all points within the shadow volume are in the shadow. Along a ray rom the eye, we can track the shadow state by looking at intersections with shadow volume boundaries ollowing the rules below (assume the eye is not in shadow): Each time the ray crosses a ront acing shadow polygon, add one to a counter. Each time the ray crosses a back-acing shadow polygon, subtract one rom a counter. Places where the counter is zero are lit, others are shadowed. The algorithm to implement stencil shadow volumes is summarized as the ollowing [12]: A. Render all the objects using only ambient lighting and any other surace-shading attribute. Rendering From the above list o steps, it should be quite obvious that having more lights leads to having more passes, which can increase rame rate intensity. Thus, we have to be very selective when deciding which lights should be used or casting shadows Silhouette Determination As stated beore, the very irst step to construct a shadow volume is to determine the silhouette o the occluder. The stencil shadow algorithm requires that the occluders be closed triangle meshes. This means that every edge in the model must only be shared by 2 triangles thus disallowing any holes that would expose the interior o the model. There are many ways to calculate the silhouette edges and every single one o these methods are CPU cycles hungry. Edge connectivity inormation must be precomputed so that we can determine a mesh s silhouette or shadow volume rendering. The method used here can be explained by using an array o N vertices V 1, V 2..,V N and an array o M triangle aces F 1, F 2,.., F M. Each triangle aces simply indicate which three vertices it uses by storing three integer indexes i 1, i 2 and i 3. An index i p precedes an index i q i the number p immediately precedes the number q in

3 Shadow Casting with Stencil Buer or Real-Time Rendering 104 the cyclic chain The indexes i 1, i 2 and i 3 are ordered such that the positions o the vertices V i 1, V i 2 and V i 3 to which they reer are wound counterclockwise about the triangles normal vector. Suppose that two triangles share an edge with endpoints o vertices V a and V b. The consistent winding rule enorces the property that or one o the triangle aces, the index reerring to V a precedes the index reerring to V b and that or the other triangle and the index reerring to V b precedes the index reerring to V a. With this the edges o a triangle mesh can be identiied by making a single pass through the triangle ace list. For any triangle having vertex indexes i 1, i 2 and i 3, create an edge record or every instance in which i 1 i 2, i 2 i 3, and i 3 i 1 and store the index o the current triangle ace in the edge record. Once all the edges are identiied, make a second pass through the triangle ace list to ind the second triangle that shares each edge. This is done by locating triangles or which i 1 i 2, i 2 i 3, or i 3 i 1 and matching it to an edge having the same vertex indexes that has not yet been supplied with a second triangle index. The general concept o the explanation above can be summarized in the ollowing pseudo code: A.or each triangle ace (A) in the object/ model B. or each edge in A C. i we don t know this edges triangle ace (neighbors) yet D.or each triangle ace (B) in the object/ model except A E. or each edge in B F. i A s edge is the same as B s edge, then they are neighboring each other on that edge, set the neighbor property or each triangle ace A and B, then move onto next edge in A. With the edge list o a triangle mesh/ ace, the silhouette is determined by substituting the light position with the plane equation. A triangle ace that is visible to light source will have a value o plane equation>0 otherwise the triangle ace is not visible rom light source. The silhouette is equal to the set o edges shared by one triangle ace that is visible by the light and one triangle ace that is not visible by the light. This is done by going through all the triangle aces and i it is visible, the edges are checked. I at the edge, there is no neighboring triangle ace or the neighboring triangle ace is not visible to light source then this edge is a silhouette and it cast shadow. It is important to note that silhouette determination is one o the two most expensive operations in stencil shadow volume implementation. The other operation is the shadow volume rendering passes to update the stencil buer. These two areas are the prime candidates or aggressive optimizations Shadow Volume Construction Once the set o an object s silhouette edges is determined with respect to a light source, each edge must be extruded away rom the light source s position to orm the object s shadow volume. For a point light source, which was implemented in this research prototype, the extrusion o the silhouette edges consist a set o quads (which can also be substituted with triangle strips). The quads are constructed rom the two vertices belonging to an edge and two additional vertices corresponding to the extrusion o the same edge to ininity (a large value) by using homogeneous coordinates. Shadow volume is extruded to ininity in order to avoid light source being too close to an occluder. I this happens, the situation shown in Figure 4 will occur where a inite shadow volume extrusion ails to cover all the shadow receivers in a scene. However, it is not compulsory to extrude the silhouette edges to ininity i it is ensured that the situation in Figure 4 can be avoided. In practical cases, a large value would normally be more than adequate. Figure 4. Finite shadow volume ails to shadow other objects. The extrusion distance is the distance the vertices o the bottom cap o the shadow volume are extruded away rom the light. The approach implemented in this research prototype is brute orce approach that simply draws the extrusion polygon to ininity (a large value) and the shadow volume is just clipped against all the polygon it encounters (reer Figure 5 or illustration). The procedure o silhouette determination and getting the triangle aces that is visible to light source will provide a triangle aces that are situated at the edge o the silhouette, a triangle ace with no neighboring triangle ace or the neighboring triangle ace is not visible to light source (reer Figure 6) which will be called silhouette triangle ace rom this point on. With a single silhouette triangle ace (marked with black and white lines in Figure 6), edge test are done

4 105 The International Arab Journal o Inormation Technology, Vol. 5, No. 4, October so that the edge o the silhouette (the black line edge) can be obtained. That single edge provides two vertices which will be used to extrude another two vertices that will be generated ater this. Ater obtaining the two vertices, the extrusion to ininity will be done using homogeneous coordinates. Here a basic scaling transormation is used to extrude the shadow volume by using the two vertices o the silhouette edge. This will produce two new vertices which are projected along the vector between the light source and the irst silhouette edge. It is scaled to INFINITY (the variable used in the implemented prototype or ininity value) which has been set to a very large value (reer Figure 7). Ininity Occluder/ object Shadow volume Shadow at d, distances Figure 5. Extrusion option. Light source Depth-pass is also commonly known as z-pass. Let's assume that the objects had already been rendered onto the rame buer prior to the above stenciling operations. This means that the depth buer would have been set with the correct values or depth testing or z-testing. Reerring to Figure 8, the two letmost ray originating rom the eye position does not hit any part o the shadow volume (in grey), hence the resultant stencil values is 0, which means that the ragment represented by this two rays are not in shadow. The 3 rd ray rom the let, when the ront ace o the shadow volume is rendered, the depth test would pass and the stencil value would be incremented to 1. However when the back ace o the shadow volume is rendered, the depth test would ail since the back ace o the shadow volume is behind the occluder. Thus the stencil value or the ragment represented by this ray remains at 1. This means that the ragment is in shadow since its stencil value is non-zero. Silhouette edge with two vertices New vertices To INFINITY Light source Silhouette triangle ace Shadow volume Figure 7. Extruding to INFINITY by producing two new vertices. Figure 6. The edge or casting shadow volume. The scaling transormations used to produce the new vertices are shown below; x ' = x + ( x x ) s (1) y ' = y + ( y y ) s (2) z ' = z + ( z z ) s (3) Vertices P (x, y, z ) is a new vertex, L(x, y, z) is the light source location and O(x, y, z) is the vertex rom the silhouette edge. With two vertices rom the silhouette edge, using the above equation, two new vertices are produced and this orm the quadrilateral (in research prototype implementation triangle strips are used) needed to create shadow volume. Ater creating the shadow volume the next process is to render it so that the hard shadow is visible, which will be explained in the next section Rendering Shadow Volume with Depth Pass x z y Figure 8. Depth-pass. Ater determining the object s silhouette with respect to a light source and constructing a shadow volume by extruding the silhouette edges away rom the light source, inally the shadow volume is ready to be rendered into stencil buer using depth-pass technique. The rame buer is cleared and an ambient rendering pass is perormed to initialize the depth buer. Lighting is disabled because there will be no rendering to the colour buer except the stencil buer. Then the stencil buer is cleared, initialized and conigured so that it always passes (which is why it is called depth-pass technique). The depth test is conigured to always pass only when ragment depth values are less or equal than those already in the depth

5 Shadow Casting with Stencil Buer or Real-Time Rendering 106 buer. The drawing will only be done into the stencil buer, write to colour buer and depth buer are disabled so that shadow volume don t appear as solid objects in the depth buer. Shadow volume aces which were constructed as described earlier are rendered using dierent stencil operations depending on whether they are acing towards or away rom the camera. It is rendered in two passes, irst pass increase the stencil buer with ront aces (casting shadow) and the second pass decrease the stencil buer with back aces ( turning o the shadow between the object and any other suraces). Once shadow volumes have been rendered or all objects that could potentially cast shadows into the visible region o the scene, it will cause all the areas that are in the shadow volume to have a non-zero stencil value while all those areas in the light area remain zero. Lighting pass is perormed to illuminate suraces where the stencil value remain zero, re-enable write to the colour buer, change the depth test to pass only when ragment depth values are equal or less to those in the depth buer and conigure the stencil test to pass when the value in stencil buer is not equal to zero. Finally, a blend drawn over the whole screen will cast a shadow which is how the hard shadow is produced. This ulils the irst objective o generating accurate hard shadow. The technique is known as depth-pass technique since it manipulates the stencil values only when the depth test passes, and below is the general overview o the algorithm; A.Render ront ace o shadow volume. I depth test passes, increment stencil value, else does nothing. Disable draw to rame and depth buer. B. Render back ace o shadow volume. I depth test passes, decrement stencil value, else does nothing. Disable draw to rame and depth buer Step 2: Adding Fake Sot Shadows Adding ake sot shadows to existing shadows generated by shadow volume will increase the realism o the shadow in a 3D scene. Our proposed method in implementing sot shadows in shadow volume was developed originally rom the concept rom [10] along with the well-known stencil shadow volume. The algorithm by [10] had been previously implemented in shadow map algorithm where the result proved to be quite convincing even though it is not a conventional method. The algorithm was implemented at interactive rates by exploiting graphics workstation hardware. Since hardware have become increasingly aster and more aordable, nowadays this technique is easible to be implemented on desktop computers with an adequate graphic card. Our method was developed by methodically addressing the undamental limitations o the conventional stenciled shadow volume approach towards sot shadow and also the approach taken by previous researchers. The work low is shown in Figure 9 ollowed by brie description o each step. Get the original hard shadow geometrics Generate new sample o hard shadows with new blending o gradient colour Blend/average the sample o new hard shadows with original hard shadow Figure 9. Work low or adding sot shadows Get the Original Hard Shadow Geometrics The very irst step in generating the sot shadows is to obtain the geometrics o the hard shadows generated earlier. This were done by saving all the generated coordinates o the vertices while rendering shadow volume in depth-pass technique so that no recalculation is needed, saving ample computation cost Generate Samples o Hard Shadows Next is to generate samples o hard shadows with the blending o gradient colours. This can be done by drawing the same shadow volume geometrics obtained earlier only that the size o the shadow volume polygon is scaled to be slightly bigger than the original shadow volume, as shown in Figure 10. The number o samples that needs to be generated depends on how high the required quality o the sot shadows beore blending it with gradient o reduced shadow colours. Figure 10. Samples o new hard shadows generated. While generating these samples doesn t aect much o the processing time but rendering it again with depth-pass and stencil buer test does involve a

6 107 The International Arab Journal o Inormation Technology, Vol. 5, No. 4, October lot o processing. Thus the number o samples generated must be taken into consideration so that it won t slow down the rame rate. Although the more samples generated will produce a higher quality o sot shadows, this will also in turn increase CPU consumption Blending Samples o Hard Shadows Ater the samples were generated, the last step is to blend or average out the samples together with the original shadow volume. This process is done by stacking the samples on top o one another, starting with the lightest sample to the darkest sample available and inally to the original shadow volume. The illustration is shown in Figure 11. Stacking Figure 11. Stacking o the sample and original shadow volume. The order o the stacking must be done rom the less dark to the darkest so that the produced sot shadow will create a penumbrae eect to the edges o the original shadow. As shown in Figure 12, the dierence can be seen when compared this with the original shadow volume with only the hard shadow. Original hard shadow Sample hard shadow 4. Results Gap actor Figure 13. Length and gap actor. As one o the main goals or this research was to test the applicability o sot shadow in a true 3D environment, the prototype implementation o our method and testing stage were done using complex, high polygon models. The tests perormed are the accuracy or resemblance test, ollowed by quality test and lastly real-time test. Side by side visual comparisons with reerence examples were used to determine the accuracy o the produced shadow on how ar it resembles real lie shadow. This comparison approach was also applied to measure the quality o the produced ake sot shadows. Speed test were perormed by observing the rame rate and comparing it to reerence examples. The running time o the algorithms depends on actors such as number o polygons, desired quality, screen resolution, graphics hardware and also the speed o the CPU Accuracy or Resemblance Test Length actor The shadows generated by the prototype are guaranteed true, real and accurate as it uses the model or shadow caster geometric to produce the shadow. Moreover there is no model simpliication done to optimize rendering. By providing the graphic images o the implemented shadow below, it is shown that the shadow in this research prototype is accurate and urthermore resembles the model/ shadow caster, as shown in Figure 14. Figure 12. Comparison o original shadow volume and new sot shadow volume. The creation o sot shadow using this technique accepts two parameters that can dierentiate the quality o the sot shadow produced. The irst parameter is the length actor which determines how ar the penumbrae or the sot shadow will be extended to and the second parameter is the gap actor which determines the gap between the samples o the hard shadows produced (reer Figure 13). The number o samples the hard shadow produced depends on the length and gap actor which is equal to length divided by gap. The produced new sot shadow will have a more realistic and convincing eect compared to the original algorithm, thus ulilling the second objective o this research Quality Test Figure 14. Resemblance test. The test involved rendering a cube with 8 vertices and 12 aces o triangle polygons using dierent values o length and gap actors as parameters. Images rom test results were captured and the number o polygon

7 Shadow Casting with Stencil Buer or Real-Time Rendering 108 triangles produced was recorded so that comparison and analysis can be done to evaluate the quality o the sot shadow produced. Figure 15 illustrate the result. Figure 15. Test results using cube with dierent length and gap. The test results achieved a rame per second rate o 60, which can be deemed as a good run time rate. The captured images also show that with increased number o rendered polygon triangles, along with smaller gap and greater length parameters will produce a better quality o sot shadow. Although these parameters provided a good blending o the shadow with the environment, some drawbacks were also ound. The bigger the gap is the more aliasing eect will be visible to the image, as shown in the images with 1.0 gap actor in Figure 15. Greater length also causes more changes to the geometric shape o the shadow. Thus it is concluded rom this test that or this model or shadow caster the appropriate value or parameter length should be between 2 to 3, as any dierent value will cause dramatic changes in geometric shape. Moreover, the optimized gap actor value or this cube should be anywhere between 0.3 to 0.5, as the produced sot shadow will not be visible to the human eyes i any dierent values were used, beside causing aliasing eect. This also applies to model or shadow caster other than cubes which was not shown here. We also conduct tests by visually comparing the shadow images rendered by our research prototype in comparison to other existing algorithm. We choose the shadow volume algorithm [1], known as Approximate Sot Shadow on Arbitrary Suraces Using Penumbra Wedge to be our reerence example. The chosen model or shadow caster was a cube and sphere; this was done without any other model in the scene except the wall and loor. The result showed that our prototype were able to render at about 60 FPS which was about 6 time aster than Ul and Tomas algorithm although the quality o our produced sot shadow is undeniably lesser. However, the sot shadows produced were still convincingly realistic on top o being able to render at real-time speed. The comparison is shown in Figure 16. Figure 16. Comparison o sot shadow generated Real-Time Test One way to obtain a ast sot shadow algorithm is to utilize graphics hardware. According to Moore s Law, the speed o graphics hardware has so ar more than doubled every 12 months, compare to CPUs which double approximately every 18 months. As shadow volume requires a lot o computations especially in silhouette edge determination and twopass rendering, it is very high consuming or both CPU and GPU processor. Here, the shadow volume algorithm developed by Ul and Tomas will again be used as a reerence example to compare its speed with our produced algorithm. Both algorithms will be tested against three dierent hardware systems to determine the best system available to the public. Our proposed method was tested using the same model or shadow caster that was used in Ul and Tomas implementation. The quality o the sot shadow produced by both algorithms was identically leveled with parameters set to 3.0 or length and 0.3 or gap. Identical resolution at 800x600 with 32 bit colours was also set as the environment or both algorithms. This is to ensure that the same amounts o polygon are used to render the sot shadow so that a precise comparison can be done. Two graphs were produced at the end o the test shown here as Figure 17 and 18. Figure 17 shows the result o the test using our proposed method where system 2 is shown to be the best system, ollowed by system 3 and system 1.

8 109 The International Arab Journal o Inormation Technology, Vol. 5, No. 4, October the number o triangle polygon count increased three times. However, in terms o speed this test has shown that our proposed method perormed much better than Ul and Tomas sot shadow algorithm as it has at least matches the FPS or even aster, which at one point it was eleven times aster. Figure 17. FPS vs. model polygon count or 3 dierent systems using ake sot shadow volume with stencil buer. From here it could be concluded that system 1 requires a much better graphics hardware and system as it can only achieve 10 FPS with 216 polygons and will dropped even urther to 3 FPS i the numbers o polygon exceed 500. System 2 only have 1.5 GHz CPU and 768 MB RAM, much lower than system 3 which have a 2.4 GHz CPU and 1 GB RAM but yet the graphic card used in system 2 was way too powerul and was able to render sot shadow at almost 640 FPS or 200 polygons. However, it also gradually goes down to FPS ater the number o polygon exceeds 500 as the object geometric become complex. System 3 is a mid range system which is able to render sot shadow at 60 FPS or polygons below 250. Ater 500 o triangle polygons the FPS remain static at 15 FPS even though the number o polygons reached Figure 18. FPS vs. model polygon count or 3 dierent systems with approximate sot shadows on arbitrary suraces using penumbra wedges algorithm. Figure 18 above is the result o the test using Ul and Tomas sot shadow algorithm where in comparison to the graph in Figure 17, shows a much slower rate o FPS. From the graph it is shown that the maximum FPS is not very high but as the number o triangle polygons increase, the decreasing o FPS is not as low as the statistic shown in Figure 17. The graph had shown that it only decreased almost two to three times in FPS as 5. Conclusions and Future Work In this paper we have shown a method to generate an accurate hard shadow volume and adding ake sot shadows onto it. Among clear beneits is that the method produces high quality sot shadows at high speed. This method can be urther improved and be implemented using programmable graphics hardware to achieve real-time perormance. An important aspect yet to be incorporated is how to extend the eect o shadows onto other suraces and objects in the scene other than planar/ surace. Thus this area is something we would like to explore in our uture work in attempts to urther improve eiciency. Problems concerning shadow volumes that intersect at near or ar clipping plane were not discussed in this paper as the solution were already presented in [8]. Reerences [1] Akenine-Moller T. and Assarsson U., Approximate Sot Shadows on Arbitrary Suraces Using Penumbra Wedges, in Proceedings o the 13 th Eurographics Workshop on Rendering, Eurographics Association, pp , [2] Assarsson U. and Akenine-Moller T., A Geometry-Based Sot Shadow Volume Algorithm Using Graphics Hardware, ACM Transactions on Graphics, vol. 22, no. 3, pp , [3] Assarsson U., Dougherty M., Mounier M., and Akenine-Möller T., An Optimized Sot Shadow Volume Algorithm with Real-Time Perormance, in Proceedings o ACM SIGGRAPH/ EUROGRAPHICS Conerence on Graphics Hardware, Eurographics Association, pp , [4] Blinn J. and Corner J., A Trip Down the Graphics Pipeline, Morgan Kaumann Publishers, San Francisco, [5] Blinn J., Me and My (Fake) Shadow, IEEE Computer Graphics and Applications, vol. 8, no. 1, pp , [6] Carmack J., John carmack on shadow volumes, object/ robustshadow - volumes.html, [7] Crow F., Shadow Algorithms or Computer Graphics, ACM SIGGRAPH Computer

9 Shadow Casting with Stencil Buer or Real-Time Rendering 110 Graphics (SIGGRAPH 77), vol. 11, no. 3, pp , [8] Everitt C. and Killgard M., Practical and Robust Stenciled Shadow Volumes or Hardware- Accelerated Rendering, Technical Report, NVIDIA Cooperation, [9] Fauerby K. and Kjaer C., Real-Time Sot Shadows in a Game Engine, Master s Thesis, [10] Heckbert P. and Her M., Simulating Sot Shadows with Graphics Hardware, Technical Report CMU-CS , Carnegie Mellon University, January [11] Heidmann T., Real Shadows, Real Time, Iris Universe, vol. 18, pp , Silicon Graphics Inc., 1991 [12] Kwoon H., The Theory o Stencil Shadow Volumes, [13] Lengyel E., The Mechanics o Robust Stencil Shadows, Gamasutra, com/eatures/ /lengyel_01.htm, [14] Williams L., Casting Curved Shadows on Curved Suraces, Computer Graphics, vol. 12, no. 3, Mohd Rahim received his Diploma in computer science 1997, BSc computer science 1999 orm University Teknologi Malaysia and MSc in GIS and visualization in 2002 rom University Teknologi Malaysia. Now he is going to complete the PhD (spatial modelling) in University Putra Malaysia. He also is lecturer in Department o Computer Graphic and Multimedia, Faculty o Computer Science and Inormation System o University Teknologi Malaysia. He has over 8 years o experience in the ield o computer graphics and visualization and GIS data model. He has also been actively involved in many research projects related to GIS and visualization, GIS data management, computer graphics and has published more than 70 publications. Currently his research was on going in spatial, temporal and spatiotemporal data management applications, 3D data visualization, mobile computing or computer graphics application. Lee Weng received his BSc orm Universiti Teknologi Malaysia in computer science with majoring computer graphics. He also receives MSc rom University Teknologi, Malaysia, in computer science with research project in computer games. He is currently a senior computer graphics engineer at international company which is Seagate Penang, Malaysia. Daut Daman received his BSc orm University Sains Malaysia and MSc rom University o Cranield, United Kingdom. He is currently an associate proessor in the Faculty o Computer Science and Inormation System o Universiti Teknologi Malaysia. He has over 27 years o experience in the ield o computer graphics and visualization. He has also been actively involved in many research projects related to computer graphics and visualization and has published more than 120 publications.

Shadow Rendering EDA101 Advanced Shading and Rendering

Shadow Rendering EDA101 Advanced Shading and Rendering Shadow Rendering EDA101 Advanced Shading and Rendering 2006 Tomas Akenine-Möller 1 Why, oh why? (1) Shadows provide cues about spatial relationships among objects 2006 Tomas Akenine-Möller 2 Why, oh why?

More information

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important?

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important? Last Time Modeling Transformations Illumination (Shading) Real-Time Shadows Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Graphics Pipeline Clipping Rasterization

More information

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality.

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality. Last Time Modeling Transformations Illumination (Shading) Real-Time Shadows Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Graphics Pipeline Clipping Rasterization

More information

Last Time. Reading for Today: Graphics Pipeline. Clipping. Rasterization

Last Time. Reading for Today: Graphics Pipeline. Clipping. Rasterization Last Time Modeling Transformations Illumination (Shading) Real-Time Shadows Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Scan Conversion (Rasterization) Visibility

More information

Computer Graphics Shadow Algorithms

Computer Graphics Shadow Algorithms Computer Graphics Shadow Algorithms Computer Graphics Computer Science Department University of Freiburg WS 11 Outline introduction projection shadows shadow maps shadow volumes conclusion Motivation shadows

More information

Real-Time Shadows. Last Time? Today. Why are Shadows Important? Shadows as a Depth Cue. For Intuition about Scene Lighting

Real-Time Shadows. Last Time? Today. Why are Shadows Important? Shadows as a Depth Cue. For Intuition about Scene Lighting Last Time? Real-Time Shadows Today Why are Shadows Important? Shadows & Soft Shadows in Ray Tracing Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes Why are Shadows Important? Depth

More information

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today!

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today! Last Time? Real-Time Shadows Perspective-Correct Interpolation Texture Coordinates Procedural Solid Textures Other Mapping Bump Displacement Environment Lighting Textures can Alias Aliasing is the under-sampling

More information

Real-Time Shadows. MIT EECS 6.837, Durand and Cutler

Real-Time Shadows. MIT EECS 6.837, Durand and Cutler Real-Time Shadows Last Time? The graphics pipeline Clipping & rasterization of polygons Visibility the depth buffer (z-buffer) Schedule Quiz 2: Thursday November 20 th, in class (two weeks from Thursday)

More information

Real-Time Shadows. Last Time? Schedule. Questions? Today. Why are Shadows Important?

Real-Time Shadows. Last Time? Schedule. Questions? Today. Why are Shadows Important? Last Time? Real-Time Shadows The graphics pipeline Clipping & rasterization of polygons Visibility the depth buffer (z-buffer) Schedule Questions? Quiz 2: Thursday November 2 th, in class (two weeks from

More information

Computer Graphics 10 - Shadows

Computer Graphics 10 - Shadows Computer Graphics 10 - Shadows Tom Thorne Slides courtesy of Taku Komura www.inf.ed.ac.uk/teaching/courses/cg Overview Shadows Overview Projective shadows Shadow textures Shadow volume Shadow map Soft

More information

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1 Real-Time Shadows Computer Graphics MIT EECS 6.837 Durand 1 Why are Shadows Important? Depth cue Scene Lighting Realism Contact points 2 Shadows as a Depth Cue source unknown. All rights reserved. This

More information

Lecture 17: Shadows. Projects. Why Shadows? Shadows. Using the Shadow Map. Shadow Maps. Proposals due today. I will mail out comments

Lecture 17: Shadows. Projects. Why Shadows? Shadows. Using the Shadow Map. Shadow Maps. Proposals due today. I will mail out comments Projects Lecture 17: Shadows Proposals due today I will mail out comments Fall 2004 Kavita Bala Computer Science Cornell University Grading HW 1: will email comments asap Why Shadows? Crucial for spatial

More information

Shadows in the graphics pipeline

Shadows in the graphics pipeline Shadows in the graphics pipeline Steve Marschner Cornell University CS 569 Spring 2008, 19 February There are a number of visual cues that help let the viewer know about the 3D relationships between objects

More information

Volume Shadows Tutorial Nuclear / the Lab

Volume Shadows Tutorial Nuclear / the Lab Volume Shadows Tutorial Nuclear / the Lab Introduction As you probably know the most popular rendering technique, when speed is more important than quality (i.e. realtime rendering), is polygon rasterization.

More information

Robust Stencil Shadow Volumes. CEDEC 2001 Tokyo, Japan

Robust Stencil Shadow Volumes. CEDEC 2001 Tokyo, Japan Robust Stencil Shadow Volumes CEDEC 2001 Tokyo, Japan Mark J. Kilgard Graphics Software Engineer NVIDIA Corporation 2 Games Begin to Embrace Robust Shadows 3 John Carmack s new Doom engine leads the way

More information

What for? Shadows tell us about the relative locations. Vienna University of Technology 2

What for? Shadows tell us about the relative locations. Vienna University of Technology 2 Shadows What for? Shadows tell us about the relative locations and motions of objects Vienna University of Technology 2 What for? Shadows tell us about the relative locations and motions of objects And

More information

Computer Graphics. Shadows

Computer Graphics. Shadows Computer Graphics Lecture 10 Shadows Taku Komura Today Shadows Overview Projective shadows Shadow texture Shadow volume Shadow map Soft shadows Why Shadows? Shadows tell us about the relative locations

More information

Overview. A real-time shadow approach for an Augmented Reality application using shadow volumes. Augmented Reality.

Overview. A real-time shadow approach for an Augmented Reality application using shadow volumes. Augmented Reality. Overview A real-time shadow approach for an Augmented Reality application using shadow volumes Introduction of Concepts Standard Stenciled Shadow Volumes Method Proposed Approach in AR Application Experimental

More information

Real-Time Volume Shadow using Visible-Non Visible Algorithm

Real-Time Volume Shadow using Visible-Non Visible Algorithm Journal of Computer Science 7 (7): 980-985, 2011 ISSN 1549-3636 2011 Science Publications Real-Time Volume Shadow using Visible-Non Visible Algorithm Hoshang Kolivand, Mohd Shahrizal Sunar, Azam Amirshakarami

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

Texture Mapping II. Light maps Environment Maps Projective Textures Bump Maps Displacement Maps Solid Textures Mipmaps Shadows 1. 7.

Texture Mapping II. Light maps Environment Maps Projective Textures Bump Maps Displacement Maps Solid Textures Mipmaps Shadows 1. 7. Texture Mapping II Light maps Environment Maps Projective Textures Bump Maps Displacement Maps Solid Textures Mipmaps Shadows 1 Light Maps Simulates the effect of a local light source + = Can be pre-computed

More information

An Optimized Soft Shadow Volume Algorithm with Real-Time Performance

An Optimized Soft Shadow Volume Algorithm with Real-Time Performance Graphics Hardware (2003) M. Doggett, W. Heidrich, W. Mark, A. Schilling (Editors) An Optimized Soft Shadow Volume Algorithm with Real-Time Performance Ulf Assarsson, 1 Michael Dougherty, 2 Michael Mounier,

More information

Shadows. Real-Time Hard Shadows. Collected by Ronen Gvili. Most slides were taken from : Fredu Durand Stefan Brabec

Shadows. Real-Time Hard Shadows. Collected by Ronen Gvili. Most slides were taken from : Fredu Durand Stefan Brabec Shadows Real-Time Hard Shadows Collected by Ronen Gvili. Most slides were taken from : Fredu Durand Stefan Brabec Hard Shadows Planar (Projected) Shadows Shadow Maps Volume (Stencil) Shadows 1 Soft Shadows

More information

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time

More information

Shadows. COMP 575/770 Spring 2013

Shadows. COMP 575/770 Spring 2013 Shadows COMP 575/770 Spring 2013 Shadows in Ray Tracing Shadows are important for realism Basic idea: figure out whether a point on an object is illuminated by a light source Easy for ray tracers Just

More information

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time

More information

In- Class Exercises for Shadow Algorithms

In- Class Exercises for Shadow Algorithms In- Class Exercises for Shadow Algorithms Alex Wiens and Gitta Domik, University of Paderborn, Germany Abstract: We are describing two exercises to deepen the understanding of two popular real-time shadow

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Last Time? The Traditional Graphics Pipeline Participating Media Measuring BRDFs 3D Digitizing & Scattering BSSRDFs Monte Carlo Simulation Dipole Approximation Today Ray Casting / Tracing Advantages? Ray

More information

Creating soft shadows

Creating soft shadows A Hybrid Approach One more shadow algorithm which deserves mention is McCool s clever idea shadow volume reconstruction from depth maps [McCool 2000]. This algorithm is a hybrid of the shadow map and shadow

More information

Shadow Algorithms. CSE 781 Winter Han-Wei Shen

Shadow Algorithms. CSE 781 Winter Han-Wei Shen Shadow Algorithms CSE 781 Winter 2010 Han-Wei Shen Why Shadows? Makes 3D Graphics more believable Provides additional cues for the shapes and relative positions of objects in 3D What is shadow? Shadow:

More information

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane Rendering Pipeline Rendering Converting a 3D scene to a 2D image Rendering Light Camera 3D Model View Plane Rendering Converting a 3D scene to a 2D image Basic rendering tasks: Modeling: creating the world

More information

Shadow Techniques. Sim Dietrich NVIDIA Corporation

Shadow Techniques. Sim Dietrich NVIDIA Corporation Shadow Techniques Sim Dietrich NVIDIA Corporation sim.dietrich@nvidia.com Lighting & Shadows The shadowing solution you choose can greatly influence the engine decisions you make This talk will outline

More information

Computergrafik. Matthias Zwicker. Herbst 2010

Computergrafik. Matthias Zwicker. Herbst 2010 Computergrafik Matthias Zwicker Universität Bern Herbst 2010 Today Bump mapping Shadows Shadow mapping Shadow mapping in OpenGL Bump mapping Surface detail is often the result of small perturbations in

More information

A Shadow Volume Algorithm for Opaque and Transparent Non-Manifold Casters

A Shadow Volume Algorithm for Opaque and Transparent Non-Manifold Casters jgt 2008/7/20 22:19 page 1 #1 Vol. [VOL], No. [ISS]: 1?? A Shadow Volume Algorithm for Opaque and Transparent Non-Manifold Casters Byungmoon Kim 1, Kihwan Kim 2, Greg Turk 2 1 NVIDIA, 2 Georgia Institute

More information

CSE 167: Introduction to Computer Graphics Lecture #18: More Effects. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CSE 167: Introduction to Computer Graphics Lecture #18: More Effects. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 CSE 167: Introduction to Computer Graphics Lecture #18: More Effects Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Announcements TA evaluations CAPE Final project blog

More information

Advanced Shading I: Shadow Rasterization Techniques

Advanced Shading I: Shadow Rasterization Techniques Advanced Shading I: Shadow Rasterization Techniques Shadow Terminology umbra: light totally blocked penumbra: light partially blocked occluder: object blocking light Shadow Terminology umbra: light totally

More information

Abstract. 2 Description of the Effects Used. 1 Introduction Phong Illumination Bump Mapping

Abstract. 2 Description of the Effects Used. 1 Introduction Phong Illumination Bump Mapping Developing a Real-Time Renderer With Optimized Shadow Volumes Mátyás Premecz (email: pmat@freemail.hu) Department of Control Engineering and Information Technology, Budapest University of Technolgy Hungary

More information

An Efficient Approach for Emphasizing Regions of Interest in Ray-Casting based Volume Rendering

An Efficient Approach for Emphasizing Regions of Interest in Ray-Casting based Volume Rendering An Efficient Approach for Emphasizing Regions of Interest in Ray-Casting based Volume Rendering T. Ropinski, F. Steinicke, K. Hinrichs Institut für Informatik, Westfälische Wilhelms-Universität Münster

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Final Projects Proposals due Thursday 4/8 Proposed project summary At least 3 related papers (read & summarized) Description of series of test cases Timeline & initial task assignment The Traditional Graphics

More information

Pipeline Operations. CS 4620 Lecture 10

Pipeline Operations. CS 4620 Lecture 10 Pipeline Operations CS 4620 Lecture 10 2008 Steve Marschner 1 Hidden surface elimination Goal is to figure out which color to make the pixels based on what s in front of what. Hidden surface elimination

More information

Applications of Explicit Early-Z Culling

Applications of Explicit Early-Z Culling Applications of Explicit Early-Z Culling Jason L. Mitchell ATI Research Pedro V. Sander ATI Research Introduction In past years, in the SIGGRAPH Real-Time Shading course, we have covered the details of

More information

Stencil Shadow Volumes

Stencil Shadow Volumes Helsinki University of Technology Telecommunications Software and Multimedia Laboratory T-111.500 Seminar on Computer Graphics Spring 2002 Rendering of High Quality 3D-Graphics Stencil Shadow Volumes Matti

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Last Time? The Traditional Graphics Pipeline Reading for Today A Practical Model for Subsurface Light Transport, Jensen, Marschner, Levoy, & Hanrahan, SIGGRAPH 2001 Participating Media Measuring BRDFs

More information

Recall: Indexing into Cube Map

Recall: Indexing into Cube Map Recall: Indexing into Cube Map Compute R = 2(N V)N-V Object at origin Use largest magnitude component of R to determine face of cube Other 2 components give texture coordinates V R Cube Map Layout Example

More information

Soft shadows. Steve Marschner Cornell University CS 569 Spring 2008, 21 February

Soft shadows. Steve Marschner Cornell University CS 569 Spring 2008, 21 February Soft shadows Steve Marschner Cornell University CS 569 Spring 2008, 21 February Soft shadows are what we normally see in the real world. If you are near a bare halogen bulb, a stage spotlight, or other

More information

COMP 175: Computer Graphics April 11, 2018

COMP 175: Computer Graphics April 11, 2018 Lecture n+1: Recursive Ray Tracer2: Advanced Techniques and Data Structures COMP 175: Computer Graphics April 11, 2018 1/49 Review } Ray Intersect (Assignment 4): questions / comments? } Review of Recursive

More information

Intro to Ray-Tracing & Ray-Surface Acceleration

Intro to Ray-Tracing & Ray-Surface Acceleration Lecture 12 & 13: Intro to Ray-Tracing & Ray-Surface Acceleration Computer Graphics and Imaging UC Berkeley Course Roadmap Rasterization Pipeline Core Concepts Sampling Antialiasing Transforms Geometric

More information

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y. COMP 4801 Final Year Project Ray Tracing for Computer Graphics Final Project Report FYP 15014 by Runjing Liu Advised by Dr. L.Y. Wei 1 Abstract The goal of this project was to use ray tracing in a rendering

More information

Soft Shadow Volumes for Ray Tracing Samuli Laine, Timo Aila, Ulf Assarsson, Jaakko Lethinen, Tomas Akenine-Möller presented by Manuel Lang

Soft Shadow Volumes for Ray Tracing Samuli Laine, Timo Aila, Ulf Assarsson, Jaakko Lethinen, Tomas Akenine-Möller presented by Manuel Lang Soft Shadow Volumes for Ray Tracing Samuli Laine, Timo Aila, Ulf Assarsson, Jaakko Lethinen, Tomas Akenine-Möller presented by Manuel Lang 1 Outline of this presentation Introduction to Soft-Shadows Soft-Shadows

More information

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Spatial Data Structures and Speed-Up Techniques Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Spatial data structures What is it? Data structure that organizes

More information

Acknowledgement: Images and many slides from presentations by Mark J. Kilgard and other Nvidia folks, from slides on developer.nvidia.

Acknowledgement: Images and many slides from presentations by Mark J. Kilgard and other Nvidia folks, from slides on developer.nvidia. Shadows Acknowledgement: Images and many slides from presentations by Mark J. Kilgard and other Nvidia folks, from slides on developer.nvidia.com Practical & Robust Stenciled Shadow Volumes for Hardware-Accelerated

More information

Shading. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller/Fuhrmann

Shading. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller/Fuhrmann Shading Introduction to Computer Graphics Torsten Möller Machiraju/Zhang/Möller/Fuhrmann Reading Chapter 5.5 - Angel Chapter 6.3 - Hughes, van Dam, et al Machiraju/Zhang/Möller/Fuhrmann 2 Shading Illumination

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

Physically-Based Laser Simulation

Physically-Based Laser Simulation Physically-Based Laser Simulation Greg Reshko Carnegie Mellon University reshko@cs.cmu.edu Dave Mowatt Carnegie Mellon University dmowatt@andrew.cmu.edu Abstract In this paper, we describe our work on

More information

CS451Real-time Rendering Pipeline

CS451Real-time Rendering Pipeline 1 CS451Real-time Rendering Pipeline JYH-MING LIEN DEPARTMENT OF COMPUTER SCIENCE GEORGE MASON UNIVERSITY Based on Tomas Akenine-Möller s lecture note You say that you render a 3D 2 scene, but what does

More information

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Shadow Buffer Theory Observation:

More information

Optimized Stencil Shadow Volumes. Cass Everitt & Mark J. Kilgard

Optimized Stencil Shadow Volumes. Cass Everitt & Mark J. Kilgard Optimized Stencil Shadow Volumes Cass Everitt & Mark J. Kilgard Outline: Complete Lecture Review of Stenciled Shadow Volumes Stenciled Shadow Volumes Optimizations More Information Outline: Review of Stenciled

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

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students) TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students) Saturday, January 13 th, 2018, 08:30-12:30 Examiner Ulf Assarsson, tel. 031-772 1775 Permitted Technical Aids None, except

More information

Rasterization Overview

Rasterization Overview Rendering Overview The process of generating an image given a virtual camera objects light sources Various techniques rasterization (topic of this course) raytracing (topic of the course Advanced Computer

More information

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11 Pipeline Operations CS 4620 Lecture 11 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to pixels RASTERIZATION

More information

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015 Enhancing Traditional Rasterization Graphics with Ray Tracing October 2015 James Rumble Developer Technology Engineer, PowerVR Graphics Overview Ray Tracing Fundamentals PowerVR Ray Tracing Pipeline Using

More information

Photorealistic 3D Rendering for VW in Mobile Devices

Photorealistic 3D Rendering for VW in Mobile Devices Abstract University of Arkansas CSCE Department Advanced Virtual Worlds Spring 2013 Photorealistic 3D Rendering for VW in Mobile Devices Rafael Aroxa In the past few years, the demand for high performance

More information

Thesis Report. Thesis Title: Soft Shadow Rendering in Real Time. Shihab Rezwan Manzur ID: CSE Department BRAC University

Thesis Report. Thesis Title: Soft Shadow Rendering in Real Time. Shihab Rezwan Manzur ID: CSE Department BRAC University Thesis Report Thesis Title: Soft Shadow Rendering in Real Time Shihab Rezwan Manzur ID: 09201028 CSE Department BRAC University Supervisor: Professor Dr. Mumit Khan Date: 13-08 - 12 Abstract Shadows have

More information

Shadow Volume History (1) Shadow Volumes. Shadow Volume History (2) Shadow Volume History (3) Shadow Volume Basics. Shadow Volume History (4)

Shadow Volume History (1) Shadow Volumes. Shadow Volume History (2) Shadow Volume History (3) Shadow Volume Basics. Shadow Volume History (4) Shadow Volume History (1) Shadow Volumes Invented by Frank Crow [ 77] Software rendering scan-line approach Brotman and Badler [ 84] Software-based depth-buffered approach Used lots of point lights to

More information

Pipeline Operations. CS 4620 Lecture 14

Pipeline Operations. CS 4620 Lecture 14 Pipeline Operations CS 4620 Lecture 14 2014 Steve Marschner 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives

More information

Computer Graphics. Lecture 9 Environment mapping, Mirroring

Computer Graphics. Lecture 9 Environment mapping, Mirroring Computer Graphics Lecture 9 Environment mapping, Mirroring Today Environment Mapping Introduction Cubic mapping Sphere mapping refractive mapping Mirroring Introduction reflection first stencil buffer

More information

Topics and things to know about them:

Topics and things to know about them: Practice Final CMSC 427 Distributed Tuesday, December 11, 2007 Review Session, Monday, December 17, 5:00pm, 4424 AV Williams Final: 10:30 AM Wednesday, December 19, 2007 General Guidelines: The final will

More information

Real Time Rendering of Complex Height Maps Walking an infinite realistic landscape By: Jeffrey Riaboy Written 9/7/03

Real Time Rendering of Complex Height Maps Walking an infinite realistic landscape By: Jeffrey Riaboy Written 9/7/03 1 Real Time Rendering of Complex Height Maps Walking an infinite realistic landscape By: Jeffrey Riaboy Written 9/7/03 Table of Contents 1 I. Overview 2 II. Creation of the landscape using fractals 3 A.

More information

High Performance Visibility Testing with Screen Segmentation

High Performance Visibility Testing with Screen Segmentation High Performance Visibility Testing with Screen Segmentation Péter Sántó, Béla Fehér Budapest University of Technology and Economics Department of Measurement and Information Systems santo@mit.bme.hu,

More information

CS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017

CS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017 CS354 Computer Graphics Ray Tracing Qixing Huang Januray 24th 2017 Graphics Pipeline Elements of rendering Object Light Material Camera Geometric optics Modern theories of light treat it as both a wave

More information

Deferred Rendering Due: Wednesday November 15 at 10pm

Deferred Rendering Due: Wednesday November 15 at 10pm CMSC 23700 Autumn 2017 Introduction to Computer Graphics Project 4 November 2, 2017 Deferred Rendering Due: Wednesday November 15 at 10pm 1 Summary This assignment uses the same application architecture

More information

Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer

Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer The exam consists of 10 questions. There are 2 points per question for a total of 20 points. You

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

Fondamenti di Grafica 3D The Rasterization Pipeline.

Fondamenti di Grafica 3D The Rasterization Pipeline. Fondamenti di Grafica 3D The Rasterization Pipeline paolo.cignoni@isti.cnr.it http://vcg.isti.cnr.it/~cignoni Ray Casting vs. GPUs for Triangles Ray Casting For each pixel (ray) For each triangle Does

More information

Announcements. Tutorial this week Life of the polygon A1 theory questions

Announcements. Tutorial this week Life of the polygon A1 theory questions Announcements Assignment programming (due Frida) submission directories are ied use (submit -N Ab cscd88 a_solution.tgz) theor will be returned (Wednesda) Midterm Will cover all o the materials so ar including

More information

Real-time Soft Shadows in a Game Engine. Kasper Fauerby Carsten Kjær

Real-time Soft Shadows in a Game Engine. Kasper Fauerby Carsten Kjær Real-time Soft Shadows in a Game Engine Kasper Fauerby (kasper@peroxide.dk) Carsten Kjær (carsten@peroxide.dk) 14th December 2003 Abstract In this thesis we explore the possibilities of using various real-time

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

lecture 19 Shadows - ray tracing - shadow mapping - ambient occlusion Interreflections

lecture 19 Shadows - ray tracing - shadow mapping - ambient occlusion Interreflections lecture 19 Shadows - ray tracing - shadow mapping - ambient occlusion Interreflections In cinema and photography, shadows are important for setting mood and directing attention. Shadows indicate spatial

More information

COMP environment mapping Mar. 12, r = 2n(n v) v

COMP environment mapping Mar. 12, r = 2n(n v) v Rendering mirror surfaces The next texture mapping method assumes we have a mirror surface, or at least a reflectance function that contains a mirror component. Examples might be a car window or hood,

More information

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015 Orthogonal Projection Matrices 1 Objectives Derive the projection matrices used for standard orthogonal projections Introduce oblique projections Introduce projection normalization 2 Normalization Rather

More information

CS 354R: Computer Game Technology

CS 354R: Computer Game Technology CS 354R: Computer Game Technology Texture and Environment Maps Fall 2018 Texture Mapping Problem: colors, normals, etc. are only specified at vertices How do we add detail between vertices without incurring

More information

Real-Time Shadows. André Offringa Timo Laman

Real-Time Shadows. André Offringa Timo Laman Real-Time Shadows André Offringa Timo Laman Real-Time rendering Radiosity/Raytracing not feasible in real-time applications Scene rendered using projection & scan conversion of polygons Advantage: significant

More information

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture Texture CS 475 / CS 675 Computer Graphics Add surface detail Paste a photograph over a surface to provide detail. Texture can change surface colour or modulate surface colour. Lecture 11 : Texture http://en.wikipedia.org/wiki/uv_mapping

More information

lecture 18 - ray tracing - environment mapping - refraction

lecture 18 - ray tracing - environment mapping - refraction lecture 18 - ray tracing - environment mapping - refraction Recall Ray Casting (lectures 7, 8) for each pixel (x,y) { cast a ray through that pixel into the scene, and find the closest surface along the

More information

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture CS 475 / CS 675 Computer Graphics Lecture 11 : Texture Texture Add surface detail Paste a photograph over a surface to provide detail. Texture can change surface colour or modulate surface colour. http://en.wikipedia.org/wiki/uv_mapping

More information

Efficient Rendering of Glossy Reflection Using Graphics Hardware

Efficient Rendering of Glossy Reflection Using Graphics Hardware Efficient Rendering of Glossy Reflection Using Graphics Hardware Yoshinori Dobashi Yuki Yamada Tsuyoshi Yamamoto Hokkaido University Kita-ku Kita 14, Nishi 9, Sapporo 060-0814, Japan Phone: +81.11.706.6530,

More information

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside CS230 : Computer Graphics Lecture 4 Tamar Shinar Computer Science & Engineering UC Riverside Shadows Shadows for each pixel do compute viewing ray if ( ray hits an object with t in [0, inf] ) then compute

More information

LOD and Occlusion Christian Miller CS Fall 2011

LOD and Occlusion Christian Miller CS Fall 2011 LOD and Occlusion Christian Miller CS 354 - Fall 2011 Problem You want to render an enormous island covered in dense vegetation in realtime [Crysis] Scene complexity Many billions of triangles Many gigabytes

More information

Graphics and Interaction Rendering pipeline & object modelling

Graphics and Interaction Rendering pipeline & object modelling 433-324 Graphics and Interaction Rendering pipeline & object modelling Department of Computer Science and Software Engineering The Lecture outline Introduction to Modelling Polygonal geometry The rendering

More information

TSBK03 Screen-Space Ambient Occlusion

TSBK03 Screen-Space Ambient Occlusion TSBK03 Screen-Space Ambient Occlusion Joakim Gebart, Jimmy Liikala December 15, 2013 Contents 1 Abstract 1 2 History 2 2.1 Crysis method..................................... 2 3 Chosen method 2 3.1 Algorithm

More information

Movie: For The Birds. Announcements. Ray Tracing 1. Programming 2 Recap. Programming 3 Info Test data for part 1 (Lines) is available

Movie: For The Birds. Announcements. Ray Tracing 1. Programming 2 Recap. Programming 3 Info Test data for part 1 (Lines) is available Now Playing: Movie: For The Birds Pixar, 2000 Liar Built To Spill from You In Reverse Released April 11, 2006 Ray Tracing 1 Rick Skarbez, Instructor COMP 575 November 1, 2007 Announcements Programming

More information

Penumbra Maps: Approximate Soft Shadows in Real-Time

Penumbra Maps: Approximate Soft Shadows in Real-Time Eurographics Symposium on Rendering 2003 Per Christensen and Daniel Cohen-Or (Editors) Penumbra Maps: Approximate Soft Shadows in Real-Time Chris Wyman and Charles Hansen School of Computing, University

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

Simpler Soft Shadow Mapping Lee Salzman September 20, 2007

Simpler Soft Shadow Mapping Lee Salzman September 20, 2007 Simpler Soft Shadow Mapping Lee Salzman September 20, 2007 Lightmaps, as do other precomputed lighting methods, provide an efficient and pleasing solution for lighting and shadowing of relatively static

More information

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON Deferred Rendering in Killzone 2 Michal Valient Senior Programmer, Guerrilla Talk Outline Forward & Deferred Rendering Overview G-Buffer Layout Shader Creation Deferred Rendering in Detail Rendering Passes

More information

Level of Details in Computer Rendering

Level of Details in Computer Rendering Level of Details in Computer Rendering Ariel Shamir Overview 1. Photo realism vs. Non photo realism (NPR) 2. Objects representations 3. Level of details Photo Realism Vs. Non Pixar Demonstrations Sketching,

More information

Spring 2009 Prof. Hyesoon Kim

Spring 2009 Prof. Hyesoon Kim Spring 2009 Prof. Hyesoon Kim Application Geometry Rasterizer CPU Each stage cane be also pipelined The slowest of the pipeline stage determines the rendering speed. Frames per second (fps) Executes on

More information

RASTERIZING POLYGONS IN IMAGE SPACE

RASTERIZING POLYGONS IN IMAGE SPACE On-Line Computer Graphics Notes RASTERIZING POLYGONS IN IMAGE SPACE Kenneth I. Joy Visualization and Graphics Research Group Department of Computer Science University of California, Davis A fundamental

More information

OpenGL Rendering Pipeline and Programmable Shaders

OpenGL Rendering Pipeline and Programmable Shaders h gpup Topics OpenGL Rendering Pipeline and Programmable s sh gpup Rendering Pipeline Types OpenGL Language Basics h gpup EE 4702- Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline.

More information