Today. Part 1: Ray casting Part 2: Lighting Part 3: Recursive Ray tracing Part 4: Acceleration Techniques
|
|
- Camilla White
- 5 years ago
- Views:
Transcription
1 Ray Tracing
2 Today Part 1: Ray casting Part 2: Lighting Part 3: Recursive Ray tracing Part 4: Acceleration Techniques
3 Example 1
4 Example 2
5 What is 3D Rendering? Construct an image from a 3D model Camera Light Rendering 3D Model View Plane
6 n the Physical World How Do We See? Option 1: shoot rays from lights and see how they move in space until they reach the eye. Problem? When tracing rays from light sources to the eye many are wasted since they never reach the eye Solution: reverse the order shoot rays from the eye until they hit the light?
7 Part : Ray Casting How to find the color of a pixel in an image?
8 First Approximation: Ray Casting 1. Shoot Rays from center of projection through pixels Geometry 2. Find intersection with scene objects 3. Calculate Lighting an approximated color at intersection point Rays through view plane Samples on view plane Eye position
9 Ray Casting mage RayCast (Camera camera, Scene scene, int width, int height) { mage image = new mage(width, height); for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { Ray ray = ConstructRayThroughPixel(camera, i, j); ntersection hit = Findntersection(ray, scene); image[i][j] = GetColor(scene, ray, hit); } } return image; }
10 Stages Per mage Pixel 1. Shoot Rays from center of projection through pixels: Ray ray = ConstructRayThroughPixel(camera, i, j); 2. Find intersection with scene objects ntersection hit = Findntersection(ray, scene); 3. Calculate an approximated color at intersection point image[i][j] = GetColor(scene, ray, hit);
11 Part : Geometry Ray ntersections
12 Constructing Ray Through a Pixel Up direction =V up View Plane back Towards = V to P 0 Right direction = V right V The Ray is defined by: P 0 + tv P
13 2D Example V up W P0 V to D P 1 H
14 2D Example V right = V to x V up Q = frustum half-angle dist = distance to view plane P Q V to width = 2*dist*tan(Q ) 0 dist P 1 V The Ray is defined by: P 0 + tv To define the ray we must find V V right To find V we find P = pixel intersection point: P width P 1 = P 0 + dist*v to P = P 1 ± i * V right for i (0,width/2) Now we can find V = (P - P 0 ) / P - P 0
15 Ray-Scene ntersection 1. Finding the intersection point with a geometric primitive 2. Find closest intersection point in a group of objects (scene) 3. Acceleration techniques 1. Bounding volume hierarchies 2. Spatial partitions
16 Triangle & Sphere ntersection v p 0 P 2 P 0 V P 1 r O p 3 p 1 p 2
17 Other Primitive ntersections Cone, cylinder, ellipsoid: Similar to sphere Box ntersect 3 front-facing planes, return closest Convex polygon Same as triangle (check point-inpolygon algebraically) Concave polygon Same plane intersection More complex point-in-polygon test Algorithms for 3D object intersection:
18 ntersecting a Group of Objects Must find the nearest intersection E D F C A B
19 ntersecting a Scene A Brute Force Approach: ntersection Findntersection(Ray ray, Scene scene) { min_t = infinity min_primitive = NULL For each primitive in scene { t = ntersect(ray, primitive ); if (t < min_t) then min_primitive = primitive min_t = t } } return ntersection(min_t, min_primitive) }
20 Alisaing?
21 Aliasing? Yet again we are sampling a continuous world and get sampling artifacts. Better results: we shoot more than one ray trough each pixel and average their color! (again: smoothing vs. aliasing) P 0
22 Ray Casting 1. Shoot Rays from center of projection through pixels 2. Find intersection with scene objects 3. Calculate an approximated color at intersection point Rays through view plane Samples on view plane Eye position
23 Part : Lighting Determining Pixel Color
24 From Model to Picture Using just color creates a flat image Real color is created by the interaction of light with surface (normal and material) Wireframe Model Without llumination With llumination
25 What we see is not just color! image[i][j] = GetColor(scene, ray, hit); How do we compute radiance for a sample ray? Depends on: Light properties Surface material properties Geometry (interrelations) Other factors: shadows, atmosphere, smoke, fog
26 Different Types of Lights
27 Different Types of Materials
28 Other Factors
29 Goal Must derive computer models for: Emission at light sources Scattering at surfaces Reception at the camera Global Effects Desirable features: Accurate Concise Efficient to compute
30 rradiance The irradiance is a two dimensional function describing the incoming light at a given point.
31 Radiance The radiance is a two dimensional function representing the light reflected from a surface at a given point.
32 Direct llumination Two issues: Emission at light sources Scattering at surfaces Later: global illumination Shadows, reflections
33 Modeling Light Sources L(x,y,z,q,f,l)... describes the intensity of energy, leaving a light source, arriving at location (x,y,z),... from direction (q,f),... with wavelength l (x,y,z) Light
34 Empirical Models deally measure irradiant energy for all situations Too much storage Difficult in practice l
35 Light Source Models (OpenGL) Simple mathematical models: Point light Directional light Spot light
36 Point Light Source Models omni-directional point source (e.g., bulb) ntensity ( 0 ), Position (px, py, pz), Factors (k c, k l, k q ) for attenuation with distance (d) Light d (px, py, pz) L k c k l d 0 k q d 2
37 Directional Light Source Models point light source at infinity (e.g., sun) ntensity ( 0 ), Direction (dx,dy,dz) No attenuation with distance Light L 0( D L) (dx, dy, dz)
38 Spot Light Source Models point light source with direction (e.g., Luxo) ntensity ( 0 ), Position (px, py, pz), Direction D=(dx, dy, dz) L Attenuation k c 0( D L) k d k l q d 2 (px, py, pz) D L g d Spotlight
39 Scattering at surfaces Basic approach is energy conservation: Light_out = Light_in + Light_emitted - Light_absorbed Surface
40 Modeling Surface Reflectance Rs(qi,fi,qr,fr,l)... describes the amount of incident energy, arriving from direction (qi,fi),... leaving in direction (qr,fr), with wavelength l Surface
41 Empirical Models deally measure radiant energy for all combinations of incident angles Too much storage Difficult in practice (qr,fr) Surface l (qi,fi)
42 Bidirectional Reflectance Distribution Function (BRDF) 4-dimensional function which defines light reflection at an opaque surface. The ratio of reflected radiance exiting along w 0 to the irradiance incident on the surface from direction w i : f ( w, w ) r i o dlr( w0) dlr( w0) de ( w ) L ( w )cos( q ) dw i i i i i i
43 BRDF: 4 Dimensional Function
44 Phong Reflectance Model Based on model proposed by Phong in his PhD dissertation 1973 Specular Ambient Diffuse Emission
45 Phong Reflectance Model Simpler analytic approximation model Diffuse reflection + Specular reflection + (Emission) + ambient Surface 45
46 Diffuse Reflection Diffuse definition = spread-out, to pass by spreading every way, to extend in all directions Assume surface reflects equally in all directions Examples: chalk, clay, cloth Surface
47 Modeling Diffuse Reflectance How much light is reflected? Depends on angle of incident light (Does not depend on the viewing angle) dl dacosq q dl da Surface
48 Lambertian Model cosine law (dot product) N L N L cosq Nˆ Lˆ cosq K ( Nˆ Lˆ) D D L N q L Surface
49 Specular Reflection Reflection is strongest near mirror angle Examples: mirrors, metals, glass N R q q L Surface
50 How much light is seen? Depends on angle of incident light and angle to viewer Viewer R a q N q L V
51 Specular Reflection Phong model: reflection depends on cos(a) n Where n is the Phong exponent governing the apparent shininess of the surface Viewer V R a q N q L K ( V R) S S n L
52 Behavior of n (V R)
53 Examples of Different Exponent
54 Light Emission Represents light emanating directly from object Emission 0
55 Ambient Term Represents reflection of all indirect illumination This is a total hack (avoids complexity of global illumination)!
56 Single Light llumination Calculation E K A AL K D ( N L) K ( V L S R) n L Viewer R a q N q L V
57 Multiple Light llumination Calculation E K A AMB ( K i D ( N L i ) L i K S ( V R i ) n L i ) N Viewer L 1 L 2 V
58 For Every Light Wavelength? Enough to calculate for the 3 base colors: L i i n i S i D AMB A E R V K L N K K l l l l l l l ) ) ( ) ( ( rl i i n i rs i rd ramb ra re r R V K L N K K ) ) ( ) ( ( gl i i n i gs i gd bamb ga ge g R V K L N K K ) ) ( ) ( ( bl i i n i bs i bd bamb ba be b R V K L N K K ) ) ( ) ( (
59 Get Color for Ray Casting RGB GetColor(Scene scene, Ray in_ray, Point hit) { // Ambient and Emission calculations RGB color = calcemissioncolor(scene) + calcambientcolor(scene); // Diffuse & Specular calculations for (int i = 0; i < getnumlights(scene); i++) { Light light = getlight(i,scene); color += calcdiffusecolor(scene,hit,light) + calcspecularcolor(scene,hit,light); } return color; }
60 Part : Recursive Ray Tracing Shadows Refractions nter-object reflections
61 Shadows
62 Shadows Occlusions from light sources by other objects Point light source creates hard edges Area light source create soft edges 62
63 Shadow Calculation? nstead of calculating the shadow of each object explicitly we do an implicit calcuation For each intersection point with ray we shoot shadow rays and check if a light source is blocked by other objects then we know it is in shadow.
64 Shadows Rays Shadow terms tell which light sources are blocked Cast ray towards each light source L i S i = 0 if ray is blocked, S i = 1 otherwise i i i n S D A A E S R V K L N K K ) ) ( ) ( ( Shadow Term
65 Get Color for Ray Casting with Shadows RGB GetColor(Scene scene, Ray in_ray, Point hit) { // Ambient and Emission calculations RGB color = calcemissioncolor(scene) + calcambientcolor(scene); // Diffuse and Specular calculations for (int i = 0; i < getnumlights(scene); i++) { Light light = getlight(i,scene); Ray light_ray = ConstructRaytoLight(hit, light) // Add color only if light is not occluded if!occluded(light_ray, scene, light) { color += calcdiffusecolor(scene,hit,light) + calcspecularcolor(scene,hit,light); } } return color; }
66 Recursive Ray Tracing Ray casting cannot account for global effects of interactions between objects such as reflections and refractions of light. Ray tracing models these by recursively following the (reverse) rays from the intersection points
67 Ray Casting vs. Tracing
68 Casting vs. Tracing Fromulas Trace primary rays from camera: direct illumination from unblocked lights only L L L n S D A A E S R V K L N K K ) ) ( ) ( ( T T R R L L L n S D A A E K K S R V K L N K K ) ) ( ) ( ( Also trace secondary rays from hit surfaces: global illumination from mirror reflection and transparency
69 Mirror reflections Trace secondary ray in direction of mirror reflection Evaluate radiance along secondary ray and include it into illumination model Radiance for mirror reflection ray n E K A A ( K L D( N L) KS ( V R) ) S L L K S R K T T
70 Transparency Trace secondary ray in direction of refraction and include it into illumination model Transparency coefficient is fraction transmitted K T = 1 if object is translucent, K T = 0 if object is opaque 0 < K T < 1if object is semitranslucent n E K A A ( K L D( N L) KS ( V R) ) S L L K S R Radiance for refraction ray K T T
71 Refractive Transparency For thin surfaces, can ignore change in direction Assume light travels straight through surface T L N Q i h i h r L T Qr T Q i
72 Refractive Transparency For solid objects, apply Snell s law: h sin Q h sin Q r r i i T hi ( cos Qi cos Qr ) N h r h i h r hi h r L T Qr N Q i L
73 Recursion Ray Tree Ray tree represents illumination computation Ray traced through scene Ray tree
74 Gather Components Ray traced through scene Ray tree T T R S L L L n S D A A E K K S R V K L N K K ) ) ( ) ( (
75 Ray Tracing mage RayTrace(Camera camera, Scene scene, int width, int height) { mage image = new mage(width, height); for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { Ray ray = ConstructRayThroughPixel(camera, i, j); image[i][j] = calccolor(scene, ray, hit,0); } } return image; }
76 Recursive Calculation of Color for Ray Tracing Regular part like ray casting (Note: without shadows!) Recursive part (Note: only reflection) RGB CalcColor(Scene scene, Ray in_ray, int level) { Point hit = Findntersection(in_ray, scene); RGB color = calcemissioncolor(scene) + calcambientcolor(scene); for (int i = 0; i < getnumlights(scene); i++) { Light light = getlight(i,scene); color += calcdiffusecolor(scene,hit,light) + calcspecularcolor(scene,hit,light); } if (level == MAX_LEVEL) return rgb(0,0,0); } Vector normal = getnormalatpoint(hit); Ray out_ray = ConstructOutRay (in_ray, normal); color += K_s * CalcColor(scene, out_ray, level+1); return color; // Here should come a similar part for // a Refractive Ray
77 Effect of Recursion Depth Depth=1 Depth=1 Depth=2 Depth=3 Depth=5
78 Difference Between Levels 1 st Diff 5 st Diff (amplified)
79 Direct Diffuse + ndirect Specular and transmission 79
80 + Soft Shadows 80
81 + Caustics = the envelope of light rays reflected or refracted by a curved surface or object 81
82 + ndirect Diffuse llumination 82
83 Example
84 Example "Balanza" Jaime Vives Piqueres (2002)
85 Part V: Acceleration Techniques Bounding volume hierarchies Spatial partitions: Uniform grids Octrees BSP trees
86 Bounding Volumes Key idea: check for intersection with simple shape first Use bounding volume for shapes f ray doesn t intersect bounding volume, then it doesn t intersect its contents!
87 Bounding Volume Hierarchies Build hierarchy of bounding volumes Bounding volume of interior node contains all children 1 3 E 1 D F 2 C 3 A B D E F A 2 C B
88 Ray Cast Using BVH Use hierarchy to accelerate ray intersections ntersect node contents only if hit bounding volume 1 3 E 1 D F 2 C 3 A B D E F A 2 C B
89 Sort Hits & Detect Early Termination Findntersection(Ray ray, Node node) { // Find intersections with bounding volumes // of child node... // Sort intersections front to back... // Process intersections // checking for early termination min_t = infinity; for each intersected child i { if (min_t < bv_t[i]) break; shape_t = Findntersection(ray, child); if (shape_t < min_t) { min_t = shape_t;} } return min_t; }
90 Uniform Grid Construct uniform grid over scene ndex primitives according to overlaps with grid cells D E F C A B
91 Uniform Grid Trace rays through grid cells E Fast ncremental D F Only check primitives in intersected grid cells Given an entry point into a cell and a vector, its easy to calculate exit point A B C
92 Uniform Grid Potential problem: How choose suitable grid resolution? Too little benefit if grid is too coarse D E F Too much cost if grid is too fine A C B
93 Octree (Quadtree in 2D) An octree is a tree data structure that represents a recursive, hierarchical subdivision of 3-dimensional space into cubes. Each internal node represents a cube that is divided by 3 axis aligned planes into 8 equal size sub-cubes.
94 Octree Storage
95 Octree Scene Construction Constructs adaptive grid over scene: Recursively subdivide box-shaped cells into 8 octants ndex primitives by overlaps with cells D A E F C Fewer cells than a grid (why?) B Quadtree
96 Ray Cast with Octree Trace rays through neighbor cells Fewer cells but More complex neighbor finding than a grid A trade-off between fewer cells and more expensive traversal D A E B F C
97 Other Uses of Octree Very useful in computer graphics for: ntersections Collisions Color quantization Surface reconstruction (meshing) 97
98 Binary Space Partition (BSP) Tree Recursively partition space by planes Every cell is a convex polyhedron 1 3 E D F C A 4 B 2
99 Example: BSP Point Finding Simple recursive algorithms 1 P 3 E D F C A 4 B 2
100 Ray Cast with BSP Recursion on BSP tree enables simple frontto-back traversal 1 P 3 E D F C A 4 B 2
101 Ray Cast with BSP Tree RayTreentersect(Ray ray, Node node, double min, double max) { if (Node is a leaf) return intersection of closest primitive in cell, or NULL if none else dist = distance of the ray point to split plane of node near_child = child of node that contains the origin of Ray far_child = other child of node if the interval to look is on near side return RayTreentersect(ray, near_child, min, max) else if the interval to look is on far side return RayTreentersect(ray, far_child, min, max) else if the interval to look is on both side if (RayTreentersect(ray, near_child, min, dist)) return ; else return RayTreentersect(ray, far_child, dist, max) }
102 Other Accelerations Screen space coherence Check last hit first Beam tracing Pencil tracing Cone tracing Memory coherence Large scenes Parallelism Ray casting is embarrassingly parallelizable More...
103 Simple Model for Exercise Use only reflections and shadow rays
104 Summary Ray casting (direct llumination) Usually use simple analytic approximations for light source emission and surface reflectance Recursive ray tracing (global illumination) ncorporate shadows, mirror reflections, and pure refractions Note: remember these are approximation so that it will be practical to compute
105 Appendix: llumination Terminology Radiant power [flux] (F) Rate at which light energy is transmitted (in Watts). Radiant ntensity () Power radiated onto a unit solid angle in direction (in Watts/sr) e.g.: energy distribution of a light source (inverse square law) Radiance (L) Radiant intensity per unit projected surface area (in Watts/m 2 sr) e.g.: light carried by a single ray (no inverse square law) rradiance (E) ncident flux density on a locally planar area (in Watts/m 2 ) e.g.: light hitting a surface along a Radiosity (B) Exitant flux density from a locally planar area (in Watts/ m 2 )
Illumination. Courtesy of Adam Finkelstein, Princeton University
llumination Courtesy of Adam Finkelstein, Princeton University Ray Casting mage RayCast(Camera camera, Scene scene, int width, int height) { mage image = new mage(width, height); for (int i = 0; i < width;
More informationLighting and Reflectance COS 426
ighting and Reflectance COS 426 Ray Casting R2mage *RayCast(R3Scene *scene, int width, int height) { R2mage *image = new R2mage(width, height); for (int i = 0; i < width; i++) { for (int j = 0; j < height;
More informationIllumination. Thomas Funkhouser Princeton University C0S 426, Fall 2000
llumination homas Funkhouser Princeton University C0 426, Fall 2000 ay Casting mage aycastcamera camera, cene scene, int width, int height { mage image = new magewidth, height; for int i = 0; i < width;
More informationקורס גרפיקה ממוחשבת 2010/2009 סמסטר א' Rendering 1 חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור
קורס גרפיקה ממוחשבת 2010/2009 סמסטר א' Rendering 1 חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור What is 3D rendering? Construct an image from a 3D model מצלמה תאורה View Plane
More informationIllumination. Michael Kazhdan ( /657) HB Ch. 14.1, 14.2 FvDFH 16.1, 16.2
Illumination Michael Kazhdan (601.457/657) HB Ch. 14.1, 14.2 FvDFH 16.1, 16.2 Ray Casting Image RayCast(Camera camera, Scene scene, int width, int height) { Image image = new Image(width, height); for
More informationRay-Tracing. Misha Kazhdan
Ray-Tracing Misha Kazhdan Ray-Tracing In graphics, we often represent the surface of a 3D shape by a set of triangles. Goal: Ray-Tracing Take a collection of triangles representing a 3D scene and render
More informationRay Casting. 3D Rendering. Ray Casting. Ray Casting. Ray Casting. Ray Casting
Rendering Ray asting The color of each pixel on the view plane depends on the radiance emanating from visible surfaces dam inkelstein rinceton University OS 6, Spring 00 Simplest method is ray casting
More informationCS580: 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 informationLighting. 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 informationTopic 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 informationTopic 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 informationLighting 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 informationCPSC 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 informationTopic 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 informationChapter 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 informationCS5620 Intro to Computer Graphics
So Far wireframe hidden surfaces Next step 1 2 Light! Need to understand: How lighting works Types of lights Types of surfaces How shading works Shading algorithms What s Missing? Lighting vs. Shading
More informationRendering: 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 informationLecture 11: Ray tracing (cont.)
Interactive Computer Graphics Ray tracing - Summary Lecture 11: Ray tracing (cont.) Graphics Lecture 10: Slide 1 Some slides adopted from H. Pfister, Harvard Graphics Lecture 10: Slide 2 Ray tracing -
More informationVirtual Reality for Human Computer Interaction
Virtual Reality for Human Computer Interaction Appearance: Lighting Representation of Light and Color Do we need to represent all I! to represent a color C(I)? No we can approximate using a three-color
More informationRaytracing. COSC 4328/5327 Scott A. King
Raytracing COSC 4328/5327 Scott A. King Basic Ray Casting Method pixels in screen Shoot ray p from the eye through the pixel. Find closest ray-object intersection. Get color at intersection Basic Ray Casting
More informationLocal 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 informationRay Casting. Outline in Code. Outline. Finding Ray Direction. Heckbert s Business Card Ray Tracer. Foundations of Computer Graphics (Fall 2012)
Foundations of Computer Graphics (Fall 2012) CS 184, Lectures 17, 18: Nuts and bolts of Ray Tracing Heckbert s Business Card Ray Tracer http://inst.eecs.berkeley.edu/~cs184 Acknowledgements: Thomas Funkhouser
More informationAdvanced Ray Tracing
Advanced Ray Tracing Thanks to Fredo Durand and Barb Cutler The Ray Tree Ni surface normal Ri reflected ray Li shadow ray Ti transmitted (refracted) ray 51 MIT EECS 6.837, Cutler and Durand 1 Ray Tree
More informationCENG 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 informationGlobal 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 informationProblem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007
Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007 Programming For this assignment you will write a simple ray tracer. It will be written in C++ without
More informationGlobal 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 informationComputer Graphics. Illumination Models and Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL
Computer Graphics Chapter 10 llumination Models and Surface-Rendering Methods Somsak Walairacht, Computer Engineering, KMTL Outline Light Sources Surface Lighting Effects Basic llumination Models Polygon
More informationIllumination & Shading: Part 1
Illumination & Shading: Part 1 Light Sources Empirical Illumination Shading Local vs Global Illumination Lecture 10 Comp 236 Spring 2005 Computer Graphics Jargon: Illumination Models Illumination - the
More informationGlobal 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 informationComputer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo
Computer Graphics Bing-Yu Chen National Taiwan University The University of Tokyo Hidden-Surface Removal Back-Face Culling The Depth-Sort Algorithm Binary Space-Partitioning Trees The z-buffer Algorithm
More informationChapter 10. Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL
Computer Graphics Chapter 10 llumination Models and Surface-Rendering Methods Somsak Walairacht, Computer Engineering, KMTL 1 Outline Light Sources Surface Lighting Effects Basic llumination Models Polygon
More informationIllumination Models & Shading
Illumination Models & Shading Lighting vs. Shading Lighting Interaction between materials and light sources Physics Shading Determining the color of a pixel Computer Graphics ZBuffer(Scene) PutColor(x,y,Col(P));
More informationIndirect Illumination
Indirect Illumination Michael Kazhdan (601.457/657) HB Ch. 14.1, 14.2 FvDFH 16.1, 16.2 Surface Illumination Calculation Multiple light source: 2 Viewer N 1 V I = I E + K A I A + K D N, + K S V, R n I Overview
More informationVisualisatie BMT. Rendering. Arjan Kok
Visualisatie BMT Rendering Arjan Kok a.j.f.kok@tue.nl 1 Lecture overview Color Rendering Illumination 2 Visualization pipeline Raw Data Data Enrichment/Enhancement Derived Data Visualization Mapping Abstract
More informationConsider 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 informationRay Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University
Ray Tracing III Wen-Chieh (Steve) Lin National Chiao-Tung University Shirley, Fundamentals of Computer Graphics, Chap 10 Doug James CG slides, I-Chen Lin s CG slides Ray-tracing Review For each pixel,
More informationCS 5625 Lec 2: Shading Models
CS 5625 Lec 2: Shading Models Kavita Bala Spring 2013 Shading Models Chapter 7 Next few weeks Textures Graphics Pipeline Light Emission To compute images What are the light sources? Light Propagation Fog/Clear?
More informationSo 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 informationComputer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)
Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Raytracing Global illumination-based rendering method Simulates
More informationComputer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model
Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Why do we need Lighting
More information3D Rendering. Course Syllabus. Where Are We Now? Rendering. 3D Rendering Example. Overview. Rendering. I. Image processing II. Rendering III.
Course Syllabus I. Image processing II. Rendering III. Modeling 3D Rendering Rendering I. Animation (Michael Bostock, CS426, Fall99) Image Processing Adam Finkelstein Princeton University COS 426, Spring
More informationRay Casting. To Do. Outline. Outline in Code. Foundations of Computer Graphics (Spring 2012) Heckbert s Business Card Ray Tracer
Foundations of Computer Graphics (Spring 2012) CS 184, Lectures 16, 18: Nuts and bolts of Ray Tracing To Do Finish homework 3 Prepare for Midterm (Monday) Everything before this week (no raytracing) Closed
More informationRecollection. 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 informationLighting affects appearance
Lighting affects appearance 1 Source emits photons Light And then some reach the eye/camera. Photons travel in a straight line When they hit an object they: bounce off in a new direction or are absorbed
More informationGlobal 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 informationAccelerating Ray-Scene Intersection Calculations
ccelerating Ray-Scene Intersection alculations onnelly arnes S 80: Graphics cknowledgment: slides by Jason Lawrence, Misha Kazhdan, llison Klein, Tom unkhouser, dam inkelstein and avid obkin Overview cceleration
More information6. Illumination, Lighting
Jorg s Graphics Lecture Notes 6. Illumination, Lighting 1 6. Illumination, Lighting No ray tracing in OpenGL! ray tracing: direct paths COP interreflection: soft shadows, color bleeding. umbra, penumbra,
More informationRendering. What is 3D rendering? קורס גרפיקה ממוחשבת 2008 סמסטר ב' מצלמה תאורה. Rendering Scenarios. Rendering Scenarios. 3D Rendering Issues
What is rendering? onstruct an image from a model קורס גרפיקה ממוחשבת 008 סמסטר ב' מצלמה תאורה iew lane Rendering Rendering מודל חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור
More informationTDA362/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 informationToday. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models
Computergrafik Matthias Zwicker Universität Bern Herbst 2009 Today Introduction Local shading models Light sources strategies Compute interaction of light with surfaces Requires simulation of physics Global
More informationGlobal 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 informationCOMP371 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 informationToday. 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 informationComputer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)
Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Why do we need Lighting & shading? Sphere
More informationRay 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 informationGlobal 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 informationIndirect Illumination
Indirect Illumination Michael Kazhdan (601.457/657) HB Ch. 14.1, 14.2 FvDFH 16.1, 16.2 Announcements Midterm on October 17 th Office hours: Misha: Monday 2-3 Malone 229 Sing Chun: Friday 9-10 Malone 216
More informationRay 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 informationLighting 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 informationToday. Acceleration Data Structures for Ray Tracing. Cool results from Assignment 2. Last Week: Questions? Schedule
Today Acceleration Data Structures for Ray Tracing Cool results from Assignment 2 Last Week: koi seantek Ray Tracing Shadows Reflection Refraction Local Illumination Bidirectional Reflectance Distribution
More informationRay Tracing. Computer Graphics CMU /15-662, Fall 2016
Ray Tracing Computer Graphics CMU 15-462/15-662, Fall 2016 Primitive-partitioning vs. space-partitioning acceleration structures Primitive partitioning (bounding volume hierarchy): partitions node s primitives
More informationAnnouncements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday
Announcements Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday 1 Spatial Data Structures Hierarchical Bounding Volumes Grids Octrees BSP Trees 11/7/02 Speeding Up Computations
More informationSimple Lighting/Illumination Models
Simple Lighting/Illumination Models Scene rendered using direct lighting only Photograph Scene rendered using a physically-based global illumination model with manual tuning of colors (Frederic Drago and
More informationComputer 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 informationThe 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 informationComputer Graphics. Bing-Yu Chen National Taiwan University
Computer Graphics Bing-Yu Chen National Taiwan University Visible-Surface Determination Back-Face Culling The Depth-Sort Algorithm Binary Space-Partitioning Trees The z-buffer Algorithm Scan-Line Algorithm
More informationUnderstanding Variability
Understanding Variability Why so different? Light and Optics Pinhole camera model Perspective projection Thin lens model Fundamental equation Distortion: spherical & chromatic aberration, radial distortion
More informationComputer Graphics Ray Casting. Matthias Teschner
Computer Graphics Ray Casting Matthias Teschner Outline Context Implicit surfaces Parametric surfaces Combined objects Triangles Axis-aligned boxes Iso-surfaces in grids Summary University of Freiburg
More informationThe 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 informationIllumination and Shading
Illumination and Shading Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/14/07 1 From last time Texture mapping overview notation wrapping Perspective-correct interpolation Texture
More informationSung-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 informationAcceleration Data Structures
CT4510: Computer Graphics Acceleration Data Structures BOCHANG MOON Ray Tracing Procedure for Ray Tracing: For each pixel Generate a primary ray (with depth 0) While (depth < d) { Find the closest intersection
More informationCHAPTER 1 Graphics Systems and Models 3
?????? 1 CHAPTER 1 Graphics Systems and Models 3 1.1 Applications of Computer Graphics 4 1.1.1 Display of Information............. 4 1.1.2 Design.................... 5 1.1.3 Simulation and Animation...........
More informationTDA361/DIT220 Computer Graphics, January 15 th 2016
TDA361/DIT220 Computer Graphics, January 15 th 2016 EXAM (Same exam for both CTH- and GU students) Friday January 15 th, 2016, 8.30 12.30 Examiner Ulf Assarsson, tel. 0701-738535 Permitted Technical Aids
More informationCSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016
CSE 167: Introduction to Computer Graphics Lecture #6: Lights Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Announcements Thursday in class: midterm #1 Closed book Material
More informationSpatial Data Structures
15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) March 28, 2002 [Angel 8.9] Frank Pfenning Carnegie
More informationSupplement 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 informationRendering. Generate an image from geometric primitives II. Rendering III. Modeling IV. Animation. (Michael Bostock, CS426, Fall99)
1 Course Syllabus 2 I. Image processing 3D Adam Finkelstein Princeton University C0S 426, Fall 2001 II. III. Modeling IV. Animation Image Processing (Rusty Coleman, CS426, Fall99) (Michael Bostock, CS426,
More informationI 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 informationSpatial Data Structures
15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) April 1, 2003 [Angel 9.10] Frank Pfenning Carnegie
More informationTopic 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 informationRay Intersection Acceleration
Ray Intersection Acceleration CMPT 461/761 Image Synthesis Torsten Möller Reading Chapter 2, 3, 4 of Physically Based Rendering by Pharr&Humphreys An Introduction to Ray tracing by Glassner Topics today
More informationCMSC427 Shading Intro. Credit: slides from Dr. Zwicker
CMSC427 Shading Intro Credit: slides from Dr. Zwicker 2 Today Shading Introduction Radiometry & BRDFs Local shading models Light sources Shading strategies Shading Compute interaction of light with surfaces
More informationdq dt I = Irradiance or Light Intensity is Flux Φ per area A (W/m 2 ) Φ =
Radiometry (From Intro to Optics, Pedrotti -4) Radiometry is measurement of Emag radiation (light) Consider a small spherical source Total energy radiating from the body over some time is Q total Radiant
More informationRay Tracing. Outline. Ray Tracing: History
Foundations of omputer Graphics Online Lecture 9: Ray Tracing 1 History and asic Ray asting Ravi Ramamoorthi Effects needed for Realism (Soft) Shadows Reflections (Mirrors and Glossy) Transparency (Water,
More informationRay Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)
CS4620/5620: Lecture 37 Ray Tracing 1 Announcements Review session Tuesday 7-9, Phillips 101 Posted notes on slerp and perspective-correct texturing Prelim on Thu in B17 at 7:30pm 2 Basic ray tracing Basic
More informationTopic 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 informationGlobal 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 informationPhotorealism: Ray Tracing
Photorealism: Ray Tracing Reading Assignment: Chapter 13 Local vs. Global Illumination Local Illumination depends on local object and light sources only Global Illumination at a point can depend on any
More informationEffects needed for Realism. Ray Tracing. Ray Tracing: History. Outline. Foundations of Computer Graphics (Spring 2012)
Foundations of omputer Graphics (Spring 202) S 84, Lecture 5: Ray Tracing http://inst.eecs.berkeley.edu/~cs84 Effects needed for Realism (Soft) Shadows Reflections (Mirrors and Glossy) Transparency (Water,
More informationSpatial Data Structures
Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) [Angel 9.10] Outline Ray tracing review what rays matter? Ray tracing speedup faster
More informationMotivation. Sampling and Reconstruction of Visual Appearance. Effects needed for Realism. Ray Tracing. Outline
Sampling and Reconstruction of Visual Appearance CSE 274 [Fall 2018], Special Lecture Ray Tracing Ravi Ramamoorthi http://www.cs.ucsd.edu/~ravir Motivation Ray Tracing is a core aspect of both offline
More informationReflection 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 informationCS 325 Computer Graphics
CS 325 Computer Graphics 04 / 02 / 2012 Instructor: Michael Eckmann Today s Topics Questions? Comments? Illumination modelling Ambient, Diffuse, Specular Reflection Surface Rendering / Shading models Flat
More informationRendering 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 informationAssignment 2 Ray Tracing
Assignment 2 Ray Tracing Overview The concept of ray tracing: a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters
More informationECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014
ECS 175 COMPUTER GRAPHICS Ken Joy Winter 2014 Shading To be able to model shading, we simplify Uniform Media no scattering of light Opaque Objects No Interreflection Point Light Sources RGB Color (eliminating
More informationAnnouncements. 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 information3D Rendering and Ray Casting
3D Rendering and Ray Casting Michael Kazhdan (601.457/657) HB Ch. 13.7, 14.6 FvDFH 15.5, 15.10 Rendering Generate an image from geometric primitives Rendering Geometric Primitives (3D) Raster Image (2D)
More information