Graphics Pipeline: First Pass - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Graphics Pipeline: First Pass

Description:

Transforming the view frustum (along with the objects inside it) into a cuboid ... If the polygon spans inside and outside the view frustum, introduce new vertices ... – PowerPoint PPT presentation

Number of Views:72
Avg rating:3.0/5.0
Slides: 19
Provided by: gop6
Learn more at: https://www.ics.uci.edu
Category:
Tags: first | graphics | pass | pipeline | the | view

less

Transcript and Presenter's Notes

Title: Graphics Pipeline: First Pass


1
Graphics Pipeline First Pass
2
Graphics Pipeline First pass
  • Object representation (triangles) and computation
    of vertex attributes
  • Model-view transformation
  • Projection transformation
  • Clipping and vertex interpolation of attributes
  • Rasterization and pixel interpolation of
    attributes

3
Object Representation
  • Most common TRIANGLES
  • Advantages
  • Consistently planar
  • Rotationally-invariant interpolation during
    rasterization
  • Easy definition of topology as well as geometry
  • Easy hardware implementation

4
Object Representation
  • Other representations
  • Points (no connectivity information)
  • Quadrilaterals (non-planarity, inconsistent
    interpolation of attributes)
  • Images (no geometry not useful in simulations)
  • Splines (to be converted to polygons for
    rasterization)

5
Attributes
  • Color (Red, Green, Blue)
  • Normal vector
  • Texture coordinate
  • Transparency value
  • .
  • .
  • .

6
Graphics Pipeline First pass
  • Object representation (triangles) and computation
    of vertex attributes
  • Model-view transformation
  • Projection transformation
  • Clipping and vertex interpolation of attributes
  • Rasterization and pixel interpolation of
    attributes

7
Model-view transformations
  • Model transformation
  • View transformation

8
Model transformations
  • Transform the object to the required position,
    size and orientation.
  • Can use any transformation to achieve this.
  • In graphics library/hardware only linear
    transformations like rotate, translate, scale,
    shear are supported.

9
View transformation
  • Viewing parameters (9 parameters)
  • View POINT (x,y,z),
  • Viewing direction (VECTOR) (vx,vy,vz),
  • View-up VECTOR (ux,uy,uz).
  • Default (0,0,0), (0,0,-1), (0,1,0)
  • Transforming the scene such that the view point
    is at the origin, viewing direction is aligned
    with the negative Z axis, and the view-up vector
    is aligned with the positive Y axis.
  • Uses rotation and translation to achieve this
    transformation.

10
Graphics Pipeline First pass
  • Object representation (triangles) and computation
    of vertex attributes
  • Model-view transformation
  • Projection transformation
  • Clipping and vertex interpolation of attributes
  • Rasterization and pixel interpolation of
    attributes

11
Projection Transformation
  • Define the view frustum (6 parameters)
  • Assume origin is the view point
  • Near and far planes (planes parallel to XY plane
    in the negative Z axis)
  • Left, right, top, bottom rectangle defined on the
    near plane.

-Z
Y
X
near
far
12
Projection Transformation
  • Transforming the view frustum (along with the
    objects inside it) into a cuboid with unit square
    faces on the near and far planes and with the
    negative Z axis passing through the center of
    these two faces.
  • Consists of a shear and a perspective
    projection operations.

13
Graphics Pipeline First pass
  • Object representation (triangles) and computation
    of vertex attributes
  • Model-view transformation
  • Projection transformation
  • Clipping and vertex interpolation of attributes
  • Rasterization and pixel interpolation of
    attributes

14
Clipping and Interpolation of Attributes
  • Clipping Removing the portions of the polygon
    that is outside the view frustum. If the polygon
    spans inside and outside the view frustum,
    introduce new vertices on the boundary to remove
    the outside portion of the polygon.
  • Interpolation For the new vertices introduced,
    compute all the attributes of the original
    vertices by interpolation.

15
Window coordinate transformation
  • After clipping, scale the square faces of the
    unit cuboid (square faced on the near and far
    planes) such that it represents the (relative)
    pixel coordinates. (You dont consider the Z
    value).
  • Then translate these coordinates to the position
    of the window on the monitor screen to represent
    the absolute pixel coordinates.
  • This is called window coordinate transformation.

16
Graphics Pipeline First pass
  • Object representation (triangles) and computation
    of vertex attributes
  • Model-view transformation
  • Projection transformation
  • Clipping and vertex interpolation of attributes
  • Rasterization and pixel interpolation of
    attributes

17
Rasterization and Pixel Attribute Interpolation
  • Rasterization is a process of generating pixels
    in the scan (horizontal) line order (top to
    bottom, left to right). (Also called scan
    conversion.)
  • While generating pixels, the colors and other
    relevant attributes of the pixels are found by
    interpolating the attributes of the left and
    right extent of the scan line that lie on the
    polygon edge.

Scan Line
right
left
right
left
18
Graphics Pipeline First pass
  • End.
Write a Comment
User Comments (0)
About PowerShow.com