Repetition of TDA361. Misc. GEOMETRY Summary. Lecture 2: Transforms. Homogeneous notation. Ulf Assarsson

Size: px
Start display at page:

Download "Repetition of TDA361. Misc. GEOMETRY Summary. Lecture 2: Transforms. Homogeneous notation. Ulf Assarsson"

Transcription

1 Repetton of TDA361 Ulf Assarsson Msc Eng translaton: All your answers on exam must be wrtten n Englsh Tll alla lärare på masternvån, Undervsnngen på Chalmers masterprogram sker på engelska. Vcerektor Sven Engström klarlägger att all examnaton också sker på engelska dvs tentamenssvaren skall vara på engelska. Syftet är att studenten skall träna att kommuncera på engelska såväl muntlgt som skrftlgt olka stuatoner. För skrftlga tentamna gäller t ex att annat språk än engelska nte skall beaktas vd rättnngen. Som tdgare är ordböcker tllåtna hjälpmedel vd tentamna förutom vd tentamen språk. Var vänlg meddela detta tll studenterna på Dna kurser nför tentamensperoden oktober. Lecture 1: Real-tme Renderng The Graphcs Renderng Ppelne Chapter 2 n the book The ppelne s the engne that creates mages from 3D scenes Three conceptual stages of the ppelne: Applcaton (executed on the CPU) Geometry Rasterer GEOMETRY Summary model space world space world space Applcaton Geometry Rasterer camera space nput Applcaton Geometry Rasterer 3D scene + how to locate the Image output compute lghtng projecton mage space bottleneck, RTR: ch 1.1 ModelVewMtx = Model to Vew Matrx clp map to screen Lecture 2: Transforms Homogeneous notaton Quaternons Know what they are good for. Not knowng all mathematcal rules. Projectons 3. Vectors and Transforms rotatonsdelen Homogeneous notaton A pont: p px py p 1 Translaton becomes: 1 tx px px tx Translatonsdelen 1 t y py py t y 1 t p p t T( t) A vector (drecton): d d x d y d Translaton of vector: Td d Also allows for projectons (later) T T 1

2 3. Vectors and Transforms M Change of Frames M model-to-world : a y ax ay a b b b x y c c c x y model-to-world ox o y o 1 world space x (,5,) b o model space c 3. Vectors and Transforms Projectons Orthogonal (parallel) and Pertve E.g.: p world = M mw p model = M mw (,5,) T = 5 b (+ o) 3. Vectors and Transforms Orthogonal projecton Smple, just skp one coordnate Say, we re lookng along the -axs Then drop, and render M ortho M ortho px px py py p Rasteraton, Depth Sortng and Cullng: DDA Algorthm Dgtal Dfferental Analyer DDA was a mechancal devce for numercal soluton of dfferental equatons Lne y=kx+ m satsfes dfferental equaton dy/dx = k = Dy/Dx = y 2 -y 1 /x 2 -x 1 Along scan lne Dx = 1 y=y1; For(x=x1; x<=x2,x++) { wrte_pxel(x, round(y), lne_color) y+=k; } 6. Rasteraton, Depth Sortng and Cullng: Usng Symmetry Use for 1 k For k > 1, swap role of x and y For each y, plot closest x 6. Rasteraton, Depth Sortng and Cullng: Very Important! The problem wth DDA s that t uses floats whch was slow n the old days Bresenhams algorthm only uses ntegers You do not need to know Bresenham s algorthm by heart. It s enough to understand the followng 2 sldes. 2

3 Bresenham s lne drawng algorthm The lne s drawn between two ponts (x, y ) and (x 1, y 1 ) ( y Slope 1 y) k (y = kx + m) ( x1 x) Each tme we step 1 n x-drecton, we should ncrement y wth k. Otherwse the error n y ncreases wth k. If the error surpasses.5, the lne has become closer to the next y- value, so we add 1 to y smultaneously decreasng the error by 1 functon lne(x, x1, y, y1) nt deltax := abs(x1 - x) nt deltay := abs(y1 - y) real error := real deltaerr := deltay / deltax nt y := y for x from x to x1 plot(x,y) error := error + deltaerr f error.5 y := y + 1 error := error - 1. Ths s the reason that DDA needs floats. So Bresenham s soluton s to multply all correspondng numbers wth (x 1 -x ) to get ntegers. See also Ulf Assarsson 26 Bresenham s lne drawng algorthm Now, convert algorthm to only usng nteger computatons The trck we use s to multply all the fractonal numbers above by (x 1, x ), whch enables us to express them as ntegers. The only problem remanng s the constant.5 to deal wth ths, we multply both sdes of the nequalty by 2 Old float verson: functon lne(x, x1, y, y1) nt deltax := abs(x1 - x) nt deltay := abs(y1 - y) real error := real deltaerr := deltay / deltax nt y := y for x from x to x1 plot(x,y) error := error + deltaerr f error.5 y := y + 1 error := error - 1. New nteger verson: functon lne(x, x1, y, y1) nt deltax := abs(x1 - x) nt deltay := abs(y1 - y) real error := real deltaerr := deltay nt y := y for x from x to x1 plot(x,y) error := error + deltaerr f 2*error deltax y := y + 1 error := error - deltax Bresenhams alg. Ulf Assarsson Rasteraton, Depth Sortng and Cullng: Panter s Algorthm Render polygons a back to front order so that polygons behnd others are smply panted over B behnd A as seen by vewer Requres orderng of polygons frst O(n log n) calculaton for orderng Not every polygon s ether n front or behnd all other polygons Fll B then A I.e., : Sort all trangles and render them back-to-front. 6. Rasteraton, Depth Sortng and Cullng: -Buffer Algorthm Use a buffer called the or depth buffer to store the depth of the closest object at each pxel found so far As we render each polygon, compare the depth of each pxel to depth n buffer If less, place shade of pxel n color buffer and update buffer Lekton 3: OpenGL Uses OpenGL (or DrectX) Wll not ask about syntax. Know how to use. E.g. how to acheve Transparency Fog(start, stop, lnear/exp/exp-squared) Specfy a materal, a trangle 3. OpenGL: Specfyng vertces and polygons OpenGL s a state machne. Commands typcally change the current state Multple callng formats for the commands: glvertex{234}{sfd}( coords ) glbegn()/glend(). (Slow) glbegn(gl_triangle) glvertex3f(,,) glvertex3f(,1,); glvertex3f(1,1,); glend(); Optonal: Can fy for nstance glcolor3f(r,g,b), gltexcoord2f(s,t), glnormal3f(x,y,) - typcally per vertex or per prmtve. Dsplay lsts are created wth surroundng glnewlst() and glendlst(). (Fast) Idea: Objects are nt dlst=glgenlsts(1); // generate one dsplay lst number glnewlst(dlst,gl_compile); // ndcates start of dsplay lst stored nternally n // or any object fcaton the most effcent glendlst(); // ndcates end of dsplay lst format Dsplay lsts are then drawn wth: glcalllst(dlst); Vertex Arrays (Fast): gltexcoordponter( se type strde *ponter ) //Defnes an array of texture coordnates glcolorponter( strde *ponter ) //Defnes an array of colors se type glindexponter( type strde *ponter ) //Defnes an array of color ndces) glnormalponter( type strde *ponter ) //Defnes an array of normals glvertexponter( se type strde *ponter ); //Defnes an array of vertces glenableclentstate( array gldsableclentstate( array wth array set to ) ), or,,,, glarrayelement(nt ); // Transfers the th element of every enabled array to OpenGL gldrawarrays mode; frst; count // Renders multple prmtves from the enabled arrays // Same as gldrawarrays, but takes array gldrawelements(mode, count type *ndces ) elements ponted to by ndces. glinterleavedarrays format; strde; ponter // One array wth vertces, normals, textures and/colors nterleaved Ulf Assarsson 23 3

