CS 450: COMPUTER GRAPHICS RAY TRACING SPRING 2016 DR. MICHAEL J. REALE

Size: px
Start display at page:

Download "CS 450: COMPUTER GRAPHICS RAY TRACING SPRING 2016 DR. MICHAEL J. REALE"

Transcription

1 S 450: OMPUTR GRPHIS RY TRING SPRING 016 R. MIHL J. RL

2 RNRING IMGS Let s sa we have a scene of 3 objects We want to render this to a raster image We ve got this and we want this In general, there are two was we can do this: Object-order rendering For each OBJT find piels that object affects Often used for real-time rendering Image-ordering rendering For each PIXL find all objects that affect this piel Often used for non-real-time rendering

3 RY TRING We re going to talk about ra tracing Form of image-order rendering dvantages: High-qualit images as to compute: Shadows Reflections Refraction isadvantages: Generall prett slow

4 BSI RY-TRING LGORITHM

5 BSI I We have a virtual camera that starts at point Imagine that there are a grid of piels floating in front of the camera To get the color for each piel: Shoot a ra from the starting point to the piel position See what objects we hit with the ra Pick the nearest intersection point ompute color at that point Shading model looking at normal at that point, lighting direction, color, etc.

6 THR BSI STPS This means we have three basic steps: Ra generation ompute viewing ra for each piel Ra intersection Find closest intersection point among all objects in scene This step wh ratracers are generall slow Shading ompute piel color based on results of ra intersection

7 PRSPTIV

8 3 TO Our first question is how our camera will project the 3 world onto a image? Old problem: artists had been working on this one for centuries Simplest approach: istance from camera doesn t matter Onl care where it is in terms of left/right and up/down More realistic approach: Take perspective into account things farther awa should look smaller

9 PROJTIONS Two most commonl used projection methods: Orthographic or parallel Perspective Note: when defining a projection, also define: Near plane = closer than near plane don t render Far plane = beond far plane don t render oupled with other aspects of camera, defines view volume Objects in view volume will be rendered Orthographic Perspective Projection direction = direction our camera is pointed

10 ORTHOGRPHI PROJTION Orthographic or parallel Move object along projection direction until ou hit image plane istance from image plane doesn t change appearance Parallel lines remain parallel View volume = rectangular bo

11 ORTHOGRPHI PROJTION: PROS N ONS Orthographic or parallel dvantages: Good for mechanical/architectural drawings Sie of objects remains the same, no matter how far awa the are Parallel lines preserved isadvantages: Not realistic effectivel assumes multiple camera ee starting points In realit, just one or two, with the human vision sstem

12 PRSPTIV PROJTION Perspective Single starting point ee point all objects project towards ee point Things look smaller when farther awa View volume = truncated pramid with rectangular base called view frustum

13 SI: OBLIQU PROJTION If the image plane is NOT orthogonal to the project direction oblique projection Below: eample of an oblique parallel projection

14 OMPUTING VIWING RYS

15 RTING RYS To define our ras, we ll just use 3 parametric ras ssuming we have: Starting point also called ee point Point S on the image plane Then our ra is defined b: P t t S

16 BHIN BLU YS We know that: P0 P1 S We also know that, if: 0 t t 1 Then Pt 1 is closer to ee than Pt If t < 0 behind the ee shouldn t be able to see item

17 MR FRM We need to find the S points will be given to us, depending on the kind of projection To do this, we will look at things from the perspective of the camera frame amera frame = orthonormal coordinate frame defined b the ee point and three vectors: U points to camera s RIGHT V points upward W points BKWR Remember: RIGHT-HN RUL, so camera is actuall looking along the W ais!

18 GTTING TH IMG PLN Based on the camera frame, we ll construct our image plane We know: Right U and Up V directions for plane ssume we also know where the plane is centered How large is the plane? Usuall define plane in terms of the following coordinates: r right ma coordinate LONG U ais r > 0 l left min coordinate LONG U ais l < 0 t top ma coordinate LONG V ais t > 0 b bottom min coordinate LONG V ais b < 0

19 GTTING POINTS ON TH IMG PLN We then need to define what points on the image plane correspond to our piels If: n = # of piels in n = # of piels of To get the coordinates u,v for a given point assuming that piels are TULLY centered on the coordinates: u l v b r l i 0.5 / t b j 0.5 / n n

20 ORTHOGRPHI VIWS For an orthographic view, all ra IRTIONS = -W Image plane centered at ee point For each piel: ompute u and v previous slide Ra direction W Ra starting point uu vv For oblique views all ra directions = d some other direction

21 PRSPTIV VIWS For perspective views, all ra STRTING POINTS = Image plane centered at - dw d = image plane distance For each piel: Sometimes loosel called focal length changing d does change field of view ompute u and v two slides back Ra direction uu vv Ra starting point dw For oblique views use d instead of -dw

22 RY-OBJT INTRSTION

23 FINING OBJTS We now have our ra: We need to find out what the ra intersects with in the 3 scene Want to pick the nearest intersection point with t in the interval: Usuall: [ 0, ] P t t [ t 0, t1] lthough there are man possible objects to intersect with, we will discuss ra intersections with: Spheres Triangles Polgons

24 RY INTRSTION WITH IMPLIIT SURF Here s our ra again: P t t Given an implicit surface: f P 0 Intersection points = points on ra that satisf the implicit equation: f P t 0 or f t 0 So we have to find values of t if an that satisf the above equation.

25 RY-SPHR INTRSTION

26 RY-SPHR INTRSTION Here s our implicit equation in vector form for a sphere: Let s plug in our ra for P: 0 r P P P f t t P 0 r t t P f Our Ra

27 RY-SPHR INTRSTION Rearranging terms: r t t r t t r t t t r t t t t t t r t t

28 RY-SPHR INTRSTION closer look at our result: reveal that this is a quadratic equation: where: 0 r t t 0 c bt at r c b a

29 RY-SPHR INTRSTION This means we can use the quadratic formula! a ac b b t 4 4 r t r c b a

30 RY-SPHR INTRSTION leaning things up a bit: t r If we look at the discriminant G: G > 0 TWO possible intersection points G = 0 ON possible intersection point graing surface of sphere G < 0 NO intersection In implementation, one should check the discriminant first before computing other terms In fact, if doing collision detection ma onl need to compute the discriminant!

