Download Graphics Pipeline - Lecture Notes | CS 418 and more Study notes Computer Graphics in PDF only on Docsity!
The Graphics Pipeline
Conceptual framework for rendering
- discussed algorithms for stages• data flows through a series of stages• starting with scene description• ending up as image on monitor
Also an abstract hardware description
- most hardware systems follow it
OpenGL designed around this model
- even formulates “OpenGL machine”
Scene Database
Culling Lighting
View Transform
Clipping
Map to Viewport
Rasterization
Video Out
Data
A More Concrete Data Flow Diagram
Pipelined Graphics Architecture Designed with a particular kind of rendering in mind
- (antialiased) opaque polygons with textures• local illumination model only — no global illumination• simple per-pixel operations
- blending, fog, depth test, stencil test
Graphics system is a parallelized pipeline
- various stages of processing are performed in a pipeline
- each stage operates independently of the others– example: one triangle can be transformed as another is lit
- individual stages can employ parallel functional units• buses of various types connect sequential pipeline stages
Key to Performance: Parallelism Pipeline exploits algorithmic parallelism
- individual stages can be performed separately
Also want to exploit spatial parallelism
- resulting color of pixel is independent of neighboring pixels• so we can operate on pixels in parallel
These “facts” are highly dependent on choice of algorithm
- for our specific rendering algorithm, they’re essentially true• and this is no accident — that’s why we use this method• situation is different for other algorithms (e.g., ray tracing)
The Command Processor CPU delivers commands on system bus to the command processor
- these are roughly equivalent to OpenGL function calls• recall that OpenGL is a state machine• on RealityEngine, this is where much of the state resides
Takes care of shipping primitives to geometry engines
- which is where most of the actual processing will begin
CommandProcessor
System bus
Geometry Engines Most of the world space phases of the pipeline occur here
- general polygons are converted into simple triangles• triangles are transformed, lit, and clipped• following hardware components handle screen space operations
In lower-end systems, some of this is still done on host CPU
- most commonly transformation• possibly further operations as well
CommandProcessor
GeometryEngines
Things to Note About RealityEngine High degree of parallelism
- 12 Geometry Engines• 20 Fragment Generators• 320 Image Engines
High-capacity crossbar interconnects
- broadcast of data from one stage to the next• in particular, there’s a lot of traffic on the triangle bus
- switches from per-object to per-pixel parallelism
Careful design is necessary to achieve good performance
- bus capacities (esp. triangle bus)• subdivision of parallel work (tiling fragment & image engines)
Alternative Hardware Architectures Parallel per-pixel processors
- provide fully programmable CPUs for each pixel• great for implementing shaders and such• not very common
Ray casting/tracing in hardware
- actually used for rendering of voxel grids
- Mitsubishi VolumePro (http://www.rtviz.com)
Image-based rendering
- Microsoft explored this with the Talisman architecture
- which is now defunct (as far as we know)
- general idea: reuse rendered pixels whenever possible
- cache images when rendering geometry– apply warping operations to simulate transformations
Next Time: Nonphotorealistic Rendering Photorealism is the traditional goal of computer graphics
- try to reproduce reality• essentially, synthesize “photographs” of virtual scenes
But what if we don’t want things to look completely realistic?
- cartoons• impressionist paintings• pen & ink sketches• watercolors