4 3. OpenGL: Matrx and Stack Operatons Matrx Operatons: glrotate(),gltranslate(), glscale(), GLU Helper functons: glupertve(), glulookat, Ulf Assarsson OpenGL: Lghtng and Colors glcolor4f(r,g,b,a), glcolor3f(r,g,b) Used when lghtng s dsabled: Dsable wth gldsable( GL_LIGHTING ); Could be changed for nstance per vertex or per object. Can also be fed wth glcolorponter() as descrbed prevously glmateralfv() Used when lghtng s enabled. Enable wth glenable( GL_LIGHTING ); Must also enable lghts: glenable( GL_LIGHTn ); Example: glmateralfv(gl_front_and_back, GL_AMBIENT, float rgba[4]) glmateralfv(gl_front_and_back, GL_DIFFUSE, float rgba[4]) glmateralfv(gl_front_and_back, GL_SPECULAR, float rgba[4]) glmateralfv(gl_front_and_back, GL_EMISSION, float rgba[4]) glmateralf(gl_front_and_back, GL_SHININESS, 3) Ulf Assarsson OpenGL: Buffers Frame buffer Back/front/left/rght gldrawbuffers() Alpha channel: glalphafunc() Depth buffer (-buffer) For correct depth sortng Instead of BSP-algorthm, panters algorthm Stencl buffer E.g. Shadow volumes and maskng renderng to non-rectangular regons, Accumulaton buffer Lecture 4.1: Shadng Lghtng =amb+dff++emsson + = + Know how to compute components. Also, Blnns and Phongs hghlght model Ulf Assarsson Shadng: Lghtng Lght: Ambent (r,g,b,a) Dffuse (r,g,b,a) Specular (r,g,b,a) Materal: Ambent (r,g,b,a) Dffuse (r,g,b,a) Specular (r,g,b,a) Emsson (r,g,b,a) = självlysande färg Tomas Added Akenne-Mőller by Ulf Assarsson, Shadng: Lghtng =amb+dff++emsson I.e.: =amb+dff++emsson amb dff m amb ( nl) m Phong s reflecton model: Blnn s reflecton model: s dff amb s emsson m emsson dff msh max(,( r v) ) msh max(,( hn) ) m m s s 4

5 4. Shadng: Ambent component: amb Ad-hoc tres to account for lght comng from other surfaces Just add a constant color: amb m amb s amb.e., ( r, g, b, a ) = (m r, m g, m b, m a ) (l r, l g, l b, l a ) 4. Shadng: Dffuse component : dff =amb+dff++emsson Dffuse s Lambert s law: dff nl cos Photons are scattered equally n all drectons ( nl) m s dff dff dff gllghtmodelfv(gl_light_model_ambient, global_ambent) Modfed Tomas Akenne-Mőller by Ulf Assarsson, Shadng: Lghtng Specular component : 4. Shadng: Specular component: Phong Phong ular hghlght model Reflect l around n: r r l 2(n l)n n l nl Dffuse s dull (left) Specular: smulates a hghlght ( r v) (cos ) m sh m sh ( n l) n -l msh max(,( r v) ) m s Next: Blnns hghlght formula: (n. h) m 4. Shadng: Halfway Vector Blnn proposed replacng v r by n h where h = (l+v)/ l + v (l+v)/2 s halfway between l and v If n, l, and v are coplanar: y /2 Must then adjust exponent so that (n h) e (r v) e (e 4e) msh max(,( hn) ) m s 4. Shadng: Shadng Three common types of shadng: Flat, Goraud, and Phong In standard Gouraud shadng the lghtng s computed per trangle vertex and for each pxel, the color s nterpolated from the colors at the vertces. In Phong Shadng the lghtng s not per vertex. Instead the normal s nterpolated per pxel from the normals defned at the vertces and full lghtng s computed per pxel usng ths normal. Ths s of course more expensve but looks better. Flat Gouraud Phong 5

6 4. Shadng: Transparency and alpha Transparency Very smple n real-tme contexts The tool: alpha blendng (mx two colors) Alpha (a) s another component n the frame buffer, or on trangle Represents the opacty 1. s totally opaque. s totally transparent The over operator: o c ac ( 1a) c Rendered object s d 4. Shadng: Transparency Need to sort the transparent objects Frst, render all non-transparent trangles as usual. Then, sort all transparent trangles and render back-to-front wth blendng enabled. (and usng standard depth test) Partly to avod problems wth the depth test and partly because the blendng operaton s order dependent. Leture 4.2: Samplng, fltrerng, and AA Why care? When does t occur? In pxels, tme, texture, etc Nyqust Flters Supersamplng schemes Jttered samplng Adaptve samplng n ray tracng Flterng FILTERING: For magnfcaton: Nearest or Lnear (box vs Tent flter) For mnfcaton: Blnear usng mpmappng Trlnear usng mpmappng Ansotropc some mpmap lookups along lne Ulf of Assarsson ansotropy 24 Interpolaton Magnfcaton Blnear flterng usng Mpmappng Mnfcaton 6

7 7. Texturng: Mpmappng Image pyramd Half wdth and heght when gong upwards Average over 4 parent texels to form chld texel Dependng on amount of mnfcaton, determne whch mage to fetch from Compute d frst, gves two mages Blnear nterpolaton n each v d u 7. Texturng: Mpmappng Interpolate between those blnear values Gves trlnear nterpolaton Level n+1 (u,v,d ) d Level n v u Constant tme flterng: 8 texel accesses Ansotropc texture flterng 7. Texturng: 5. Texturng Most mportant: Texturng, envronment mappng Bump mappng 3D-textures, Partcle systems Sprtes and bllboards 7. Texturng: Envronment mappng Assumes the envronment s nfntely far away Sphere mappng For detals, see OH Cube mappng s the norm nowadays Advantages: no sngulartes as n sphere map Much less dstorton Gves better result Not dependent on a vew poston Modfed by Ulf Assarsson Texturng: Cube mappng eye y x n Smple math: compute reflecton vector, r Largest abs-value of component, determnes whch cube face. Example: r=(5,-1,2) gves POS_X face Dvde r by abs(5) gves (u,v)=(-1/5,2/5) If your hardware has ths feature, then t does all the work 7

8 7. Texturng: Bump mappng by Blnn n 1978 Inexpensve way of smulatng wrnkles and bumps on geometry Too expensve to model these geometrcally Instead let a texture modfy the normal at each pxel, and then use ths normal to compute lghtng per pxel 7. Texturng: 3D Textures 3D textures: Feasble on modern hardware as well Texture flterng s no longer trlnear Rather quadlnear (lnear nterpolaton 4 tmes) Enables new possbltes Can store lght n a room, for example + = geometry Bump map Bump mapped geometry Stores heghts: can derve normals 7. Texturng: Sprtes Sprtes (=älvor) was a technque on older home computers, e.g. VIC64. As opposed to bllboards sprtes does not use the frame buffer. They are rastered drectly to the screen usng a al chp. A al btregster also marked colldng sprtes. 7. Texturng: 2D mages used n 3D envronments Common for trees, explosons, clouds, lens flares Bllboards 7. Texturng: Bllboards 7. Texturng: Fx correct transparency by blendng AND usng alphatest glenable(gl_alpha_test); glalphafunc(gl_greater,.1); Bllboards Color Buffer Depth Buffer Rotate them towards vewer Ether by rotaton matrx or by orthographc projecton Threshold >. If alpha value n texture s lower than ths threshold value, the pxel s not rendered to. I.e., nether frame buffer nor -buffer s updated. Whch s what we want to acheve. E.g. here: Wth blendng Wth alpha test 8