31 RY-SPHR INTRSTION

32 RY-SPHR INTRSTION: GOMTRI INTRPRTTION t r Let s tr to break this down geometricall Vector going from center of circle TO ee point: Length of projection of - onto : cos However, if we just wanted the adjacent side and assumed was normalied: p cos THT SI, note that - and point in opposing directions, so the distance along we TULLY want is: p

33 RY-SPHR INTRSTION: GOMTRI INTRPRTTION That said, our original formula: becomes also converting certain dot products to the lengths-squared: r t r p p t

34 RY-SPHR INTRSTION: GOMTRI INTRPRTTION We can actuall move the length of outside of the square root: r p p t r p p t

35 RY-SPHR INTRSTION: GOMTRI INTRPRTTION Let s sa that: Then our formula becomes: r p p t q r q p p t

36 RY-SPHR INTRSTION: GOMTRI INTRPRTTION Let s look at the discriminant more closel: Rearranging it a bit: Because of the Pthagorean theorem: So, if we re tring to get s : SO, we are effectivel getting the difference between r and s : r q p q p r s p q p q s s r p q r q p r

37 RY-SPHR INTRSTION: GOMTRI INTRPRTTION SO, when we are computing the discriminant G: s r G on point no intersecti 0 on point ON intersecti 0 on points TWO intersecti 0 s r G s r G s r G

38 RY-SPHR INTRSTION: GOMTRI INTRPRTTION Let s assume we have TWO intersection points G > 0 It turns out that, if we look at NOTHR right triangle, then: Which means that the square root of our discriminant gives us: k k s r G s r k r k s

39 RY-SPHR INTRSTION: GOMTRI INTRPRTTION t SO, plugging this value into our original formula and canceling out the etra : In other words, in terms of TUL geometric distance, we need to go along b: -p + k -p k p t to get our two intersection points. p q p k HOWVR, because ma not be normalied, we have to divide b the length of r

40 RY-TRINGL INTRSTION

41 INTRSTION WITH TRINGL While there are man was to do ra-triangle intersections, we will use: Barcentric coordinates parametric plane containing the triangle Basicall, all we need to store for this are the vertices of the triangle

42 RY INTRSTION WITH PRMTRI SURF To intersect a ra with a parametric surface set up the following equations: Three unknowns t,u,v three equations Hopefull, we can solve this analticall, but in the worst case we can throw numerical methods at it Remember: parametric form plug in parameters return a POINT Parametric line: Parametric surface:,,,, v u f t v u f t v u f t v u f t 3 : R R t P 3 :, R R v u f

43 RY INTRSTION WITH PRMTRI PLN If our surface = parametric plane we can use the vector form with barcentric coordinates! β, γ parameters for surface Returns a 3 point Three points of triangle define a plane So, our equation to solve becomes: t B Solve for t, β, γ

44 RY INTRSTION WITH TRINGL INSI the triangle IF: β > 0 γ > 0 t B β + γ < 1 OTHRWIS, misses triangle although it OS hit the plane If there IS no solution either: Triangle is degenerate OR Ra is parallel to plane

45 SOLVING FOR PRMTRS First, we ll rearrange things so that all our constants are on the right-hand side and everthing else is on the left: We re going to turn this into a standard linear sstem so we can use matrices to solve the equations hold tight B t t B t B B t

46 SOLVING FOR PRMTRS Then, we ll epand this out into the individual coordinates: Remember: the,, coordinates are known values B B B t t t t B

47 SOLVING FOR PRMTRS Finall, we ll turn this into a standard linear sstem of the form B B B t MV N B B B t t t

48 QUIK RVIW: MTRIX MULTIPLITION Matri = effectivel, a arra of numbers M = 33 matri Vector = basicall a matri with one of the dimensions equaling 1 V and N = 31 matrices = 3 column vectors When multipling a matri M b a vector V IN THT ORR: Result = vector N with: Same # of rows as M Same # of columns as V For each value n R in N: ot product of Rth row of M and 1 st column of V MV N m m m n n n m m m m m m m m m v v 0 v v v v m m m v v 1 v 1 1 n n n m m 1 m v v v

49 BK TO OUR LINR SYSTM So, for eample, if I wanted the first equation back B B B t B t

50 QUIK RVIW: TRMINNT OF MTRIX The determinant of a matri is calculated for a and 33 matri in the following fashion: NOT: The determinant is related to the cross product, scalar triple product, and the area/volume of parallelograms/parallelepipeds formed b the vectors, but we ll get to that later M *4 *3 i j k M 1 3 i*6 3*5 j3*4 1*6 k1*5 *

51 RMR S RUL For 33 sstems, a fast wa to solve them is with ramer s Rule: gain, we ll talk about how and wh this works later Given a sstem: MV N For each coordinate of V v i : Replace the i th column of matri M with N Get the determinant ivide b the determinant of the original matri M WRNING: If M = 0 no unique solution! Ma be no solution ma be INFINIT solutions

52 PPLYING RMR S RUL So, in determinant form, to solve for our parameters: M t M M B B B B B B B B B M

53 PPLYING RMR S RUL If we use dumm variables: We can show eactl what we need to calculate and we can reduce the number of operations b calculating things like ei hf once: l k j t i f c h e b g d a eg dh c di gf b hf ei a p p kc bl d al jc e jb ak f t p kc bl g al jc h jb ak i p eg dh l di gf k hf ei j

54 OING TH FUNTION When coding the intersection function, we would want to terminate earl if we can More efficient Let s assume t has to be in the interval [t 0, t 1 ] SO, our algorithm might look like: ompute t If t < t 0 OR t > t 1 return false ompute γ if γ < 0 OR γ > 1 return false ompute β If β < 0 OR β > 1 γ return false Return true

55 RY-POLYGON INTRSTION

56 WHT IS POLYGON, XTLY? The official definition varies, but at bare minimum: Polgon = a figure with 3 or more vertices connected in sequence b straight-line segments edges or sides of the polgon Most loose definition an closed-polline boundar More finick definitions contained in single plane, edges have no common points other than their endpoints, no three successive points collinear Standard polgon or simple polgon = closed-polline with no crossing edges

