CSC 461: Lecture 3 CSC 461: Lecture 3 1 CSC461 Lecture 3: CSC461 Lecture 3: Models and Architectures Models and Architectures Objectives Objectives – Learn the basic design of a Learn the basic design of a graphics system graphics system – Introduce pipeline architecture Introduce pipeline architecture – Examine software components for an Examine software components for an interactive graphics system interactive graphics system
16
Embed
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CSC 461: Lecture 3CSC 461: Lecture 3 11
CSC461 Lecture 3: CSC461 Lecture 3: Models and ArchitecturesModels and Architectures
ObjectivesObjectives
– Learn the basic design of a graphics systemLearn the basic design of a graphics system– Introduce pipeline architectureIntroduce pipeline architecture– Examine software components for an Examine software components for an
interactive graphics systeminteractive graphics system
Can we mimic the synthetic camera model Can we mimic the synthetic camera model to design graphics hardware software?to design graphics hardware software?
Application Programmer Interface (API)Application Programmer Interface (API)–Need only specify Need only specify
But how is the API implemented?But how is the API implemented?
CSC 461: Lecture 3CSC 461: Lecture 3 33
Physical ApproachesPhysical ApproachesRay tracingRay tracing: follow rays of light from center : follow rays of light from center of projection until they either are absorbed of projection until they either are absorbed by objects or go off to infinityby objects or go off to infinity–Can handle global effectsCan handle global effects
Every change of coordinates is equivalent to a Every change of coordinates is equivalent to a matrix transformation matrix transformation
Vertex processor also computes vertex colorsVertex processor also computes vertex colors
CSC 461: Lecture 3CSC 461: Lecture 3 66
ProjectionProjectionProjection Projection is the process that combines the is the process that combines the 3D viewer with the 3D objects to produce the 3D viewer with the 3D objects to produce the 2D image2D image–Perspective projections: all projectors meet at Perspective projections: all projectors meet at
the center of projectionthe center of projection–Parallel projection: projectors are parallel, center Parallel projection: projectors are parallel, center
of projection is replaced by a direction of of projection is replaced by a direction of projectionprojection
CSC 461: Lecture 3CSC 461: Lecture 3 77
Primitive AssemblyPrimitive Assembly
Vertices must be collected into geometric Vertices must be collected into geometric objects before clipping and rasterization can objects before clipping and rasterization can take placetake place–Line segmentsLine segments–PolygonsPolygons–Curves and surfacesCurves and surfaces
CSC 461: Lecture 3CSC 461: Lecture 3 88
ClippingClippingJust as a real camera cannot “see” the whole Just as a real camera cannot “see” the whole world, the virtual camera can only see part of world, the virtual camera can only see part of the world or object spacethe world or object space–Objects that are not within this volume are said to Objects that are not within this volume are said to
be be clippedclipped out of the scene out of the scene
CSC 461: Lecture 3CSC 461: Lecture 3 99
RasterizationRasterization If an object is not clipped out, the appropriate If an object is not clipped out, the appropriate
pixels in the frame buffer must be assigned colorspixels in the frame buffer must be assigned colorsRasterizer produces a set of fragments for each Rasterizer produces a set of fragments for each
objectobjectFragments are “potential pixels”Fragments are “potential pixels”
–Have a location in frame buffferHave a location in frame bufffer–Color and depth attributesColor and depth attributes
Vertex attributes are interpolated over objects by Vertex attributes are interpolated over objects by the rasterizerthe rasterizer
CSC 461: Lecture 3CSC 461: Lecture 3 1010
Fragment ProcessingFragment ProcessingFragments are processed to determine the Fragments are processed to determine the color of the corresponding pixel in the frame color of the corresponding pixel in the frame bufferbuffer
Colors can be determined by texture Colors can be determined by texture mapping or interpolation of vertex colorsmapping or interpolation of vertex colors
Fragments may be blocked by other Fragments may be blocked by other fragments closer to the camera fragments closer to the camera –Hidden-surface removal Hidden-surface removal
CSC 461: Lecture 3CSC 461: Lecture 3 1111
The Programmer’s InterfaceThe Programmer’s InterfaceProgrammer sees the graphics system Programmer sees the graphics system through an interface: the Application through an interface: the Application Programmer Interface (API)Programmer Interface (API)
CSC 461: Lecture 3CSC 461: Lecture 3 1212
API ContentsAPI ContentsFunctions that specify what we need to Functions that specify what we need to form an imageform an image–ObjectsObjects–ViewerViewer–Light Source(s)Light Source(s)–MaterialsMaterials
Other informationOther information–Input from devices such as mouse and Input from devices such as mouse and
keyboardkeyboard–Capabilities of systemCapabilities of system
CSC 461: Lecture 3CSC 461: Lecture 3 1313
Object SpecificationObject SpecificationMost APIs support a limited set of Most APIs support a limited set of primitives includingprimitives including–Points (1D object)Points (1D object)–Line segments (2D objects)Line segments (2D objects)–Polygons (3D objects)Polygons (3D objects)–Some curves and surfacesSome curves and surfaces
Six degrees of Six degrees of freedomfreedom–Position of center of Position of center of
lenslens–OrientationOrientation
LensLensFilm sizeFilm sizeOrientation of film Orientation of film planeplane
CSC 461: Lecture 3CSC 461: Lecture 3 1616
Lights and MaterialsLights and MaterialsTypes of lightsTypes of lights
–Point sources vs distributed sourcesPoint sources vs distributed sources–Spot lightsSpot lights–Near and far sourcesNear and far sources–Color propertiesColor properties
Material propertiesMaterial properties–Absorption: color propertiesAbsorption: color properties–ScatteringScattering