Pipeline graphic powerpoint

graphics rendering pipeline ppt and computer graphics pipeline ppt
Dr.ShaneMatts Profile Pic
Dr.ShaneMatts,United States,Teacher
Published Date:23-07-2017
Your Website URL(Optional)
Comment
Graphics Pipeline & Rasterization II Image removed due to copyright restrictions. MIT EECS 6.837 Computer Graphics Wojciech Matusik 1 Modern Graphics Pipeline • Project vertices to 2D (image) © source unknown. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. • Rasterize triangle: find which pixels should be lit • Compute per-pixel color © Khronos Group. All rights reserved. This content is • Test visibility (Z-buffer), excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. update frame buffer color 2 Modern Graphics Pipeline • Project vertices to 2D © source unknown. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. (image) • Rasterize triangle: find which pixels should be lit – For each pixel, test 3 edge equations • if all pass, draw pixel • Compute per-pixel color © Khronos Group. All rights reserved. This content is excluded from our Creative Commons license. For more • Test visibility (Z-buffer), information, see http://ocw.mit.edu/help/faq-fair-use/. update frame buffer color 3 Modern Graphics Pipeline • Perform projection of vertices © source unknown. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. • Rasterize triangle: find which pixels should be lit • Compute per-pixel color • Test visibility, update frame buffer color – Store minimum distance to camera © Khronos Group. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. for each pixel in “Z-buffer” • same as t in ray casting min – if new_z zbufferx,y zbufferx,y=new_z framebufferx,y=new_color frame buffer Z buffer 4 Modern Graphics Pipeline For each triangle transform into eye space © source unknown. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. (perform projection) setup 3 edge equations for each pixel x,y if passes all edge equations compute z if zzbufferx,y zbufferx,y=z framebufferx,y=shade() © Khronos Group. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. 5 Modern Graphics Pipeline For each triangle transform into eye space © source unknown. All rights reserved. This content is (perform projection) excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. setup 3 edge equations for each pixel x,y if passes all edge equations compute z if zzbufferx,y zbufferx,y=z framebufferx,y=shade() © Khronos Group. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. Questions? 6 Interpolation in Screen Space • How do we get that Z value for each pixel? – We only know z at the vertices... – (Remember, screen-space z is actually z’/w’) – Must interpolate from vertices into triangle interior For each triangle for each pixel (x,y) if passes all edge equations compute z if zzbufferx,y zbufferx,y=z framebufferx,y=shade() 7 Interpolation in Screen Space • Also need to interpolate color, normals, texture coordinates, etc. between vertices ‒ We did this with barycentrics in ray casting • Linear interpolation in object space ‒ Is this the same as linear interpolation on the screen? 8 Interpolation in Screen Space Two regions of same size in world space 9 Interpolation in Screen Space The farther region shrinks to a smaller area of the screen Two regions of same size in world space 10 Nope, Not the Same • Linear variation in world space does not yield linear variation in screen space due to projection – Think of looking at a checkerboard at a steep angle; all squares are the same size on the plane, but not on screen This image is in the public domain. Source: Wikipedia. Head-on view linear screen-space Perspective-correct (“Gouraud”) interpolation Interpolation BAD 11 Back to the basics: Barycentrics • Barycentric coordinates for a triangle (a, b, c) – Remember, • Barycentrics are very general: – Work for x, y, z, u, v, r, g, b – Anything that varies linearly in object space – including z 12 Basic strategy • Given screen-space x’, y’ • Compute barycentric coordinates • Interpolate anything specified at the three vertices 13 Basic strategy • How to make it work – start by computing x’, y’ given barycentrics – invert • Later: shortcut barycentrics, directly build interpolants 14 From barycentric to screen-space • Barycentric coordinates for a triangle (a, b, c) – Remember, • Let’s project point P by projection matrix C a’, b’, c’ are the projected homogeneous vertices before division by w 15 Projection • Let’s use simple formulation of projection going from 3D homogeneous coordinates to 2D homogeneous coordinates • No crazy near-far or storage of 1/z • We use ’ for screen space coordinates 16 From barycentric to screen-space a’, b’, c’ are the • From previous slides: projected homogeneous vertices • Seems to suggest it’s linear in screen space. But it’s homogenous coordinates 17 From barycentric to screen-space a’, b’, c’ are the • From previous slides: projected homogeneous vertices • Seems to suggest it’s linear in screen space. But it’s homogenous coordinates • After division by w, the (x,y) screen coordinates are 18 Recap: barycentric to screen-space 19 From screen-space to barycentric • It’s a projective mapping from the barycentrics onto screen coordinates – Represented by a 3x3 matrix • We’ll take the inverse mapping to get from (x, y, 1) to the barycentrics 20

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.