57 OS POLYGON LI IN SINGL PLN? In computer graphics, polgon not alwas in same plane: Round-off error I.e., points originall in single plane, but, after transformation, the points ma be slightl off Fitting to surface makes non-planar polgons.g., if using quads, approimation ma bend the quad in half Thus, we usuall use triangles to avoid this problem

58 GNRT POLYGONS egenerate polgons = often used to describe polgon with: 3 or more collinear vertices generates a line segment.g., in etreme case, triangle with no area Repeated verte positions generates shape with: traneous lines Overlapping edges dges with length 0

59 INTRSTING WITH TH PLN OF TH POLYGON If LL of the vertices P 1 through P m of a polgon lie in the same plane first get intersection with plane Point-normal form of plane we ll just use the first point: Plugging in our ra equation for P: 0 1 N P P N N P t N P N t N t N P N P t

60 R W INSI TH POLYGON? Once we have our intersection point P, the question is: are we inside the polgon? One trick: Project point P and polgon to the XY plane Shoot a ra out from P Usuall easiest to use X ais heck what we cross with this ra Number of edges OR direction of edges Two common approaches for the last step: Odd-ven Rule Nonero Winding-Number Rule

61 O-VN RUL lso called odd-parit or even-odd rule raw ra starting from position P ount how man edges we cross O inside polgon VN outside polgon

62 SI: OTHR USS OF O-VN RUL an use to check other kinds of regions.g., area between two concentric circles

63 NONZRO WINING-NUMBR RUL ount number of times boundar of object winds around a particular point in the clockwise direction gain, draw ra starting at position P Start winding number W at 0 If intersection with segment that crosses the line going from: Right-to-left counterclockwise add 1 to W Left-to-right clockwise subtract 1 from W Remember: think right-hand-rule heck value of W when done: If W == 0 XTRIOR If W!= 0 INTRIOR

64 NONZRO WINING-NUMBR RUL To check the direction of the edge relative to the line from P: Make vectors for each edge in the correct winding order vector i Make vector from P to distant point vector U Two options: Use cross product: If U i = +Z ais right-to-left add 1 to winding number If U i = Z ais left-to-right subtract 1 from winding number Use dot product: Get vector V that is 1 perpendicular to U, and goes right-to-left -u, u If V i > 0 right-to-left add 1 to winding number Otherwise left-to-right subtract 1 from winding number

65 O-VN VS. NONZRO WINING-NUMBR For simple objects polgons that don t self-intersect, circles, etc., both approaches give same result However, more comple objects ma give different results Usuall, nonero winding-number rule classifies some regions as interior that odd-even sas are eterior Odd-ven Rule Nonero Winding-Number Rule

66 INSI-OUTSI PROBLM aveat: need to check we don t cross endpoints vertices Otherwise, ambiguous we ll talk in more detail how to deal with this when we get to filling polgons later

67 SI: URV PTHS? For curved paths, need to computer intersection points with underling mathematical curve For nonero winding-number also have to get tangent vectors

68 SI: VRITIONS OF NONZRO WINING-NUMBR RUL an be used to define Boolean operations: Positive W onl, both counterclockwise union of and B W > 1, both counterclockwise intersection of and B Positive W onl, B clockwise - B

69 PROJTING TH POLYGON PROBLMS What if the projection of the polgon into XY is a LIN?.g., the polgon is in the XZ plane? Solution: choose best among XY, YZ, or ZX planes if abs elseif n abs abs abs else use YZ plane n n & & abs n n abs use ZX plane n use XY plane

70 SHING

71 SHING MOL Let s assume we ve: Intersected our view ra with ever object in the scene Found the nearest intersection point and associated object The piel value is computed b evaluating a shading model Shading model or lighting model Used to calculate the color of an illuminated position on the surface of an object In the slides that follow, we will concentrate on shading models that use point lights

72 POINT LIGHTS Point light Located at a single point in space mit light in all directions

73 IFFUS RFLTION iffuse reflection = when white light hits an object, what we see as the color of an object ample: apple absorbs all frequencies ecept red has red diffuse color Underling phsics: surfaces with microfacets bump, grain, matte reflects light in lots of different directions Ideal diffuse reflectors or Lambertian reflectors Incident light scattered with equal intensit in LL directions, INPNNT of viewing angle epends on angle between NORML and IRTION-to-LIGHT angle of incidence

74 LMBRTIN SHING Lambertian shading model Simplest of all shading models mount of light energ that hits a surface proportional to angle of surface to light View-independent the viewer s position doesn t matter If: N = NORMLIZ normal L = NORMLIZ vector from point on surface to light source Then dot product is proportional to angle between L and N: N L cos

75 LMBRTIN SHING If the light is BHIN the surface angle between L and N > 90 degrees dot product will be NGTIV So, we onl want the ma of 0 and the dot product: That said, our piel color will be: where: Piel color N = NORMLIZ normal L = NORMLIZ vector from point on surface to light source Subtract intersection point P from light position then normalie vector I = intensit of light k d I ma0, N L k d = diffuse coefficient / diffuse color of surface ma 0, N L

76 LMBRTIN SHING Piel color k d I ma0, N L Keep in mind that we basicall have THR equations one for red, one for green, and one for blue.g., for the red piel color have a red light intensit and a red diffuse coefficient N and L are the same in all cases

77 PROBLM WITH LMBRTIN SHING Lambertian model view independent Provides diffuse component of light HOWVR, in real life have shin spots/specular reflections that O depend on view position Without this, models look kind of matte and chalk So, we need some wa to model these specular highlights

78 BLINN-PHONG SHING Blinn-Phong shading model Given: V = view direction NORMLIZ vector from intersection point to ee point Produce brightest reflection of light when V and L are smmetric about normal N Specular reflection = when all or almost all of the incident light is reflected back shin or reflective spot

79 BLINN-PHONG SHING First, compute half-vector H H V V L L Bisector of angle between V and L Both V and L are the same length can just add together to get average direction vector, then normalie! If perfect reflection H will be perfectl in line with normal N So, we want to look at: ma 0, N H

80 BLINN-PHONG SHING: ISSUS WITH TH HLF- VTOR Problem: if V, L, and N are not coplanar slightl off nother problem: need to check if V and L are on same side of N L V > L N if so, don t use specular effect at all

81 BLINN-PHONG SHING: SHININSS ifferent surfaces reflect light over finite range of viewing positions Shin surfaces narrow range uller surfaces wider range So, we take the dot product to a power to make it decrease faster use Phong eponent or shininess s: ma 0, N H s