9 7. Texturng: (Also called Impostors) n axal bllboardng The rotaton axs s fxed and dsregardng the vew poston Lecture 6.1: Intersecton Tests 4 technques: Analythc Geometrc e.g. ray vs box (3 slabs) SAT Test: 1. axes ortho to sde of A, 2. axes ortho to sde of B 3. crossprod of edges Dynamc tests Know how they work E.g., descrbe an algorthm for ntersecton between a ray and a polygon. Know equatons for ray, sphere, cylnder, plane Analytcal: Ray/plane ntersecton Ray: r(t)=o+td Plane formula: n p + d = Replace p by r(t) and solve for t: n (o+td) + d = n o+tn d + d = t = (-d -n o) / (n d) o d n Tomas Akenne-Mőller 23 Analytcal: Ray/sphere test Sphere center: c, and radus r Ray: r(t)=o+td Sphere formula: p-c =r Replace p by r(t): r(t)-c =r ( r( t) c) ( r( t) c) r 2 ( o td c) ( o td c) r ( dd) t t 2(( ο c) d) t ( ο c) ( ο c) r 2 2(( ο c) d) t ( ο c) ( ο c) r Ths s a standard quadratc equaton. Solve for t. o 2 d r c d 1 Tomas Akenne-Mőller 23 Lecture 6.2: Spatal Data Structures and Speed-Up Technques Speed-up technques Cullng Backface Vew frustum (herarchcal) Portal Occluson Cullng Detal Levels-of-detal How to construct and use the spatal data structures BVH, BSP-trees (polygon algned + axs algned) Lecture 6.2: Spatal data structures BVH, Grds (recursve/herarchcal), octrees/quadtree, BVH sphercal / OBB / AABB, BSP (polygon / axs algned, kdtrees) How to use, what they look lke, how to construct (f mentoned n the course) 9

10 Ray Tracng Summary of the Ray tracngalgorthm: Image plane trace() lght shade() trace() trace() shade() Pont s n shadow man()-calls trace() for each pxel trace(): should return color of closest ht pont along ray. 1. calls fndclosestintersecton() 2. If any object ntersected call shade(). Shade(): should compute color at ht pont 1. For each lght source, shoot shadow ray to determne f lght source s vsble If not n shadow, compute dffuse + ular contrbuton. 2. Compute ambent contrbuton 3. Call trace() recursvely for the reflecton- and refracton ray. Lecture 7-8: Ray tracng Adaptve Super Samplng Jtterng How to stop recurson? (Transmsson) Speedup technques Spatal data structures Optmatons for BVHs skpponter tree BVH-traversal (You do not need to learn the ray traversal algorthms for Grds nor AA-BSP trees) Shadow cache Materal (Fresnel: metall, delectrcs) Constructve Sold Geometry 9. Curves and Surfaces: Objectves Introduce the types of curves Interpolatng Blendng polynomals for nterpolaton of 4 control ponts (ft curve to 4 control ponts) Hermte ft curve to 2 control ponts + 2 dervatves (tangents) Beer 2 nterpolatng control ponts + 2 ntermedate ponts to defne the tangents B-splne To get C 2 contnuty NURBS Dfferent weghts of the control ponts and The control ponts can be at non-unform ntervalls p p 1 9. Curves and Surfaces: p 2 If we examne the cubc B-splne from the p 3 Splnes and Bass pertve of each control (data) pont, each nteror pont contrbutes (through the blendng functons) to four segments We can rewrte p(u) n terms of the data ponts as p( u) B ( u) p defnng the bass functons {B (u)} 9. Curves and Surfaces: B-Splnes p p1 p 2 p 3 p 4 p5 These are our control ponts, p - p 8, to whch we want to approxmate a curve p 6 p 7 p 8 SUMMARY p p 1 p 2 p 3 p 4 B-Splnes In each pont p(u) of the curve, for a gven u, the pont s defned as a weghted sum of the closest 4 surroundng ponts. Below are shown the weghts for each pont along u=1 1% Blendfuncton B 1(u) for pont p 1 p 5 p 6 p 7 p 8 1% u= Illustraton of how the control ponts are evenly (unformly) dstrbuted along the parametersaton u of the curve p(u). In each pont p(u) of the curve, for a gven u, the pont s defned as a weghted sum of the closest 4 surroundng ponts. Below are shown the weghts for each pont along u=1 p p 1 p 2 p 3 p 4 p 5 p 6 p 7 p 8 u u u The weght functon (blend functon) B p (u) for a pont p can thus be wrtten as a translaton of a bass functon B(t). B p (u) = B(u-) B(t): 1% t Our complete B-splne curve p(u) can thus be wrtten as: p( u) B ( u) p 1

