130 likes | 181 Views
Learn about implementing the Graphics Pipeline, a sequence of operations transforming data into visuals like charts, graphs, images, and real-time animation. Explore key stages like Clipper, Rasterizer, Fragment Processor, and more. Understand the technology behind texture mapping and bump mapping. The implementation can be done in software or via a graphics processing unit (GPU) like nVidia GeForce.
E N D
Graphics Pipeline Bringing it all together
Implementation • The goal of computer graphics is to take the data out of computer memory and put it up on the display in a suitable manner • Charts • Graphs • Still images • Video • Real-time animation
Implementation • The method of implementation is the Graphics Pipeline • A sequence of operations that perform stepwise transformations of the data Clipper & Primitive Assembler Vertex Processor Rasterizer Fragment Processor Display Vertex List
Vertex List • This is the internal (memory) representation of the scene • The list represents a set of objects by their vertices and other attributes (color, texture, material, etc.) • It comes from • A scene graph created by a modeler • Data generated by a program • Wherever • You’ve seen this in your programs • I gave you a number of model files
Vertex Processor • Two primary functions: • Transform object coordinates from model coordinate system to the scene (camera) coordinate system • Set the object’s color • Per object shading • Per triangle (polygon) shading • Per vertex shading • Note that the actual shading may not be done until rasterization
Vertex Processor Triangles (polygons) transformed from model coordinates Surface normals Per Vertex shading Per Triangle shading
Clipper & Primitive Assembler • Removal of objects that are out of the field of view • Things that can’t be seen by the “camera” • Some objects are only partially out of the scene and therefore must have their primitives (triangles, polygons) truncated at viewing boundaries
Clipper & Primitive Assembler • The view frustum
Rasterizer • Convert the object primitives (triangles, polygons) to pixels suitable for placement on the display • Scan conversion of lines – Bresenham • Scan conversion of curves – Hermite/Bezier • Scan conversion of triangles (Gouraud, Phong shading) • Utilizes the frame buffer (we used a Java BufferedImage object)
Fragment Processor • Place the rasterized pixels in the frame buffer • Alpha blending for opaque/transparent objects • Hidden surface removal for object occlusion (by self and other objects) • Texture mapping (attach pictures to objects) • Bump mapping (rough up the surface of an object by manipulating its surface normals • Note that this updates the pixels previously placed in the frame buffer
Fragment Processor Texture mapping Bump mapping
Technology • The graphics pipeline is implemented in software or in hardware via a graphics processing unit (GPU) nVidia GeForce 6