82 BLINN-PHONG SHING: SHININSS Tpical values of s: 10 eggshell 100 mildl shin 1000 reall gloss 10,000 nearl mirror-like

83 BLINN-PHONG SHING H V V L L So, our final Blinn-Phong shading model will be: Piel color k d I ma0, N L k s I ma0, N H S where: k s = specular coefficient / specular color of surface Usuall set this to gra or white

84 NORMLIZ YOUR VTORS!!! IMPORTNT: ON T FORGT TO NORMLIZ N, V, L, and H!!! Otherwise, we have lengths that we don t want creeping into the dot products

85 MBINT SHING Using either of the two previous models, if the surface is facing awa from the light completel black In real-life indirect reflections of other surfaces will cause SOM light to fall on those surfaces HORRIBL HK: dd a little bit of light to LL surfaces ambient shading

86 MBINT SHING mbient shading Light all surfaces with ambient light that comes equall from everwhere ombined with Blinn-Phong, we get: Piel color k a I a k d I ma0, N L k s I ma0, N H S where I a = ambient light intensit k a = surface s ambient coefficient an be kept separate to tune ambient light per surface OR can set the same as diffuse light coefficient

87 FINL MOL: IFFUS, SPULR, N MBINT Piel color k a I a k d I ma0, N L k s I ma0, N H S

88 MULTIPL LIGHTS Light has the propert of superposition I.e., effect caused b more than one light source = sum of effects from individual light sources So, to deal with multiple light sources, just sum all values up for diffuse and specular components ambient light is onl added once, however: Piel color k a I a n i1 I i k d ma 0, N L i k s ma 0, N H i s

89 PROGRMMING RY TRR

90 BSI LGORITHM For the ra-tracer, the basic algorithm is as follows: For each piel ompute viewing ra If ra hits an object with t >= 0 ompute N valuate shading model and set piel to that color lse Set piel color to background color

91 OBJT-ORINT PPROH s we ve seen, there are a lot of different kinds of objects ou could intersect with: Spheres, triangles, planes, polgons, etc. Good OOP-based approach: Make generic class Surface Give Surface two functions: hit returns whether a given ra hit the object lso hands back some kind of hit-record intersection point, normal, etc. bounding-bo returns ma etends of surface Useful for optimiation Have all other objects inherit from Surface and implement those two functions Then, ou can just loop through one list of Surface instances Instead of separatel going through our spheres, then our triangles, then

92 MTRILS Material class is a good idea as well Have list of Materials that all objects share Store a pointer in Surface class to appropriate Material

93 SHOWS N RFLTIONS

94 VNTGS OF RY TRRS One reall neat thing about ra tracers can add two additional effects ver easil: Shadows Ideal Specular Reflections These are generall more difficult with object-order rendering

95 SHOWS Once ou get our intersection point: Shoot ra shadow ra from intersection point to light Loop through all objects to see if ou hit something If es in shadow Otherwise NOT in shadow Basicall, ou are repeating what ou alread have to do to fill in each piel s color

96 SHOWS Two things to note: 1 You should add ambient light to the output piel color, irrespective of whether the point is in shadow When shooting shadow ra usuall start with t > e where e is some tin value Start at 0 might intersect with TH SM SURF ou re alread on! round-off error

97 IL SPULR RFLTIONS In the same wa, ideal specular reflections or mirror reflections are straightforward to add: ompute reflection vector R: Project onto N subtract twice that vector to get R heck to see what object ou hit with R and compute shading for that object assume it s a function called racolor Use racolor as part of output color: where k m = mirror reflection coefficient, since some surfaces will reflect some colors better than others.g., gold reflect ellow best R N N color c c kmracolor P sr

98 IL SPULR RFLTIONS Three things to watch out for: 1 Same issue with shadows don t start at t = 0 Need to include some kind of stopping criteria otherwise, keep bouncing around forever.g., limit number of times ou can recursivel call racolor 3 For efficienc don t call racolor if k m = 0 Not going to reflect anthing anwa

CS 548: COMPUTER GRAPHICS REVIEW: OVERVIEW OF POLYGONS SPRING 2015 DR. MICHAEL J. REALE

CS 548: COMPUTER GRAPHICS REVIEW: OVERVIEW OF POLYGONS SPRING 2015 DR. MICHAEL J. REALE CS 548: COMPUTER GRPHICS REVIEW: OVERVIEW OF POLYGONS SPRING 05 DR. MICHEL J. RELE NOTE: COUNTERCLOCKWISE ORDER ssuming: Right-handed sstem Vertices in counterclockwise order looking at front of polgon

More information

Parallelization. Memory coherency helps when distributing rays to various threads/processors

Parallelization. Memory coherency helps when distributing rays to various threads/processors / Ra Tracing OpenGL projects triangles onto the image plane and rasteries them to determine which piels the cover Scanline rendering is a per triangle operation Ra Tracing instead works as a per piel operation

More information

Last Time. Correct Transparent Shadow. Does Ray Tracing Simulate Physics? Does Ray Tracing Simulate Physics? Refraction and the Lifeguard Problem

Last Time. Correct Transparent Shadow. Does Ray Tracing Simulate Physics? Does Ray Tracing Simulate Physics? Refraction and the Lifeguard Problem Graphics Pipeline: Projective Last Time Shadows cast ra to light stop after first intersection Reflection & Refraction compute direction of recursive ra Recursive Ra Tracing maimum number of bounces OR

More information

Illumination Models and Shading

Illumination Models and Shading 1 Illumination Models and Shading Motivation: In order to produce realistic images, we must simulate the appearance of surfaces under various lighting conditions. Illumination Models: Given the illumination

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

Ray Tracing. Announcements: Quiz. Last Time? Today. Durer s Ray Casting Machine. Ray Casting

Ray Tracing. Announcements: Quiz. Last Time? Today. Durer s Ray Casting Machine. Ray Casting nnouncements: Qui a Tracing On Frida (3/4), in class One 8.511 sheet of notes allowed Sample qui (from last ear) is posted online Focus on reading comprehension and material for Homeworks 0, 1, & 2 Last

More information

Ray Tracing. Last Time? Today. Ray Casting. Durer s Ray Casting Machine. Reading for Today