11 9. Curves and Surfaces: NURBS NURBS s smlar to B-Splnes except that: 1. The control ponts can have dfferent weghts, w, (hegher weght makes the curve go closer to that control pont) 2. The control ponts do not have to be at unform dstances (u=,1,2,3...) along the parametersaton u. E.g.: u=,.5,.9, 4, 14, NURBS = Non-Unform Ratonal B-Splnes The NURBS-curve s thus defned as: 9. Curves and Surfaces: NURBS Allowng control ponts at non-unform dstances means that the bass functons B p () are beng streched and non-unformly located. E.g.: Dvson wth the sum of the weghts, to make the combned weghts sum up to 1, at each poston along the curve. Otherwse, a translaton of the curve s ntroduced (whch can be fun but normally not desred) Each curve B p () should of course look smooth and C 2 contnuous. But t s not so easy to draw smoothly by hand... (The sum of the weghts are stll =1 due to the dvson n u Lecture 1.1: Collson Detecton 3 types of algorthms: Wth rays Fast but not exact Wth BVH Pseudo code s smple to derve Slower but exact For lots of objects. why? Course prunng of obvously non-colldng objects Sweep-and-prune 1.2 Vertex and Fragment Shaders: Vertex- and Fragment shaders Understand the followng shaders Eally the frst two 1. Vertex and Fragment Shaders: Wave Moton Vertex Shader 1. Vertex and Fragment Shaders: Partcle System unform float tme; unform float xs, s; vod man() { float s; s = *sn(xs*tme)*sn(s*tme); gl_vertex.y = s*gl_vertex.y; gl_poston = gl_modelvewprojectonmatrx*gl_vertex; } unform vec3 nt_vel; unform float g, m, t; vod man() { vec3 object_pos; object_pos.x = gl_vertex.x + vel.x*t; object_pos.y = gl_vertex.y + vel.y*t - g/(2.*m)*t*t; object_pos. = gl_vertex. + vel.*t; gl_poston = gl_modelvewprojectonmatrx* vec4(object_pos,1); } 11

12 1. Vertex and Fragment Shaders: Vertex Shader for per Fragment Lghtng /* vertex shader for per-fragment Phong shadng */ varyng vec3 normale; varyng vec4 postone; vod man() { normale = gl_normalmatrxmatrx*gl_normal; postone = gl_modelvewmatrx*gl_vertex; gl_poston = gl_modelvewprojectonmatrx*gl_vertex; } 1. Vertex and Fragment Shaders: Fragment Shader for per Fragment Lghtng varyng vec3 normale; varyng vec4 postone; vod man() { vec3 norm = normale(normale); vec3 lghtv = normale(gl_lghtsource[].poston-postone.xy); vec3 vewv = normale(postone); vec3 halfv = normale(lghtv + vewv); vec4 dffuse = max(, dot(lghtv, vewv)) *gl_frontmateral.dffuse*gl_lghtsource[].dffuse; vec4 ambent = gl_frontmateral.ambent*gl_lghtsource[].ambent; 1. Vertex and Fragment Shaders: Fragment Shader for per Fragment Lghtng nt f; f(dot(lghtv, vewv)>.) f =1.); else f =.; vec3 ular = f*pow(max(, dot(norm, halfv), gl_frontmateral.shnness) *gl_frontmateral.ular*gl_lghtsource[].ular); vec3 color = vec3(ambent + dffuse + ular); gl_fragcolor = vec4(color, 1.); } Lecture 11: Shadows + Reflecton Pont lght / Area lght Three ways of thnkng about shadows The bass for dfferent algorthms. Shadow mappng Be able to descrbe the algorthm Shadow volumes Be able to descrbe the algorthm Stencl buffer, 4-pass algorthm, Z-pass, Z-fal, Creatng quads from the slhouette edges as seen from the lght source, etc Pros and cons of shadow volumes vs shadow maps Planar reflectons how to do. Why not usng envronment mappng? Ways of thnkng about shadows As separate objects (lke Peter Pan's shadow) Ths corresponds to planar shadows As volumes of space that are dark Ths corresponds to shadow volumes As places not seen from a lght source lookng at the scene. Ths corresponds to shadow maps Note that we already "have shadows" for objects facng away from lght Usng the Shadow Map When scene s vewed, check vewed locaton n lght's shadow buffer If pont's depth s (epslon) greater than shadow depth, object s n shadow. shadow depth map For each pxel, compare dstance to lght wth the depth stored n the shadow map 1. Rendera shadow depth map from lght source. 2. Render from eye. For each generated pxel, transform (warp) the x,y,-coordnate to lght space and compare depth wth the stored depth value n the shadow map. If greater pont s n shadow Else pont s n lght Problem: bas / offset neededtomas Akenne-Mőller 22 12

13 Shadow volumes Shadow volume concept Create volumes of space n shadow from each polygon n lght. Each trangle creates 3 projectng quads Usng the Volume To test a pont, count the number of polygons between t and the eye. If we look through more frontfacng than backfacng polygons, then n shadow. backfacng frontfacng How to mplement shadow volumes wth stencl buffer (Z-pass) A four pass process [Hedmann91]: 1st Pass: render the scene wth just ambent lghtng. Turn off updatng Z-buffer and wrtng to color buffer (.e. Z-compare, draw to stencl only). 2nd pass: render front facng shadow volume polygons to stencl buffer, ncrementng count. 3rd pass: render backfacng shadow volume polygons to stencl, decrementng. 4th pass: render dffuse and ular where stencl buffer s. Compared to Z-pass: a=#shadow volumes a pont s located wthn. Invert -test a s ndependent of n whch drecton we count. Choose pont at nfnty. That pont s always Invert stencl nc/dec outsde shadow, due to the capng of the shadow I.e., count to nfnty nstead of from eye. volumes 13

14 Shadow maps vs shadow volumes Shadow Volumes Good: Anythng can shadow anythng, ncludng selfshadowng, and the shadows are sharp. Bad: 3 or 4 passes, shadow polygons must be generated and rendered lots of polygons & fll, Mergng Volumes Edge shared by two polygons facng the lght creates front and backfacng quad. Shadow Maps Good: Anythng to anythng, constant cost regardless of complexty, map can sometmes be reused. Bad: Frustum lmted. Jagged shadows f res too low, basng headaches. Ths nteror edge makes two quads, whch cancel out Slhouette Edges From the lght s vew, caster nteror edges do not contrbute to the shadow volume. Planar reflectons Assume plane s = Then apply glscalef(1,1,-1); Effect: Fndng the slhouette edge gets rd of many useless shadow volume polygons. Planar reflectons Backfacng becomes front facng! Lghts should be reflected as well Need to clp (usng stencl buffer) See example on clppng: Planar reflectons How should you render? 1) the ground plan polygon nto the stencl buffer 2) the scaled (1,1,-1) model, but mask wth stencl buffer Reflect lght pos as well Use front face cullng 3) the ground plane (sem-transparent) 4) the unscaled model 14

15 Lekton 11 Global Illumnaton Global belysnng: Why s not standard ray tracng enough? Lght transport notaton, renderng eq., BRDFs Monte Carlo Ray Tracng Path tracng Photon mappng Ray tracng L L o e f ( x,, ') L ( x, ')( ' n) d' r Global Illumnaton Lekton 12: Pertve correct texturng Taxonomy: Sort frst sort mddle sort last fragment sort last mage Bandwdth Why t s a problem How to solve t Be able to sketch the archtecture of a moder graphcs card Department of Computer Engneerng Applcaton PCI-E x16 Vertex shader Vertex shader Vertex shader Prmtve assembly Geo shader Geo shader Clppng Fragment Generaton Geo shader On NVIDIA 8-seres: Vertex-, Geometryand Fragment shaders allocated from a pool of 128 processors Fragment shader Fragment shader Fragment shader Fragment Merge Fragment Merge Fragment Merge 15

Scan Conversion & Shading

Scan Conversion & Shading 1 3D Renderng Ppelne (for drect llumnaton) 2 Scan Converson & Shadng Adam Fnkelsten Prnceton Unversty C0S 426, Fall 2001 3DPrmtves 3D Modelng Coordnates Modelng Transformaton 3D World Coordnates Lghtng

More information

Scan Conversion & Shading

Scan Conversion & Shading Scan Converson & Shadng Thomas Funkhouser Prnceton Unversty C0S 426, Fall 1999 3D Renderng Ppelne (for drect llumnaton) 3D Prmtves 3D Modelng Coordnates Modelng Transformaton 3D World Coordnates Lghtng

More information

Surface Mapping One. CS7GV3 Real-time Rendering

Surface Mapping One. CS7GV3 Real-time Rendering Surface Mappng One CS7GV3 Real-tme Renderng Textures Add complexty to scenes wthout addtonal geometry Textures store ths nformaton, can be any dmenson Many dfferent types: Dffuse most common Ambent, specular,

More information

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides)

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides) Computer Graphcs Jeng-Sheng Yeh 葉正聖 Mng Chuan Unversty (modfed from Bng-Yu Chen s sldes) llumnaton and Shadng llumnaton Models Shadng Models for Polygons Surface Detal Shadows Transparency Global llumnaton

More information

Color in OpenGL Polygonal Shading Light Source in OpenGL Material Properties Normal Vectors Phong model

Color in OpenGL Polygonal Shading Light Source in OpenGL Material Properties Normal Vectors Phong model Color n OpenGL Polygonal Shadng Lght Source n OpenGL Materal Propertes Normal Vectors Phong model 2 We know how to rasterze - Gven a 3D trangle and a 3D vewpont, we know whch pxels represent the trangle

More information

Some Tutorial about the Project. Computer Graphics

Some Tutorial about the Project. Computer Graphics Some Tutoral about the Project Lecture 6 Rastersaton, Antalasng, Texture Mappng, I have already covered all the topcs needed to fnsh the 1 st practcal Today, I wll brefly explan how to start workng on

More information

Lighting. Dr. Scott Schaefer

Lighting. Dr. Scott Schaefer Lghtng Dr. Scott Schaefer 1 Lghtng/Illumnaton Color s a functon of how lght reflects from surfaces to the eye Global llumnaton accounts for lght from all sources as t s transmtted throughout the envronment

More information

Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

