2 HCI 530: Seminar (HCI) Transforms The Graphics Pipeline Two DimensionalThree DimensionalThe Graphics Pipeline
3 Computer Graphics - Introduction Three Dimensional (3D) computer graphics (in contrast to 2D computer graphics) are graphics that use a three-dimensional representation of geometric data (often Cartesian) that is stored in the computer for the purposes of performing calculations and rendering 2D images.Such images may be forlater display or for real-timeviewing.
4 Computer Graphics - Introduction Despite these differences, 3D computer graphics rely on many of the same algorithms as 2D computer vector graphics in the wire-frame model and 2D computer raster graphics in the final rendered display. In computer graphics software, the distinction between 2D and 3D is occasionally blurred;2D applications may use3D techniques to achieveeffects such as lighting,and primarily 3D may use2D rendering techniques.
5 Computer Graphics - Introduction 3D computer graphics are often referred to as 3D models. Apart from the rendered graphic, the model is contained within the graphical data file.However, there are differences. A 3D model is the mathematical representation of any three-dimensional object (either inanimate or living). A model is not technically a graphic until it is visually displayed.Due to 3D printing (virtual prototyping), 3D models are not confined to virtual space.A model can be displayed visually as a two-dimensional image through a process called 3D rendering, or used in non-graphical computer simulations and calculations.
7 Graphics Rendering Pipeline Stages of the Graphics PipelineTransformationThis stage consumes data about polygons with vertices, edges and faces that constitute the whole scene.A matrix controls the linear transformations (scaling, rotation, translation, etc.) and viewing transformations (world and view space) that are to be applied on this data.
8 Graphics Rendering Pipeline Stages of the Graphics PipelinePer-vertex lightingGeometry in the complete 3D scene is lit according to the defined locations of light sources and reflectance and other surface properties.Current hardware implementations of the graphics pipeline compute lighting only at the vertices of the polygons being rendered.Per-fragment (ie. per-pixel) lighting can be done on modern graphics hardware as a post-rasterization process by means of a shader program.
9 Graphics Rendering Pipeline Stages of the Graphics PipelineViewing transformationObjects are transformed from 3D world space coordinates into a 3D coordinate system based on the position and orientation of a virtual camera.This results in the original 3D scene as seen from the camera’s point of view, defined in what is called eye space or camera space.Primitives generationAfter the transformation, new primitives are generated from those primitives that were sent to the beginning of the graphics pipeline.
10 Graphics Rendering Pipeline Stages of the Graphics PipelineProjection transformationIn this stage of the graphics pipeline, geometry is transformed from the eye space of the rendering camera into 2D image space, mapping the 3D scene onto a plane as seen from the virtual camera.
11 Graphics Rendering Pipeline Stages of the Graphics PipelineClippingGeometric primitives that now fall outside of the viewing frustum will not be visible and are discarded at this stage.Clipping is not necessary to achieve a correct image output, but it accelerates the rendering process by eliminating the unneeded rasterization and post-processing on primitives that will not appear anyway.
12 Graphics Rendering Pipeline Stages of the Graphics PipelineScan conversion or rasterizationRasterization is the process by which the 2D image space representation of the scene is converted into raster format and the correct resulting pixel values are determined.Texturing, fragment shadingAt this stage of the pipeline individual fragments (or pre-pixels) are assigned a color based on values interpolated from the vertices during rasterization or from a texture in memory.
13 Graphics Rendering Pipeline Stages of the Graphics PipelineDisplayThe final colored pixels can then be displayed on a computer monitor or other display.
14 ShapesThe shape of an object located in some space is the part of that space occupied by the object, as determined by its external boundary – abstracting from other properties such as colour, content, and material composition, as well as from the object's other spatial properties (position and orientation in space; size).
22 Spline CurvesIn mathematics, a spline is a special function defined piecewise by polynomials.In interpolating problems, spline interpolation is often preferred to polynomial interpolation because it yields similar results, even when using low-degree polynomials, while avoiding Runge's phenomenon for higher degrees.
23 Spline CurvesIn the computer science subfields of computer-aided design and computer graphics, the term "spline" more frequently refers to a piecewise polynomial (parametric) curve.Splines are popular curves in these subfields because of the simplicity of their construction, their ease and accuracy of evaluation, and their capacity to approximate complex shapes through curve fitting and interactive curve design.
25 Spline Curves How they work: Parametric curves governed by control pointsAdvantage: Smooth withjust a few control pointsDisadvantage: Can be hard to controlUses:– representation of smooth shapes, either as outlines in 2D or with Patches or Subdivision Surfaces in 3D– animation Paths for tweening– approximation of truncated Gaussian Filters
29 Polygons and MeshesPolygons are used in computer graphics to compose images that are three-dimensional in appearance.Usually (but not always) triangular, polygons arise when an object's surface is modeled, vertices are selected, and the object is rendered in a wire frame model.This is quicker to display than a shaded model; thus the polygons are a stage in computer animation. The polygon count refers to the number of polygons being rendered per frame.
30 Polygons and MeshesA polygon mesh or unstructured grid is a collection of vertices, edges and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling.The faces usually consist of triangles, quadrilaterals or other simple convex polygons, since this simplifies rendering, but may also be composed of more general concave polygons, or polygons with holes.
36 Three-Dimensional Transforms Uses of homogenous co-ordinates in three dimensions :Placing sub-objects in parent’s coordinate system to construct hierarchical scene graph- transforming primitives in own coordinate systemView volume normalization- mapping arbitrary view volume into canonical view volumealong z-axisParallel (orthographic, oblique) and perspective projectionPerspective transformation
37 Three-Dimensional Transforms WireframesResident EvilA v PF16