Ray Tracing. Last Time? Today. Ray Casting. Durer s Ray Casting Machine. Reading for Today Last Time? a Tracing Keframing Procedural nimation Phsicall-Based nimation Forward and Inverse Kinematics Motion Capture Two solutions Toda eading for Toda a Casting "n improved illumination model for

More information

Comp 410/510 Computer Graphics. Spring Shading

Comp 410/510 Computer Graphics. Spring Shading Comp 410/510 Computer Graphics Spring 2017 Shading Why we need shading Suppose we build a model of a sphere using many polygons and then color it using a fixed color. We get something like But we rather

More information

Ray Tracing COMP575/COMP770

Ray Tracing COMP575/COMP770 Ray Tracing COMP575/COMP770 1 Ray tracing idea 2 Ray Tracing: Example (from [Whitted80]) Ray Tracing: Example Ray Tracing for Highly Realistic Images Volkswagen Beetle with correct shadows and (multi-)reflections

More information

Ray Tracing. Quiz Discussion. Announcements: Final Projects. Last Time? Durer s Ray Casting Machine. Today

Ray Tracing. Quiz Discussion. Announcements: Final Projects. Last Time? Durer s Ray Casting Machine. Today Qui Discussion a Tracing Announcements: Final Projects Last Time? Everone should post one or more ideas for a final project on the discussion forum (it was our assignment over Spring Break) Connect with

More information

CS452/552; EE465/505. Intro to Lighting

CS452/552; EE465/505. Intro to Lighting CS452/552; EE465/505 Intro to Lighting 2-10 15 Outline! Projection Normalization! Introduction to Lighting (and Shading) Read: Angel Chapter 5., sections 5.4-5.7 Parallel Projections Chapter 6, sections

More information

Today s class. Geometric objects and transformations. Informationsteknologi. Wednesday, November 7, 2007 Computer Graphics - Class 5 1

Today s class. Geometric objects and transformations. Informationsteknologi. Wednesday, November 7, 2007 Computer Graphics - Class 5 1 Toda s class Geometric objects and transformations Wednesda, November 7, 27 Computer Graphics - Class 5 Vector operations Review of vector operations needed for working in computer graphics adding two

More information

0 COORDINATE GEOMETRY

0 COORDINATE GEOMETRY 0 COORDINATE GEOMETRY Coordinate Geometr 0-1 Equations of Lines 0- Parallel and Perpendicular Lines 0- Intersecting Lines 0- Midpoints, Distance Formula, Segment Lengths 0- Equations of Circles 0-6 Problem

More information

Intermediate Algebra. Gregg Waterman Oregon Institute of Technology

Intermediate Algebra. Gregg Waterman Oregon Institute of Technology Intermediate Algebra Gregg Waterman Oregon Institute of Technolog c 2017 Gregg Waterman This work is licensed under the Creative Commons Attribution 4.0 International license. The essence of the license

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

Glossary alternate interior angles absolute value function Example alternate exterior angles Example angle of rotation Example

Glossary alternate interior angles absolute value function Example alternate exterior angles Example angle of rotation Example Glossar A absolute value function An absolute value function is a function that can be written in the form, where is an number or epression. alternate eterior angles alternate interior angles Alternate

More information

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

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

More information

Shading. Brian Curless CSE 557 Autumn 2017

Shading. Brian Curless CSE 557 Autumn 2017 Shading Brian Curless CSE 557 Autumn 2017 1 Reading Optional: Angel and Shreiner: chapter 5. Marschner and Shirley: chapter 10, chapter 17. Further reading: OpenGL red book, chapter 5. 2 Basic 3D graphics

More information

Shading I Computer Graphics I, Fall 2008

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

More information

Shading. Why we need shading. Scattering. Shading. Objectives

Shading. Why we need shading. Scattering. Shading. Objectives Shading Why we need shading Objectives Learn to shade objects so their images appear three-dimensional Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something

More information

WHY WE NEED SHADING. Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like.

WHY WE NEED SHADING. Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like. LIGHTING 1 OUTLINE Learn to light/shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build a simple reflection model---the Phong model--- that can

More information

Determining the 2d transformation that brings one image into alignment (registers it) with another. And

Determining the 2d transformation that brings one image into alignment (registers it) with another. And Last two lectures: Representing an image as a weighted combination of other images. Toda: A different kind of coordinate sstem change. Solving the biggest problem in using eigenfaces? Toda Recognition

More information

M O T I O N A N D D R A W I N G

M O T I O N A N D D R A W I N G 2 M O T I O N A N D D R A W I N G Now that ou know our wa around the interface, ou re read to use more of Scratch s programming tools. In this chapter, ou ll do the following: Eplore Scratch s motion and

More information

Illumination & Shading

Illumination & Shading Illumination & Shading Goals Introduce the types of light-material interactions Build a simple reflection model---the Phong model--- that can be used with real time graphics hardware Why we need Illumination

More information

Scan Conversion- Polygons

Scan Conversion- Polygons Scan Conversion- olgons Flood Fill Algorithm Chapter 9 Scan Conversion (part ) Drawing olgons on Raster Displa Input polgon with rasterized edges = (x,) point inside Goal: Fill interior with specified

More information

A Little Background. Motivation. Motivation

A Little Background. Motivation. Motivation A Little Background Ray casting Process of shooting rays into scene to get pixel colors Nonrecursive, i.e., no interreflections Origin: Arthur Appel, 1968 (earlier work by others for nonrendering) Ray

More information

20 Calculus and Structures

20 Calculus and Structures 0 Calculus and Structures CHAPTER FUNCTIONS Calculus and Structures Copright LESSON FUNCTIONS. FUNCTIONS A function f is a relationship between an input and an output and a set of instructions as to how

More information

8.6 Three-Dimensional Cartesian Coordinate System

8.6 Three-Dimensional Cartesian Coordinate System SECTION 8.6 Three-Dimensional Cartesian Coordinate Sstem 69 What ou ll learn about Three-Dimensional Cartesian Coordinates Distance and Midpoint Formulas Equation of a Sphere Planes and Other Surfaces

More information

Lecture 15: Shading-I. CITS3003 Graphics & Animation

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

More information

CS770/870 Spring 2017 Color and Shading

