cse 5542 - real time rendering week 2. graphics processing 2
TRANSCRIPT
![Page 1: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/1.jpg)
CSE 5542 - Real Time Rendering
Week 2
![Page 2: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/2.jpg)
Graphics Processing
2
![Page 3: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/3.jpg)
Physical Approaches
3
![Page 4: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/4.jpg)
Projection-Based
4
![Page 5: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/5.jpg)
Projection3D objects -> 2D image
– Perspective– Parallel/Orthographic
5
![Page 6: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/6.jpg)
The Hardware
6
![Page 7: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/7.jpg)
More 2 come …
![Page 8: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/8.jpg)
The API/System
8
![Page 9: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/9.jpg)
The Graphics Pipeline
9
![Page 10: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/10.jpg)
Object & Primitive & Vertex
10
http://www.3dcadbrowser.com/download.aspx?3dmodel=27814
![Page 11: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/11.jpg)
Object & Triangles & Vertices
http://www.mathworks.com/matlabcentral/fileexchange/37004-uniform-sampling-of-a-sphere
![Page 12: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/12.jpg)
Primitives
12
![Page 13: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/13.jpg)
Example (old style)
glBegin(GL_POLYGON)glVertex3f(0.0, 0.0, 0.0);glVertex3f(0.0, 1.0, 0.0);glVertex3f(0.0, 0.0, 1.0);
glEnd( );
13
type of object
location of vertex
end of object definition
![Page 14: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/14.jpg)
Example (GPU based)
• Put geometric data in an array
• Send array to GPU• Tell GPU to render as triangle
14
vec3 points[3];points[0] = vec3(0.0, 0.0, 0.0);points[1] = vec3(0.0, 1.0, 0.0);points[2] = vec3(0.0, 0.0, 1.0);
![Page 15: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/15.jpg)
Camera Specification• Six degrees of freedom
– Position of center of lens– Orientation
• Lens• Film size• Orientation of film plane
15
![Page 16: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/16.jpg)
Materials
Optical properties– Absorption: color properties– Scattering
• Diffuse• Specular
16
![Page 17: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/17.jpg)
LightsTypes
– Point sources vs distributed sources– Spot lights– Near and far sources– Color properties
17
![Page 18: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/18.jpg)
Vertex Processing
Polygon Soup
![Page 19: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/19.jpg)
Vertex Processing• Define object representations from one
coordinate system to another– Object coordinates– World Coordinates– Camera (eye) coordinates– Screen coordinates
• Enter Linear algebra – Transformations• Material properties
19
![Page 20: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/20.jpg)
World
![Page 21: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/21.jpg)
Primitive AssemblyVertices collected into geometric objects
– Line segments– Polygons– Curves and surfaces
21
![Page 22: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/22.jpg)
Clipping
![Page 23: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/23.jpg)
Rasterization• Output are fragments• Fragments == potential pixels
– Location in frame buffer– Color and depth attributes– Hidden surface removal ?
• Vertex attributes are interpolated over objects
23
![Page 24: CSE 5542 - Real Time Rendering Week 2. Graphics Processing 2](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef25503460f94c0410a/html5/thumbnails/24.jpg)
Fragment Processing
24