Graphics Hardware PDF

Document Details

CarefreeRhenium

Uploaded by CarefreeRhenium

Tags

graphics hardware computer graphics CRT display technology

Summary

This document is a presentation on graphics hardware, focusing on CRTs and rasterization (among other topics). It covers topics including raster display systems, the 3D graphics pipeline, and the Z buffer for hidden surface removal.

Full Transcript

Chapter two Graphics Hardware 1 Outline  Raster Display Systems  Introduction to the 3D Graphics Pipeline  The Z Buffer for Hidden Surface Removal 2 Graphics Hardware  Any computer generated image must be displayed in some...

Chapter two Graphics Hardware 1 Outline  Raster Display Systems  Introduction to the 3D Graphics Pipeline  The Z Buffer for Hidden Surface Removal 2 Graphics Hardware  Any computer generated image must be displayed in some form. The most common graphics display device is the video monitor, and the most common technology for video monitors is the Cathode Ray Tube (CRT).  Beams of electrons are generated by electron guns and fired at a screen consisting of thousands of tiny phosphor dots.  When a beam hits a phosphor dot it emits light with brightness proportional to the strength of the beam. Therefore pictures can be drawn on the display by directing the electron beam to particular parts of the screen.  The beam is directed to different parts of the screen by passing it through a magnetic field. The strength and direction of this field, generated by the deflection yoke, determines the degree of deflection of the beam on its way to the screen. 3 Cont.  The operation of CRT are: 1. The electron gun emits a beam of electrons. 2. The electron beam passes through focusing and deflection systems that direct it towards specified positions on the phosphor-coated screen. 3. When the beam hits the screen, the phosphor emits a small spot of light at each position contacted by the electron beam. 4 Cont.  To achieve a color display, CRT devices have three electron beams, and on the screen the phosphor dots are in groups of three.  Because the three dots are very close together the light given off by the phosphor dots is combined, and the relative brightness’s of the red, green and blue components determines the color of light perceived at that point in the display. 5 Cont.  There are two ways (Random scan and Raster scan) by which we can display an object on the screen.  In a random scan device the beam is only directed to areas of the screen where parts of the picture are to be drawn. If a part of the screen is blank the electron beam will never be directed at it.  It draw a picture as a set of primitives, for example lines or curves. For this reason, random scan devices are also known as vector graphics displays.  These days random scan is only really used by some hard-copy plotters. 6 Cont.  Raster scan device: the primitives to be drawn are first converted into a grid of dots. The brightness’s of these dots are stored in a data structure known as a frame buffer.  The electron beam then sweeps across the screen line-by-line, visiting every location on the screen, but it is only switched on when the frame buffer indicates that a dot is to be displayed at that location.  Frame buffer stores the image data ready for display, the actual display itself is known as the raster. The raster is a grid of phosphor dots on the display screen. 7 RASTER AND RANDOM SCAN 8 Cont.  Frame buffers are used by raster scan display devices to store the pixel values of the image that will be displayed on the raster.  It is a 2D array of data values, with each data value corresponding to a pixel in the image. The number of bits used to store the value for each pixel is known as the bit-planes or depth of the frame buffer.  For example, a 640x480x8 frame buffer has a resolution of 640x480 and a depth of 8 bit.  For color displays we need to store a value for each component of the color (red, green and blue), so the bit-planes will typically be a multiple of 3 (e.g. 8 bit-planes each for red, green and blue makes a total of 24 bit-planes). 9 Cont.  The raster is a grid of phosphor dots on the display screen. Each of these dots is known as a picture cell, or pixel.  Each row of pixels in the raster is known as a scan-line.  The number of pixels in a scan-line is known as the x-resolution.  The number of scan-lines is known as the y- resolution.  The ratio of the y-resolution to the x-resolution is known as the aspect ratio of the display. 10 Cont.  The phosphor dots on a CRT display device only emit light for a very brief period of time after the electron beam has moved on.  The length of time that the phosphor emits light is known as its persistence.  To give the impression of a permanent image on the screen the raster must be continually updated.  Raster scan systems perform this continual update by ‘sweeping’ the electron beams across the raster scan-line by scan-line, starting from the top and working towards the bottom. When the last scan-line is completed we start again from the top. 11 Cont.  The number of times that the entire raster is refreshed (i.e. drawn) each second is known as the refresh rate of the device.  For the display to appear persistent and not to flicker the display must update often enough so that we cannot perceive a gap between frames.  In other words, we must refresh the raster when the persistence of the phosphor dots is beginning to wear off.  In practice, if the refresh rate is more than 24 frames per second (f/s) the display will appear reasonably smooth and persistent. 12 Cont.  Modern graphics displays have high refresh rates, typically in the region of 60 f/s. Consequently, some flicker was noticeable.  To overcome this, a technique known as interlaced scanning was employed. Using interlaced scanning alternate scan-lines are updated in each raster refresh. For example, in the first refresh only odd numbered scan-lines may be refreshed, then on the next refresh only even-numbered scan-lines, and so on.  Because this technique effectively doubles the screen refresh rate, it has the effect of reducing flicker for displays with low refresh rates. Interlaced scanning was common in the early days of computer graphics, but these days displays have better refresh rates so it is not so common. 13 Cont.  The following are the specifications of some common video formats that have been (and still are) used in computer graphics: + VGA: resolution 640x480, 60 f/s refresh rate, non-interlaced scanning. + PAL: resolution 625x480, 25 f/s refresh rate, interlaced scanning + NTSC: resolution 525x480, 30 f/s refresh rate, interlaced scanning 14 Cont.  Although most graphics monitors are still constructed with CRTs, other technologies are emerging that may soon replace CRT monitors.  The term flat-panel display refers to a class of video devices that have reduced volume, weight, and power requirements compared to a CRT.  A significant feature of flat-panel displays is that they are thinner than CRTs, and we can hang them on walls or wear them on our wrists.  We can separate flat-panel displays into two categories: emissive displays and non emissive displays. 15 Cont.  The emissive displays are devices that convert electrical energy into light. Plasma panels, thin-film electroluminescent displays, and light- emitting diodes are examples of emissive displays.  Non emissive displays use optical effects to convert sunlight or light from some other source into graphics patterns. The most important example of a non emissive flat-panel display is a liquid-crystal device( LCD).  Liquid crystal refers to the fact that these compounds have a crystalline arrangement of molecules, yet they flow like a liquid. 16 GRAPHICS HARDWARE: 3D DISPLAY  Graphics monitors for the display of three-dimensional scenes have been devised using a technique that reflects a CRT image from a vibrating, flexible mirror. As the mirror vibrates, it changes focal length.  These vibrations are synchronized with the display of an object on a CRT so that each point on the object is reflected from the mirror into a spatial position corresponding to the distance of that point from a specified viewing location. This allows us to walk around an object or scene and view it from different sides. 17 GRAPHICS HARDWARE: 3D DISPLAY  Creating a 3D display system using a vibrating mirror that changes focal length to match the depths of points in a scene. 18 GRAPHICS HARDWARE: 3D DISPLAY  Another technique for representing a 3D object is to display stereoscopic views of the object.  The aim of 3D display devices is to provide a stereo pair of images, one to each eye of the viewer, so that the viewer can perceive the depth of objects in the scene as well as their position. The process of generating such 3D displays is known as stereoscopy.  3D displays can be divided into two types: head-mounted displays (HMDs) and head-tracked displays (HTDs). 19 GRAPHICS HARDWARE: 3D DISPLAY  HMDs are displays that are mounted on the head of the viewer. The device fits on the head of the user and displays separate images to the left and right eyes, producing a sense of stereo immersion. Such devices are common in virtual reality applications.  HMD the display moves with the viewers head, with a HTD the display remains stationary, but the head of the viewer is tracked so that the images presented in the display can be updated. 20 GRAPHICS HARDWARE: 3D DISPLAY  Stereoscopy method does not produce true 3D images, but it does provide a 3D effect by presenting a different view to each eye of an observer so that scenes do appear to have depth. 21 GRAPHICS HARDWARE  Most (non-graphics) processing will occur in the CPU of the computer, which uses the system bus to communicate with the system memory and peripheral devices.  When graphics routines are to be executed, instead of being executed by the CPU they are passed straight to the display processor, which contains dedicated hardware for drawing graphics primitives.  The display processor is also known by a variety of other names: graphics controller, display coprocessor, graphics accelerator and video card. 22 GRAPHICS HARDWARE  Display Processor is the interpreter or a hardware that converts display processor code into picture.  The Display Processor converts the digital information from CPU to analog values.  The main purpose of the Display Processor is to free the CPU from most of the graphic chores. 23 GRAPHICS HARDWARE  Raster-graphics systems typically employ several processing units. In addition to the central processing unit (CPU), a special-purpose processor, called the video controller or display controller, is used to control the operation of the display device.  The part of a computer's motherboard that handles outputting graphic images to a monitor or display. 24 GRAPHICS HARDWARE  One way to organize the components of a raster system that contains a separate display processor, sometimes referred to as a graphics controller or a display coprocessor. In addition to the system memory, a separate display-processor memory area can be provided. 25 GRAPHICS HARDWARE: INPUT DEVICES  For graphical input, we have a range of devices to choose from. Keyboards, button boxes, and dials are used to input text and data values.  The most popular “pointing” device is the mouse, but trackballs, space balls, joysticks, cursor-control keys, and thumbwheels are also used to position the screen cursor.  In virtual-reality environments, data gloves are commonly used.  Other input devices are image scanners, digitizers, touch panels, light pens, and voice systems. 26 Hidden Surface Removal  One of the most challenging problems in computer graphics is the removal of hidden parts from images of solid objects.  In real life, the opaque material of these objects obstructs the light rays from hidden parts and prevents us from seeing them.  In the computer generation, no such automatic elimination takes place when objects are projected onto the screen coordinate system. 27 Cont..  Instead, all parts of every object, including many parts that should be invisible are displayed.  To remove these parts to create a more realistic image, we must apply a hidden line or hidden surface algorithm to set of objects.  The algorithm operates on different kinds of scene models, generate various forms of output to images of different complexities. 28 The Z Buffer for Hidden Surface Removal  Hidden Surface  When viewing a picture containing non transparent (Visible) objects and surfaces, it is not possible to see those objects from view which are behind from the objects closer to eye.  To get the realistic screen image, removal of these hidden surfaces is must. 29 Hidden Surface  The identification and removal of these surfaces is called as the Hidden-surface problem.  Object space is the 3 dimensional space in which a graphic object is defined.  Image space is the projection of the object defined in 3D to two dimensional screen space.  There are algorithms to eliminate hidden surfaces in (1) Object space, as well as in (2) Image space. 30 Cont..  Two approaches for removing hidden surface problems 1. Object-Space method- implemented in physical coordinate system 2. Image-Space method- implemented in screen coordinate system  Object-Space method  Determine which part of the object is visible. In this method, various objects and parts of objects are compared. After comparison visible, invisible or hardly visible surface is determined.  Algorithm are line based instead of surface based 31 Hidden Surface  Image-Space method  Determine per pixel which point of an object is visible  Algorithm used to locate the visible surface instead of a visible line.  Each point is detected for its visibility. If a point is visible, then the pixel is on, otherwise off.  These methods are also called a Visible Surface Determination. The implementation of these methods on a computer requires a lot of processing time and processing power of the computer.  The image space method requires more computations. Each object is defined clearly. Visibility of each object surface is also determined. 32 The Z Buffer  Z-buffer, which is also known as the Depth-buffer method is one of the commonly used method for hidden surface detection.  Is an image-based method applied during the rasterization stage  A standard approach implemented in most graphics libraries  Easy to be implemented on hardware  Proposed by Cutmull in 1974  Each surface is processed separately one pixel position at a time across the surface 33 The Z Buffer  The depth value for a pixel are compared and the closest (the smallest z) surface determines the color to be displayed in the frame buffer.  Applied very efficiently on polygon surfaces  Surfaces are processed in any order  To override the closer polygons from the far ones, two buffers named frame buffer and depth buffer, are used.  Depth buffer is used to store depth values for (x, y) position, as surfaces are processed 0 ≤ depth ≤ 1.  The frame buffer is used to store the intensity value of color value at each position (x, y). 34 The Z Buffer  The z-coordinates are usually normalized to the range [0, 1].  The 0 value for z-coordinate indicates back clipping pane and 1 value for z-coordinates indicates front clipping pane. 35 How Z-Buffer Algorithm works? All of the the pixel Maintai elements of Whenever a pixel colour is to retains be changed, the depth of this ns the the z-buffer new colour is compared to the the old depth are initially current depth in the z-buffer. colour, else for set to be If this colour is ‘closer’ than and the z- each ‘very far the previous colour, the pixel buffer pixel away’ is given the new colour, and retains its (infinity) the z-buffer entry for that old value pixel is updated 36 The Z Buffer  Algorithm:Z-buffer is a 2D array that stores the depth value for each pixel  InitScreen: for i = 0 to N do for j = 1 to N do Screen[i][j] = BACKGROUND_COLOR; Z-buffer[i][j] = ∞;  DrawZpixel (x,y,z,color): if (z

Use Quizgecko on...
Browser
Browser