CS770/870 Spring 2017 Color and Shading Preview CS770/870 Spring 2017 Color and Shading Related material Cunningham: Ch 5 Hill and Kelley: Ch. 8 Angel 5e: 6.1-6.8 Angel 6e: 5.1-5.5 Making the scene more realistic Color models representing the

More information

Name Class Date. subtract 3 from each side. w 5z z 5 2 w p - 9 = = 15 + k = 10m. 10. n =

Name Class Date. subtract 3 from each side. w 5z z 5 2 w p - 9 = = 15 + k = 10m. 10. n = Reteaching Solving Equations To solve an equation that contains a variable, find all of the values of the variable that make the equation true. Use the equalit properties of real numbers and inverse operations

More information

CS 450: COMPUTER GRAPHICS RASTERIZING LINES SPRING 2016 DR. MICHAEL J. REALE

CS 450: COMPUTER GRAPHICS RASTERIZING LINES SPRING 2016 DR. MICHAEL J. REALE CS 45: COMPUTER GRAPHICS RASTERIZING LINES SPRING 6 DR. MICHAEL J. REALE OBJECT-ORDER RENDERING We going to start on how we will perform object-order rendering Object-order rendering Go through each OBJECT

More information

CS559: Computer Graphics

CS559: Computer Graphics CS559: Computer Graphics Lecture 8: 3D Transforms Li Zhang Spring 28 Most Slides from Stephen Chenne Finish Color space Toda 3D Transforms and Coordinate sstem Reading: Shirle ch 6 RGB and HSV Green(,,)

More information

Algebra I. Linear Equations. Slide 1 / 267 Slide 2 / 267. Slide 3 / 267. Slide 3 (Answer) / 267. Slide 4 / 267. Slide 5 / 267

Algebra I. Linear Equations. Slide 1 / 267 Slide 2 / 267. Slide 3 / 267. Slide 3 (Answer) / 267. Slide 4 / 267. Slide 5 / 267 Slide / 67 Slide / 67 lgebra I Graphing Linear Equations -- www.njctl.org Slide / 67 Table of ontents Slide () / 67 Table of ontents Linear Equations lick on the topic to go to that section Linear Equations

More information

Projection: Mapping 3-D to 2-D. Orthographic Projection. The Canonical Camera Configuration. Perspective Projection

Projection: Mapping 3-D to 2-D. Orthographic Projection. The Canonical Camera Configuration. Perspective Projection Projection: Mapping 3-D to 2-D Our scene models are in 3-D space and images are 2-D so we need some wa of projecting 3-D to 2-D The fundamental approach: planar projection first, we define a plane in 3-D

More information

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

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

More information

Projections. Brian Curless CSE 457 Spring Reading. Shrinking the pinhole. The pinhole camera. Required:

Projections. Brian Curless CSE 457 Spring Reading. Shrinking the pinhole. The pinhole camera. Required: Reading Required: Projections Brian Curless CSE 457 Spring 2013 Angel, 5.1-5.6 Further reading: Fole, et al, Chapter 5.6 and Chapter 6 David F. Rogers and J. Alan Adams, Mathematical Elements for Computer

More information

What and Why Transformations?

What and Why Transformations? 2D transformations What and Wh Transformations? What? : The geometrical changes of an object from a current state to modified state. Changing an object s position (translation), orientation (rotation)

More information

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

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

More information

Week 3. Topic 5 Asymptotes

Week 3. Topic 5 Asymptotes Week 3 Topic 5 Asmptotes Week 3 Topic 5 Asmptotes Introduction One of the strangest features of a graph is an asmptote. The come in three flavors: vertical, horizontal, and slant (also called oblique).

More information

Simple Lighting/Illumination Models

Simple 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 information

y = f(x) x (x, f(x)) f(x) g(x) = f(x) + 2 (x, g(x)) 0 (0, 1) 1 3 (0, 3) 2 (2, 3) 3 5 (2, 5) 4 (4, 3) 3 5 (4, 5) 5 (5, 5) 5 7 (5, 7)

y = f(x) x (x, f(x)) f(x) g(x) = f(x) + 2 (x, g(x)) 0 (0, 1) 1 3 (0, 3) 2 (2, 3) 3 5 (2, 5) 4 (4, 3) 3 5 (4, 5) 5 (5, 5) 5 7 (5, 7) 0 Relations and Functions.7 Transformations In this section, we stud how the graphs of functions change, or transform, when certain specialized modifications are made to their formulas. The transformations

More information

CS770/870 Spring 2017 Transformations

CS770/870 Spring 2017 Transformations CS770/870 Spring 2017 Transformations Coordinate sstems 2D Transformations Homogeneous coordinates Matrices, vectors, points Coordinate Sstems Coordinate sstems used in graphics Screen coordinates: the

More information

3-Dimensional Viewing

3-Dimensional Viewing CHAPTER 6 3-Dimensional Vieing Vieing and projection Objects in orld coordinates are projected on to the vie plane, hich is defined perpendicular to the vieing direction along the v -ais. The to main tpes

More information

COMP Computer Graphics and Image Processing. a6: Projections. In part 2 of our study of Viewing, we ll look at. COMP27112 Toby Howard

COMP Computer Graphics and Image Processing. a6: Projections. In part 2 of our study of Viewing, we ll look at. COMP27112 Toby Howard Computer Graphics and Image Processing a6: Projections Tob.Howard@manchester.ac.uk Introduction In part 2 of our stud of Viewing, we ll look at The theor of geometrical planar projections Classes of projections

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

Three-Dimensional Coordinates

Three-Dimensional Coordinates CHAPTER Three-Dimensional Coordinates Three-dimensional movies superimpose two slightl different images, letting viewers with polaried eeglasses perceive depth (the third dimension) on a two-dimensional

More information

CS F-07 Objects in 2D 1

CS F-07 Objects in 2D 1 CS420-2010F-07 Objects in 2D 1 07-0: Representing Polgons We want to represent a simple polgon Triangle, rectangle, square, etc Assume for the moment our game onl uses these simple shapes No curves for

More information

CS5620 Intro to Computer Graphics

CS5620 Intro to Computer Graphics Ra Tracing Ra-Tracing A B C D Photorealism Objective: To generate images that are as close as possible to those perceived b the human ee. Method: Accurate simulation of optical phenomena. Copright Page

More information

