CS 148: Summer 2016 Introduction of Graphics and Imaging Zahid Hossain
Basics of 3D Rendering
http://www.pling.org.uk/cs/cgv.html
Basics of 3D Rendering CS 148: Summer 2016 Introduction of Graphics - - PowerPoint PPT Presentation
Basics of 3D Rendering CS 148: Summer 2016 Introduction of Graphics and Imaging Zahid Hossain http://www.pling.org.uk/cs/cgv.html What We Have So Far 3D geometry 2D pipeline CS 148: Introduction to Computer Graphics and Imaging (Summer 2016)
CS 148: Summer 2016 Introduction of Graphics and Imaging Zahid Hossain
http://www.pling.org.uk/cs/cgv.html
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 2
Matrices preserve flat geometry
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 3
Matrices preserve flat geometry
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 4
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 5
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 6
http://drawntothis.com/wp-content/uploads/2010/09/Random_Guy.jpg
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 7
http://drawntothis.com/wp-content/uploads/2010/09/Random_Guy.jpg
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 8
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 9
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 10
Tearing : Data from multiple frames appear on the screen at the same time. This happens when GPU rendering rate and monitor refresh rate are not synced.
http://www.newcluster.com/wp-content/uploads/2015/01/g-sync_diagram_0.jpgitokgxy9kpos
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 11
Back Buffer Front Buffer (video memory) Front Buffer SwapBuffer: Either copy Back Buffer to Front Buffer,
Vertical Retraces
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 12
Back Buffer Front Buffer (video memory) Front Buffer SwapBuffer: Either copy Back Buffer to Front Buffer,
Vertical Retraces
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 13
Front Buffer Front Buffer (Video Memory) Back Buffer 2 Vertical Retraces Back Buffer 1
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 14
Front Buffer Front Buffer (Video Memory) Back Buffer 2 Vertical Retraces Back Buffer 1
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 15
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 16
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 17
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 18
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 19
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 20
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 21
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 22
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 23
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 24
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 25
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 26
Color Buffer (RGB each cell) Depth buffer (one number each cell)
http://upload.wikimedia.org/wikipedia/commons/4/4e/Z_buffer.svg
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 27
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 28
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 29
Depth
http://ps-2.kev009.com/CATIA-B18/basug_C2/basugbt1510.htm
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 30
http://ps-2.kev009.com/CATIA-B18/basug_C2/basugbt1510.htm
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 31
Hack: Scale and add offset “glPolygonOffset”
To identify and throw away invisible geometry to save processing time.
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 32
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 33
http://medialab.di.unipi.it/web/IUM/Waterloo/node70.html
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 34
glFrontFace(GL_CCW)
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 35
http://i.minus.com/i75qjiyFQzVCI.jpg
Potential strategies:
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 36
http://www.aaid.ca/flash/media/hkmh/images/floor1/000a-geology-portal-cg-rendering.jpg CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 37
http://www.cs.virginia.edu/~luebke/publications/portals.html
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 38
http://www.cs.virginia.edu/~luebke/publications/portals.html
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 39
http://www.cs.virginia.edu/~luebke/publications/portals.html
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 40
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 41
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 42
viewing volume
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 43
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 44
Letters correspond to planes (A)
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 45
Letters correspond to planes (A,B)
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 46
Letters correspond to planes (A,B,C,D)
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 47
subboxes by 3 midplanes
threshold or maximum depth has reached.
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 48
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 49
threshold
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 50
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 51
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 52
http://mamassian.free.fr/papers/mamassian_tics98.pdf
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 53
http://ivl.calit2.net/wiki/images/5/55/17_ShadowMappingS15.pdf
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 54
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 55
the light source.
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 56
Light’s POV depth map
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 57
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 58
Final texture coordinates after perspective-correct interpolation of
Compare this with depth
coordinate) to the depth stored in texture
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 59
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 60
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 61
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 62
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 63
a.k.a Deferred Shading
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 64
have figured out all the pixels that end up on the screen
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 65 http://learnopengl.com/#!Advanced-Lighting/Deferred-Shading
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 66
Two Pass
http://learnopengl.com/#!Advanced-Lighting/Deferred-Shading
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 67
Two Pass
http://learnopengl.com/#!Advanced-Lighting/Deferred-Shading
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 68 http://learnopengl.com/#!Advanced-Lighting/Deferred-Shading
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 69 http://learnopengl.com/#!Advanced-Lighting/Deferred-Shading
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 70 http://learnopengl.com/#!Advanced-Lighting/Deferred-Shading
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 71 http://learnopengl.com/#!Advanced-Lighting/Deferred-Shading
Aliasing)
Rendering
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 72 http://learnopengl.com/#!Advanced-Lighting/Deferred-Shading
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 73
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 74
http://artist- 3d.com/free_3d_models/uploads/mantalray.jpg
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 75
http://www.archicadwiki.com/Bugs/TransparencyIn3dWindow
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 76
http://www.seemsartless.com/guides/camera-dof-cars-fast-360.jpg
CS 148: Summer 2016 Introduction of Graphics and Imaging Zahid Hossain
http://www.pling.org.uk/cs/cgv.html