Ulf Assarsson Department of Computer Engineering Chalmers University of Technology Ulf Assarsson Department of Computer Engineering Chalmers University of Technology Lecture 1: Real-time Rendering The Graphics Rendering Pipeline Three conceptual stages of the pipeline: Application (executed

More information

Repetition of TDA361. Ulf Assarsson

Repetition of TDA361. Ulf Assarsson Repetition of TDA361 Ulf Assarsson Misc Eng translation: All your answers on exam must be written in English Till alla lärare på masternivån, Undervisningen på Chalmers masterprogram sker på engelska.

More information

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes SPH3UW Unt 7.3 Sphercal Concave Mrrors Page 1 of 1 Notes Physcs Tool box Concave Mrror If the reflectng surface takes place on the nner surface of the sphercal shape so that the centre of the mrror bulges

More information

Monte Carlo Rendering

Monte Carlo Rendering Monte Carlo Renderng Last Tme? Modern Graphcs Hardware Cg Programmng Language Gouraud Shadng vs. Phong Normal Interpolaton Bump, Dsplacement, & Envronment Mappng Cg Examples G P R T F P D Today Does Ray

More information

Radial Basis Functions

Radial Basis Functions Radal Bass Functons Mesh Reconstructon Input: pont cloud Output: water-tght manfold mesh Explct Connectvty estmaton Implct Sgned dstance functon estmaton Image from: Reconstructon and Representaton of

More information

Computer Animation and Visualisation. Lecture 4. Rigging / Skinning

Computer Animation and Visualisation. Lecture 4. Rigging / Skinning Computer Anmaton and Vsualsaton Lecture 4. Rggng / Sknnng Taku Komura Overvew Sknnng / Rggng Background knowledge Lnear Blendng How to decde weghts? Example-based Method Anatomcal models Sknnng Assume

More information

3D vector computer graphics

3D vector computer graphics 3D vector computer graphcs Paolo Varagnolo: freelance engneer Padova Aprl 2016 Prvate Practce ----------------------------------- 1. Introducton Vector 3D model representaton n computer graphcs requres

More information

Programming in Fortran 90 : 2017/2018

Programming in Fortran 90 : 2017/2018 Programmng n Fortran 90 : 2017/2018 Programmng n Fortran 90 : 2017/2018 Exercse 1 : Evaluaton of functon dependng on nput Wrte a program who evaluate the functon f (x,y) for any two user specfed values

More information

An introduction to Global Illumination. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

An introduction to Global Illumination. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology An introduction to Global Illumination Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Misc Till alla lärare på masternivån, Undervisningen på Chalmers masterprogram

More information

Discussion. History and Outline. Smoothness of Indirect Lighting. Irradiance Caching. Irradiance Calculation. Advanced Computer Graphics (Fall 2009)

Discussion. History and Outline. Smoothness of Indirect Lighting. Irradiance Caching. Irradiance Calculation. Advanced Computer Graphics (Fall 2009) Advanced Computer Graphcs (Fall 2009 CS 29, Renderng Lecture 6: Recent Advances n Monte Carlo Offlne Renderng Rav Ramamoorth http://nst.eecs.berkeley.edu/~cs29-13/fa09 Dscusson Problems dfferent over years.

More information

Computer Graphics. - Spline and Subdivision Surfaces - Hendrik Lensch. Computer Graphics WS07/08 Spline & Subdivision Surfaces

Computer Graphics. - Spline and Subdivision Surfaces - Hendrik Lensch. Computer Graphics WS07/08 Spline & Subdivision Surfaces Computer Graphcs - Splne and Subdvson Surfaces - Hendrk Lensch Overvew Last Tme Image-Based Renderng Today Parametrc Curves Lagrange Interpolaton Hermte Splnes Bezer Splnes DeCasteljau Algorthm Parameterzaton

More information

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

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

More information

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009.

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009. Farrukh Jabeen Algorthms 51 Assgnment #2 Due Date: June 15, 29. Assgnment # 2 Chapter 3 Dscrete Fourer Transforms Implement the FFT for the DFT. Descrbed n sectons 3.1 and 3.2. Delverables: 1. Concse descrpton

More information

2D Raster Graphics. Integer grid Sequential (left-right, top-down) scan. Computer Graphics

2D Raster Graphics. Integer grid Sequential (left-right, top-down) scan. Computer Graphics 2D Graphcs 2D Raster Graphcs Integer grd Sequental (left-rght, top-down scan j Lne drawng A ver mportant operaton used frequentl, block dagrams, bar charts, engneerng drawng, archtecture plans, etc. curves

More information

Discussion. History and Outline. Smoothness of Indirect Lighting. Irradiance Calculation. Irradiance Caching. Advanced Computer Graphics (Fall 2009)

Discussion. History and Outline. Smoothness of Indirect Lighting. Irradiance Calculation. Irradiance Caching. Advanced Computer Graphics (Fall 2009) Advanced Computer Graphcs (Fall 2009 CS 283, Lecture 13: Recent Advances n Monte Carlo Offlne Renderng Rav Ramamoorth http://nst.eecs.berkeley.edu/~cs283/fa10 Dscusson Problems dfferent over years. Intally,

More information

Complex Filtering and Integration via Sampling

Complex Filtering and Integration via Sampling Overvew Complex Flterng and Integraton va Samplng Sgnal processng Sample then flter (remove alases) then resample onunform samplng: jtterng and Posson dsk Statstcs Monte Carlo ntegraton and probablty theory

More information

Lecture 5: Multilayer Perceptrons

Lecture 5: Multilayer Perceptrons Lecture 5: Multlayer Perceptrons Roger Grosse 1 Introducton So far, we ve only talked about lnear models: lnear regresson and lnear bnary classfers. We noted that there are functons that can t be represented

More information

Collision Detection. Overview. Efficient Collision Detection. Collision Detection with Rays: Example. C = nm + (n choose 2)

Collision Detection. Overview. Efficient Collision Detection. Collision Detection with Rays: Example. C = nm + (n choose 2) Overvew Collson detecton wth Rays Collson detecton usng BSP trees Herarchcal Collson Detecton OBB tree, k-dop tree algorthms Multple object CD system Collson Detecton Fundamental to graphcs, VR applcatons

More information

Interactive Rendering of Translucent Objects

Interactive Rendering of Translucent Objects Interactve Renderng of Translucent Objects Hendrk Lensch Mchael Goesele Phlppe Bekaert Jan Kautz Marcus Magnor Jochen Lang Hans-Peter Sedel 2003 Presented By: Mark Rubelmann Outlne Motvaton Background

More information

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe CSCI 104 Sortng Algorthms Mark Redekopp Davd Kempe Algorthm Effcency SORTING 2 Sortng If we have an unordered lst, sequental search becomes our only choce If we wll perform a lot of searches t may be benefcal

More information

Range images. Range image registration. Examples of sampling patterns. Range images and range surfaces

Range images. Range image registration. Examples of sampling patterns. Range images and range surfaces Range mages For many structured lght scanners, the range data forms a hghly regular pattern known as a range mage. he samplng pattern s determned by the specfc scanner. Range mage regstraton 1 Examples

More information

Form-factors Josef Pelikán CGG MFF UK Praha.

Form-factors Josef Pelikán CGG MFF UK Praha. Form-factors 1996-2016 Josef Pelkán CGG MFF UK Praha pepca@cgg.mff.cun.cz http://cgg.mff.cun.cz/~pepca/ FormFactor 2016 Josef Pelkán, http://cgg.mff.cun.cz/~pepca 1 / 23 Form-factor F It ndcates the proporton

More information

Real-time. Shading of Folded Surfaces

Real-time. Shading of Folded Surfaces Rhensche Fredrch-Wlhelms-Unverstät Bonn Insttute of Computer Scence II Computer Graphcs Real-tme Shadng of Folded Surfaces B. Ganster, R. Klen, M. Sattler, R. Sarlette Motvaton http://www www.vrtualtryon.de

More information

Global Illumination: Radiosity

Global Illumination: Radiosity Last Tme? Global Illumnaton: Radosty Planar Shadows Shadow Maps An early applcaton of radatve heat transfer n stables. Projectve Texture Shadows (Texture Mappng) Shadow Volumes (Stencl Buffer) Schedule

More information

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following.

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following. Complex Numbers The last topc n ths secton s not really related to most of what we ve done n ths chapter, although t s somewhat related to the radcals secton as we wll see. We also won t need the materal

More information

Model Clipping Triangle Strips and Quad Meshes.

Model Clipping Triangle Strips and Quad Meshes. Model Clppng Trangle Strps and Quad Meshes. Patrc-Glles Mallot Sun Mcrosystems, Inc. 2550 Garca Avenue, Mountan Vew, CA 94043 Abstract Ths paper descrbes an orgnal software mplementaton of 3D homogeneous

More information

Fast, Arbitrary BRDF Shading for Low-Frequency Lighting Using Spherical Harmonics

Fast, Arbitrary BRDF Shading for Low-Frequency Lighting Using Spherical Harmonics Thrteenth Eurographcs Workshop on Renderng (2002) P. Debevec and S. Gbson (Edtors) Fast, Arbtrary BRDF Shadng for Low-Frequency Lghtng Usng Sphercal Harmoncs Jan Kautz 1, Peter-Pke Sloan 2 and John Snyder

More information

Monte Carlo Integration

Monte Carlo Integration Introducton Monte Carlo Integraton Dgtal Image Synthess Yung-Yu Chuang 11/9/005 The ntegral equatons generally don t have analytc solutons, so we must turn to numercal methods. L ( o p,ωo) = L e ( p,ωo)

More information

TDA361/DIT220 Computer Graphics, January 15 th 2016

TDA361/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 information

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour 6.854 Advanced Algorthms Petar Maymounkov Problem Set 11 (November 23, 2005) Wth: Benjamn Rossman, Oren Wemann, and Pouya Kheradpour Problem 1. We reduce vertex cover to MAX-SAT wth weghts, such that the

More information

CS451Real-time Rendering Pipeline

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

More information

CS221: Algorithms and Data Structures. Priority Queues and Heaps. Alan J. Hu (Borrowing slides from Steve Wolfman)

CS221: Algorithms and Data Structures. Priority Queues and Heaps. Alan J. Hu (Borrowing slides from Steve Wolfman) CS: Algorthms and Data Structures Prorty Queues and Heaps Alan J. Hu (Borrowng sldes from Steve Wolfman) Learnng Goals After ths unt, you should be able to: Provde examples of approprate applcatons for

More information

PBRT core. Announcements. pbrt. pbrt plug-ins

PBRT core. Announcements. pbrt. pbrt plug-ins Announcements PBRT core Dgtal Image Synthess Yung-Yu Chuang 9/27/2007 Please subscrbe the malng lst. Wndows complaton Debuggng n Wndows Doxygen (onlne, download or doxygen by yourself) HW#1 wll be assgned

More information

Wavefront Reconstructor

Wavefront Reconstructor A Dstrbuted Smplex B-Splne Based Wavefront Reconstructor Coen de Vsser and Mchel Verhaegen 14-12-201212 2012 Delft Unversty of Technology Contents Introducton Wavefront reconstructon usng Smplex B-Splnes

More information

Reading. 14. Subdivision curves. Recommended:

Reading. 14. Subdivision curves. Recommended: eadng ecommended: Stollntz, Deose, and Salesn. Wavelets for Computer Graphcs: heory and Applcatons, 996, secton 6.-6., A.5. 4. Subdvson curves Note: there s an error n Stollntz, et al., secton A.5. Equaton

More information

Diffuse and specular interreflections with classical, deterministic ray tracing

Diffuse and specular interreflections with classical, deterministic ray tracing Dffuse and specular nterreflectons wth classcal, determnstc ray tracng Gergely Vass gergely_vass@sggraph.org Dept. of Control Engneerng and Informaton Technology Techncal Unversty of Budapest Budapest,

More information

Slide 1 SPH3UW: OPTICS I. Slide 2. Slide 3. Introduction to Mirrors. Light incident on an object

Slide 1 SPH3UW: OPTICS I. Slide 2. Slide 3. Introduction to Mirrors. Light incident on an object Slde 1 SPH3UW: OPTICS I Introducton to Mrrors Slde 2 Lght ncdent on an object Absorpton Relecton (bounces)** See t Mrrors Reracton (bends) Lenses Oten some o each Everythng true or wavelengths

More information

Sequential search. Building Java Programs Chapter 13. Sequential search. Sequential search

Sequential search. Building Java Programs Chapter 13. Sequential search. Sequential search Sequental search Buldng Java Programs Chapter 13 Searchng and Sortng sequental search: Locates a target value n an array/lst by examnng each element from start to fnsh. How many elements wll t need to

More information

Lecture 1. Application-, geometry-, rasterization stage Real-time Graphics pipeline. Z-buffer Double buffering Screen tearing

Lecture 1. Application-, geometry-, rasterization stage Real-time Graphics pipeline. Z-buffer Double buffering Screen tearing Full-time wrapup Lecture 1 Application-, geometry-, rasterization stage Real-time Graphics pipeline Modelspace, worldspace, viewspace, clip space, screen space Z-buffer Double buffering Screen tearing

More information

Hermite Splines in Lie Groups as Products of Geodesics

Hermite Splines in Lie Groups as Products of Geodesics Hermte Splnes n Le Groups as Products of Geodescs Ethan Eade Updated May 28, 2017 1 Introducton 1.1 Goal Ths document defnes a curve n the Le group G parametrzed by tme and by structural parameters n the

More information

S1 Note. Basis functions.

S1 Note. Basis functions. S1 Note. Bass functons. Contents Types of bass functons...1 The Fourer bass...2 B-splne bass...3 Power and type I error rates wth dfferent numbers of bass functons...4 Table S1. Smulaton results of type

More information

Electrical analysis of light-weight, triangular weave reflector antennas

Electrical analysis of light-weight, triangular weave reflector antennas Electrcal analyss of lght-weght, trangular weave reflector antennas Knud Pontoppdan TICRA Laederstraede 34 DK-121 Copenhagen K Denmark Emal: kp@tcra.com INTRODUCTION The new lght-weght reflector antenna

More information

X-Ray Rendering. Other Rendering Techniques: Points, Splats, Shear-Warp. X-Ray Point Splatting. X-Ray Rendering. CSE 564: Visualization

X-Ray Rendering. Other Rendering Techniques: Points, Splats, Shear-Warp. X-Ray Point Splatting. X-Ray Rendering. CSE 564: Visualization X-Ray Renderng CSE 564: Vsualzaton Other Renderng Technques: Ponts, Splats, Shear-Warp Estmate ray ntegral va dscrete raycastng: mage plane nterpolaton kernel h pxel p Klaus Mueller pont v Complete dscrete

More information

Array transposition in CUDA shared memory

Array transposition in CUDA shared memory Array transposton n CUDA shared memory Mke Gles February 19, 2014 Abstract Ths short note s nspred by some code wrtten by Jeremy Appleyard for the transposton of data through shared memory. I had some

More information

Cache Performance 3/28/17. Agenda. Cache Abstraction and Metrics. Direct-Mapped Cache: Placement and Access

Cache Performance 3/28/17. Agenda. Cache Abstraction and Metrics. Direct-Mapped Cache: Placement and Access Agenda Cache Performance Samra Khan March 28, 217 Revew from last lecture Cache access Assocatvty Replacement Cache Performance Cache Abstracton and Metrcs Address Tag Store (s the address n the cache?

More information

Type-2 Fuzzy Non-uniform Rational B-spline Model with Type-2 Fuzzy Data

Type-2 Fuzzy Non-uniform Rational B-spline Model with Type-2 Fuzzy Data Malaysan Journal of Mathematcal Scences 11(S) Aprl : 35 46 (2017) Specal Issue: The 2nd Internatonal Conference and Workshop on Mathematcal Analyss (ICWOMA 2016) MALAYSIAN JOURNAL OF MATHEMATICAL SCIENCES

More information

The Traditional Graphics Pipeline

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

More information

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

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

More information

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

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

More information

Today s Outline. Sorting: The Big Picture. Why Sort? Selection Sort: Idea. Insertion Sort: Idea. Sorting Chapter 7 in Weiss.

Today s Outline. Sorting: The Big Picture. Why Sort? Selection Sort: Idea. Insertion Sort: Idea. Sorting Chapter 7 in Weiss. Today s Outlne Sortng Chapter 7 n Wess CSE 26 Data Structures Ruth Anderson Announcements Wrtten Homework #6 due Frday 2/26 at the begnnng of lecture Proect Code due Mon March 1 by 11pm Today s Topcs:

More information

Plane Sampling for Light Paths from the Environment Map

Plane Sampling for Light Paths from the Environment Map jgt 2009/5/27 16:42 page 1 #1 Vol. [VOL], No. [ISS]: 1 6 Plane Samplng for Lght Paths from the Envronment Map Holger Dammertz and Johannes Hanka Ulm Unversty Abstract. We present a method to start lght

More information

Barycentric Coordinates. From: Mean Value Coordinates for Closed Triangular Meshes by Ju et al.

Barycentric Coordinates. From: Mean Value Coordinates for Closed Triangular Meshes by Ju et al. Barycentrc Coordnates From: Mean Value Coordnates for Closed Trangular Meshes by Ju et al. Motvaton Data nterpolaton from the vertces of a boundary polygon to ts nteror Boundary value problems Shadng Space

More information

The Traditional Graphics Pipeline

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

More information

Support Vector Machines

Support Vector Machines /9/207 MIST.6060 Busness Intellgence and Data Mnng What are Support Vector Machnes? Support Vector Machnes Support Vector Machnes (SVMs) are supervsed learnng technques that analyze data and recognze patterns.

More information

PHYS 219 Spring semester Lecture 20: Reflection of Electromagnetic Radiation: Mirrors and Images Formed by Mirrors

PHYS 219 Spring semester Lecture 20: Reflection of Electromagnetic Radiation: Mirrors and Images Formed by Mirrors PHYS 219 Sprng semester 2014 Lecture 20: eflecton of Electromagnetc adaton: Mrrors and Images Formed by Mrrors on efenberger Brck Nanotechnology Center Purdue Unversty Lecture 20 1 evew: Snapshot of an

More information

ELEC 377 Operating Systems. Week 6 Class 3

ELEC 377 Operating Systems. Week 6 Class 3 ELEC 377 Operatng Systems Week 6 Class 3 Last Class Memory Management Memory Pagng Pagng Structure ELEC 377 Operatng Systems Today Pagng Szes Vrtual Memory Concept Demand Pagng ELEC 377 Operatng Systems

More information

A Binarization Algorithm specialized on Document Images and Photos

A Binarization Algorithm specialized on Document Images and Photos A Bnarzaton Algorthm specalzed on Document mages and Photos Ergna Kavalleratou Dept. of nformaton and Communcaton Systems Engneerng Unversty of the Aegean kavalleratou@aegean.gr Abstract n ths paper, a

More information

Accounting for the Use of Different Length Scale Factors in x, y and z Directions

Accounting for the Use of Different Length Scale Factors in x, y and z Directions 1 Accountng for the Use of Dfferent Length Scale Factors n x, y and z Drectons Taha Soch (taha.soch@kcl.ac.uk) Imagng Scences & Bomedcal Engneerng, Kng s College London, The Rayne Insttute, St Thomas Hosptal,

More information

Global Illumination and Radiosity

Global Illumination and Radiosity Global Illumnaton and Radosty CS535 Danel G. Alaga Department of Computer Scence Purdue Unversty Recall: Lghtng and Shadng Lght sources Pont lght Models an omndrectonal lght source (e.g., a bulb) Drectonal

More information

Monte Carlo 1: Integration

Monte Carlo 1: Integration Monte Carlo : Integraton Prevous lecture: Analytcal llumnaton formula Ths lecture: Monte Carlo Integraton Revew random varables and probablty Samplng from dstrbutons Samplng from shapes Numercal calculaton

More information

Topic 13: Radiometry. The Basic Light Transport Path

Topic 13: Radiometry. The Basic Light Transport Path Topc 3: Raometry The bg pcture Measurng lght comng from a lght source Measurng lght fallng onto a patch: Irraance Measurng lght leavng a patch: Raance The Lght Transport Cycle The BrecAonal Reflectance

More information

CS 534: Computer Vision Model Fitting

CS 534: Computer Vision Model Fitting CS 534: Computer Vson Model Fttng Sprng 004 Ahmed Elgammal Dept of Computer Scence CS 534 Model Fttng - 1 Outlnes Model fttng s mportant Least-squares fttng Maxmum lkelhood estmaton MAP estmaton Robust

More information

Dynamic wetting property investigation of AFM tips in micro/nanoscale

Dynamic wetting property investigation of AFM tips in micro/nanoscale Dynamc wettng property nvestgaton of AFM tps n mcro/nanoscale The wettng propertes of AFM probe tps are of concern n AFM tp related force measurement, fabrcaton, and manpulaton technques, such as dp-pen

More information

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

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

More information

Today s class. Simple shadows Shading Lighting in OpenGL. Informationsteknologi. Wednesday, November 21, 2007 Computer Graphics - Class 10 1

Today s class. Simple shadows Shading Lighting in OpenGL. Informationsteknologi. Wednesday, November 21, 2007 Computer Graphics - Class 10 1 Today s class Simple shadows Shading Lighting in OpenGL Wednesday, November 21, 27 Computer Graphics - Class 1 1 Simple shadows Simple shadows can be gotten by using projection matrices Consider a light

More information

Machine Learning: Algorithms and Applications

Machine Learning: Algorithms and Applications 14/05/1 Machne Learnng: Algorthms and Applcatons Florano Zn Free Unversty of Bozen-Bolzano Faculty of Computer Scence Academc Year 011-01 Lecture 10: 14 May 01 Unsupervsed Learnng cont Sldes courtesy of

More information

High level vs Low Level. What is a Computer Program? What does gcc do for you? Program = Instructions + Data. Basic Computer Organization

High level vs Low Level. What is a Computer Program? What does gcc do for you? Program = Instructions + Data. Basic Computer Organization What s a Computer Program? Descrpton of algorthms and data structures to acheve a specfc ojectve Could e done n any language, even a natural language lke Englsh Programmng language: A Standard notaton

More information

Shape Representation Robust to the Sketching Order Using Distance Map and Direction Histogram

Shape Representation Robust to the Sketching Order Using Distance Map and Direction Histogram Shape Representaton Robust to the Sketchng Order Usng Dstance Map and Drecton Hstogram Department of Computer Scence Yonse Unversty Kwon Yun CONTENTS Revew Topc Proposed Method System Overvew Sketch Normalzaton

More information

Problem Set 3 Solutions

Problem Set 3 Solutions Introducton to Algorthms October 4, 2002 Massachusetts Insttute of Technology 6046J/18410J Professors Erk Demane and Shaf Goldwasser Handout 14 Problem Set 3 Solutons (Exercses were not to be turned n,

More information

Image Representation & Visualization Basic Imaging Algorithms Shape Representation and Analysis. outline

Image Representation & Visualization Basic Imaging Algorithms Shape Representation and Analysis. outline mage Vsualzaton mage Vsualzaton mage Representaton & Vsualzaton Basc magng Algorthms Shape Representaton and Analyss outlne mage Representaton & Vsualzaton Basc magng Algorthms Shape Representaton and

More information

CMPS 10 Introduction to Computer Science Lecture Notes

CMPS 10 Introduction to Computer Science Lecture Notes CPS 0 Introducton to Computer Scence Lecture Notes Chapter : Algorthm Desgn How should we present algorthms? Natural languages lke Englsh, Spansh, or French whch are rch n nterpretaton and meanng are not

More information

Shading. Slides by Ulf Assarsson and Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Shading. Slides by Ulf Assarsson and Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Shading Slides by Ulf Assarsson and Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Overview of today s lecture l A simple most basic real-time lighting model

More information

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms Course Introducton Course Topcs Exams, abs, Proects A quc loo at a few algorthms 1 Advanced Data Structures and Algorthms Descrpton: We are gong to dscuss algorthm complexty analyss, algorthm desgn technques

More information

y and the total sum of

y and the total sum of Lnear regresson Testng for non-lnearty In analytcal chemstry, lnear regresson s commonly used n the constructon of calbraton functons requred for analytcal technques such as gas chromatography, atomc absorpton

More information

REFRACTION. a. To study the refraction of light from plane surfaces. b. To determine the index of refraction for Acrylic and Water.

REFRACTION. a. To study the refraction of light from plane surfaces. b. To determine the index of refraction for Acrylic and Water. Purpose Theory REFRACTION a. To study the refracton of lght from plane surfaces. b. To determne the ndex of refracton for Acrylc and Water. When a ray of lght passes from one medum nto another one of dfferent

More information

Shadow Rendering EDA101 Advanced Shading and Rendering

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

More information

A Fast Visual Tracking Algorithm Based on Circle Pixels Matching

A Fast Visual Tracking Algorithm Based on Circle Pixels Matching A Fast Vsual Trackng Algorthm Based on Crcle Pxels Matchng Zhqang Hou hou_zhq@sohu.com Chongzhao Han czhan@mal.xjtu.edu.cn Ln Zheng Abstract: A fast vsual trackng algorthm based on crcle pxels matchng

More information

Brave New World Pseudocode Reference

Brave New World Pseudocode Reference Brave New World Pseudocode Reference Pseudocode s a way to descrbe how to accomplsh tasks usng basc steps lke those a computer mght perform. In ths week s lab, you'll see how a form of pseudocode can be

More information

The Traditional Graphics Pipeline

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

More information

Shading. Slides by Ulf Assarsson and Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Shading. Slides by Ulf Assarsson and Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Shading Slides by Ulf Assarsson and Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Overview of today s lecture l A simple most basic real-time lighting model

More information

Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology A tool needed for the graphics people all the time Very important components: Need to make them fast! Finding if

More information

TN348: Openlab Module - Colocalization

TN348: Openlab Module - Colocalization TN348: Openlab Module - Colocalzaton Topc The Colocalzaton module provdes the faclty to vsualze and quantfy colocalzaton between pars of mages. The Colocalzaton wndow contans a prevew of the two mages

More information

K-means and Hierarchical Clustering

K-means and Hierarchical Clustering Note to other teachers and users of these sldes. Andrew would be delghted f you found ths source materal useful n gvng your own lectures. Feel free to use these sldes verbatm, or to modfy them to ft your

More information

Accelerating X-Ray data collection using Pyramid Beam ray casting geometries

Accelerating X-Ray data collection using Pyramid Beam ray casting geometries Acceleratng X-Ray data collecton usng Pyramd Beam ray castng geometres Amr Averbuch Guy Lfchtz Y. Shkolnsky 3 School of Computer Scence Department of Appled Mathematcs, School of Mathematcal Scences Tel

More information

Chapter 4. Non-Uniform Offsetting and Hollowing by Using Biarcs Fitting for Rapid Prototyping Processes

Chapter 4. Non-Uniform Offsetting and Hollowing by Using Biarcs Fitting for Rapid Prototyping Processes Chapter 4 Non-Unform Offsettng and Hollowng by Usng Barcs Fttng for Rapd Prototypng Processes Ths chapter presents a new method of Non-Unform offsettng and usng barc fttngs to hollow out sold objects or

More information

Realistic and Detail Rendering of Village Virtual Scene Based on Pixel Offset

Realistic and Detail Rendering of Village Virtual Scene Based on Pixel Offset Appl. Math. Inf. Sc. 6-3S, 769-775 (2012) 769 Realstc and Detal Renderng of llage rtual Scene Based on Pxel Offset Chunjang Zhao, Huaru Wu and Ronghua Gao Natonal Engneerng Research Center for Informaton

More information

Global Illumination and Radiosity

Global Illumination and Radiosity Global Illumnaton and Radosty CS535 Danel G. Alaga Department of Computer Scence Purdue Unversty Recall: Lghtng and Shadng Lght sources Pont lght Models an omndrectonal lght source (e.g., a bulb) Drectonal

More information

High-Boost Mesh Filtering for 3-D Shape Enhancement

High-Boost Mesh Filtering for 3-D Shape Enhancement Hgh-Boost Mesh Flterng for 3-D Shape Enhancement Hrokazu Yagou Λ Alexander Belyaev y Damng We z Λ y z ; ; Shape Modelng Laboratory, Unversty of Azu, Azu-Wakamatsu 965-8580 Japan y Computer Graphcs Group,

More information

Sorting Review. Sorting. Comparison Sorting. CSE 680 Prof. Roger Crawfis. Assumptions

Sorting Review. Sorting. Comparison Sorting. CSE 680 Prof. Roger Crawfis. Assumptions Sortng Revew Introducton to Algorthms Qucksort CSE 680 Prof. Roger Crawfs Inserton Sort T(n) = Θ(n 2 ) In-place Merge Sort T(n) = Θ(n lg(n)) Not n-place Selecton Sort (from homework) T(n) = Θ(n 2 ) In-place

More information

An Optimal Algorithm for Prufer Codes *

An Optimal Algorithm for Prufer Codes * J. Software Engneerng & Applcatons, 2009, 2: 111-115 do:10.4236/jsea.2009.22016 Publshed Onlne July 2009 (www.scrp.org/journal/jsea) An Optmal Algorthm for Prufer Codes * Xaodong Wang 1, 2, Le Wang 3,

More information

CS1100 Introduction to Programming

CS1100 Introduction to Programming Factoral (n) Recursve Program fact(n) = n*fact(n-) CS00 Introducton to Programmng Recurson and Sortng Madhu Mutyam Department of Computer Scence and Engneerng Indan Insttute of Technology Madras nt fact

More information

Model-Based Bundle Adjustment to Face Modeling

Model-Based Bundle Adjustment to Face Modeling Model-Based Bundle Adjustment to Face Modelng Oscar K. Au Ivor W. sang Shrley Y. Wong oscarau@cs.ust.hk vor@cs.ust.hk shrleyw@cs.ust.hk he Hong Kong Unversty of Scence and echnology Realstc facal synthess

More information

2x x l. Module 3: Element Properties Lecture 4: Lagrange and Serendipity Elements

2x x l. Module 3: Element Properties Lecture 4: Lagrange and Serendipity Elements Module 3: Element Propertes Lecture : Lagrange and Serendpty Elements 5 In last lecture note, the nterpolaton functons are derved on the bass of assumed polynomal from Pascal s trangle for the fled varable.

More information