Plot and connect the points in a coordinate plane to make a polygon. Name the polygon.

Plot and connect the points in a coordinate plane to make a polygon. Name the polygon. . Start Thinking Find at least two objects in each of the following categories: circle, square, triangle, and rectangle (nonsquare). Use a table to compare each object of the same categor in the following

More information

Perspective Projection Transformation

Perspective Projection Transformation Perspective Projection Transformation Where does a point of a scene appear in an image?? p p Transformation in 3 steps:. scene coordinates => camera coordinates. projection of camera coordinates into image

More information

CS 130 Exam I. Fall 2015

CS 130 Exam I. Fall 2015 S 3 Exam I Fall 25 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying

More information

UNIT P1: PURE MATHEMATICS 1 QUADRATICS

UNIT P1: PURE MATHEMATICS 1 QUADRATICS QUADRATICS Candidates should able to: carr out the process of completing the square for a quadratic polnomial, and use this form, e.g. to locate the vertex of the graph of or to sketch the graph; find

More information

Chap 7, 2009 Spring Yeong Gil Shin

Chap 7, 2009 Spring Yeong Gil Shin Three-Dimensional i Viewingi Chap 7, 29 Spring Yeong Gil Shin Viewing i Pipeline H d fi i d? How to define a window? How to project onto the window? Rendering "Create a picture (in a snthetic camera) Specification

More information

Summer Dear Geometry Students and Parents:

Summer Dear Geometry Students and Parents: Summer 2018 Dear Geometry Students and Parents: Welcome to Geometry! For the 2018-2019 school year, we would like to focus your attention to the prerequisite skills and concepts for Geometry. In order

More information

Shading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 557 Fall Required: Shirley, Chapter 10

Shading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 557 Fall Required: Shirley, Chapter 10 Reading Required: Shirley, Chapter 10 Shading Brian Curless CSE 557 Fall 2014 1 2 Basic 3D graphics With affine matrices, we can now transform virtual 3D objects in their local coordinate systems into

More information

Two Dimensional Viewing

Two Dimensional Viewing Two Dimensional Viewing Dr. S.M. Malaek Assistant: M. Younesi Two Dimensional Viewing Basic Interactive Programming Basic Interactive Programming User controls contents, structure, and appearance of objects

More information

w Foley, Section16.1 Reading

w Foley, Section16.1 Reading Shading w Foley, Section16.1 Reading Introduction So far, we ve talked exclusively about geometry. w What is the shape of an object? w How do I place it in a virtual 3D space? w How do I know which pixels

More information

CS 130 Exam I. Fall 2015

CS 130 Exam I. Fall 2015 CS 130 Exam I Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is

More information

MAN-522: COMPUTER VISION SET-2 Projections and Camera Calibration

MAN-522: COMPUTER VISION SET-2 Projections and Camera Calibration MAN-522: COMPUTER VISION SET-2 Projections and Camera Calibration Image formation How are objects in the world captured in an image? Phsical parameters of image formation Geometric Tpe of projection Camera

More information

2.8 Distance and Midpoint Formulas; Circles

2.8 Distance and Midpoint Formulas; Circles Section.8 Distance and Midpoint Formulas; Circles 9 Eercises 89 90 are based on the following cartoon. B.C. b permission of Johnn Hart and Creators Sndicate, Inc. 89. Assuming that there is no such thing

More information

Reteaching Inequalities in Two Triangles

Reteaching Inequalities in Two Triangles Name ate lass Inequalities in Two Triangles INV You have worked with segments and angles in triangles. Now ou will eplore inequalities with triangles. Hinge Theorem If two sides of one triangle are congruent

More information

Introduction to Computer Graphics 7. Shading

Introduction to Computer Graphics 7. Shading Introduction to Computer Graphics 7. Shading National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor Textbook: Hearn and Baker, Computer Graphics, 3rd Ed., Prentice Hall Ref: E.Angel, Interactive

More information

Problem 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 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 information

3D Geometry and Camera Calibration

3D Geometry and Camera Calibration 3D Geometr and Camera Calibration 3D Coordinate Sstems Right-handed vs. left-handed 2D Coordinate Sstems ais up vs. ais down Origin at center vs. corner Will often write (u, v) for image coordinates v

More information

Graphs, Linear Equations, and Functions

Graphs, Linear Equations, and Functions Graphs, Linear Equations, and Functions. The Rectangular R. Coordinate Fractions Sstem bjectives. Interpret a line graph.. Plot ordered pairs.. Find ordered pairs that satisf a given equation. 4. Graph

More information

Connecting Algebra and Geometry with Polygons

Connecting Algebra and Geometry with Polygons Connecting Algebra and Geometr with Polgons 15 Circles are reall important! Once ou know our wa around a circle, ou can use this knowledge to figure out a lot of other things! 15.1 Name That Triangle!

More information

p =(x,y,d) y (0,0) d z Projection plane, z=d

p =(x,y,d) y (0,0) d z Projection plane, z=d Projections ffl Mapping from d dimensional space to d 1 dimensional subspace ffl Range of an projection P : R! R called a projection plane ffl P maps lines to points ffl The image of an point p under P

More information

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

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

More information

12.4 The Ellipse. Standard Form of an Ellipse Centered at (0, 0) (0, b) (0, -b) center

12.4 The Ellipse. Standard Form of an Ellipse Centered at (0, 0) (0, b) (0, -b) center . The Ellipse The net one of our conic sections we would like to discuss is the ellipse. We will start b looking at the ellipse centered at the origin and then move it awa from the origin. Standard Form

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

Computer Graphics. Lecture 3 Graphics Output Primitives. Somsak Walairacht, Computer Engineering, KMITL

Computer Graphics. Lecture 3 Graphics Output Primitives. Somsak Walairacht, Computer Engineering, KMITL Computer Graphics Lecture 3 Graphics Output Primitives Somsa Walairacht, Computer Engineering, KMITL Outline Line Drawing Algorithms Circle-, Ellipse-Generating Algorithms Fill-Area Primitives Polgon Fill

More information

Polar Functions Polar coordinates

Polar Functions Polar coordinates 548 Chapter 1 Parametric, Vector, and Polar Functions 1. What ou ll learn about Polar Coordinates Polar Curves Slopes of Polar Curves Areas Enclosed b Polar Curves A Small Polar Galler... and wh Polar

More information

Graphics for VEs. Ruth Aylett

Graphics for VEs. Ruth Aylett Graphics for VEs Ruth Aylett Overview VE Software Graphics for VEs The graphics pipeline Projections Lighting Shading VR software Two main types of software used: off-line authoring or modelling packages

More information

LESSON 3.1 INTRODUCTION TO GRAPHING

LESSON 3.1 INTRODUCTION TO GRAPHING LESSON 3.1 INTRODUCTION TO GRAPHING LESSON 3.1 INTRODUCTION TO GRAPHING 137 OVERVIEW Here s what ou ll learn in this lesson: Plotting Points a. The -plane b. The -ais and -ais c. The origin d. Ordered

More information

Lecture 4: Viewing. Topics:

Lecture 4: Viewing. Topics: Lecture 4: Viewing Topics: 1. Classical viewing 2. Positioning the camera 3. Perspective and orthogonal projections 4. Perspective and orthogonal projections in OpenGL 5. Perspective and orthogonal projection

More information

science. In this course we investigate problems both algebraically and graphically.

science. In this course we investigate problems both algebraically and graphically. Section. Graphs. Graphs Much of algebra is concerned with solving equations. Man algebraic techniques have been developed to provide insights into various sorts of equations and those techniques are essential

More information

Translations, Reflections, and Rotations

Translations, Reflections, and Rotations Translations, Reflections, and Rotations The Marching Cougars Lesson 9-1 Transformations Learning Targets: Perform transformations on and off the coordinate plane. Identif characteristics of transformations

More information

Epipolar Constraint. Epipolar Lines. Epipolar Geometry. Another look (with math).

Epipolar Constraint. Epipolar Lines. Epipolar Geometry. Another look (with math). Epipolar Constraint Epipolar Lines Potential 3d points Red point - fied => Blue point lies on a line There are 3 degrees of freedom in the position of a point in space; there are four DOF for image points

More information

Ray Tracing. Local Illumination. Object Space: Global Illumination. Image Space: Backward Ray Tracing. First idea: Forward Ray Tracing

Ray Tracing. Local Illumination. Object Space: Global Illumination. Image Space: Backward Ray Tracing. First idea: Forward Ray Tracing CSCI 420 Computer Graphics Lecture 15 Ra Tracing Ra Casting Shadow Ras Reflection and Transmission [Angel Ch. 11] Local Illumination Object illuminations are independent No light scattering between objects

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

Viewing Transformations I Comp 535

Viewing Transformations I Comp 535 Viewing Transformations I Comp 535 Motivation Want to see our virtual 3-D worl on a 2-D screen 2 Graphics Pipeline Moel Space Moel Transformations Worl Space Viewing Transformation Ee/Camera Space Projection

More information

1. We ll look at: Types of geometrical transformation. Vector and matrix representations

1. We ll look at: Types of geometrical transformation. Vector and matrix representations Tob Howard COMP272 Computer Graphics and Image Processing 3: Transformations Tob.Howard@manchester.ac.uk Introduction We ll look at: Tpes of geometrical transformation Vector and matri representations

More information

Introduction. Lighting model Light reflection model Local illumination model Reflectance model BRDF

Introduction. Lighting model Light reflection model Local illumination model Reflectance model BRDF Shading Introduction Affine transformations help us to place objects into a scene. Before creating images of these objects, we ll look at models for how light interacts with their surfaces. Such a model

More information

Lecture 11: Ray tracing (cont.)

Lecture 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 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

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

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

More information

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

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

More information

Ray Casting. Outline. Similar to glulookat derivation. Foundations of Computer Graphics

Ray Casting. Outline. Similar to glulookat derivation. Foundations of Computer Graphics Foundations of omputer Graphics Online Lecture 10: Ray Tracing 2 Nuts and olts amera Ray asting Outline amera Ray asting (choose ray directions) Ravi Ramamoorthi Outline in ode Image Raytrace (amera cam,

More information

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted.

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted. CS 184: Foundations of Computer Graphics page 1 of 10 Student Name: Class Account Username: Instructions: Read them carefully! The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when

More information

Notes Packet on Quadratic Functions and Factoring Graphing quadratic equations in standard form, vertex form, and intercept form.

Notes Packet on Quadratic Functions and Factoring Graphing quadratic equations in standard form, vertex form, and intercept form. Notes Packet on Quadratic Functions and Factoring Graphing quadratic equations in standard form, vertex form, and intercept form. A. Intro to Graphs of Quadratic Equations:! = ax + bx + c A is a function

More information

Computer 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 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 information

8.1 Geometric Queries for Ray Tracing

8.1 Geometric Queries for Ray Tracing Fall 2017 CSCI 420: Computer Graphics 8.1 Geometric Queries for Ray Tracing Hao Li http://cs420.hao-li.com 1 Outline Ray-Surface Intersections Special cases: sphere, polygon Barycentric coordinates 2 Outline

More information

Introduction to Homogeneous Transformations & Robot Kinematics

Introduction to Homogeneous Transformations & Robot Kinematics Introduction to Homogeneous Transformations & Robot Kinematics Jennifer Ka Rowan Universit Computer Science Department. Drawing Dimensional Frames in 2 Dimensions We will be working in -D coordinates,

More information

Homework #2. Shading, Ray Tracing, and Texture Mapping

Homework #2. Shading, Ray Tracing, and Texture Mapping Computer Graphics Prof. Brian Curless CSE 457 Spring 2000 Homework #2 Shading, Ray Tracing, and Texture Mapping Prepared by: Doug Johnson, Maya Widyasari, and Brian Curless Assigned: Monday, May 8, 2000

More information

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

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

More information

Basics of Computational Geometry

Basics of Computational Geometry Basics of Computational Geometry Nadeem Mohsin October 12, 2013 1 Contents This handout covers the basic concepts of computational geometry. Rather than exhaustively covering all the algorithms, it deals

More information

From Graphics to Visualization

From Graphics to Visualization From Graphics to Visualization Introduction Light Sources Surface Lighting Effects Basic (Local ) Illumination Models Polgon-Rendering Methods Texture Mapping Transparenc and Blending Visualization Pipeline

More information

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

Computer 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 information

Computer Graphics Ray Casting. Matthias Teschner

Computer 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 information