Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

Lecture 1 Computer Graphics Hardware

• Basic graphics hardware components


1. Display device (monitor)
2. Video controller
3. Memory
4. CPU
5. System bus

CG demo http://www.youtube.com/watch?v=LIGWAYS5uRw&feature=related
Graphics Hardware #
1
Display Devices
• Variety of display devices (monitors)
– Cathode Ray Tubes (CRTs)
– LCD, LED, etc.
– Projectors
• Fundamentally, able to present a dot of certain color at
a given (x, y) position.

CP411 Computer Graphics Graphics Hardware # 2


Display Devices
• Cathode Ray Tubes (CRTs)
– A common display device
– Evacuated glass bottle
– Extremely high voltage
– Heating element (filament)
– Electrons emit towards
anode focusing cylinder
– Vertical and horizontal deflection plates
– Beam strikes phosphor coating on front of tube

• CRT Overview

– CRT technology hasn’t changed much in 50 years


– Early television technology
• high resolution
• requires synchronization between video signal and electron beam vertical
sync pulse
– Early computer displays
• avoided synchronization using ‘vector’ algorithm
• flicker and refresh were problematic

CP411 Computer Graphics Graphics Hardware # 3


Electron Gun
1. Contains a filament that, when heated,
emits a stream of electrons

2. Electrons are focused with an


electromagnet into a sharp beam and
directed to a specific point of the face of
the picture tube

3. Deflection of electronic beam can be


controlled with either electronic or
magnetic fields. E.g. Two pairs of
magnetic deflection coils mounted on the
outside of the CRT envelope, to control
the deflection in horizontal (x) and vertical
(y) direction respectively

4. The front surface of the picture tube is


coated with small phosphor dots

5. Phosphor emits light for a short period of


time when hit by electronic beam.
CP411 Computer Graphics Graphics Hardware # 4
Color CRTs
• Color CRTs are much more complicated
– Requires manufacturing very precise geometry
– Uses a pattern of color phosphors on the screen:

Delta electron gun arrangement In-line electron gun arrangement

CP411 Computer Graphics Graphics Hardware #


5
Dot to object
• An object on a screen consists of dots

• If we know how to display a dot on a screen, how can we


further display an object ?

• Two approaches
– Vector display
– Raster display

CP411 Computer Graphics Graphics Hardware # 6


Vector Displays
• Vector displays
– Draw object dot by dot
– Early computer displays:
• basically an oscilloscope
– Control X,Y with
vertical/horizontal
plate voltage
– Often use intensity as Z
• Advantages
– Fast for simple images
– Intuitive like using pen to draw image.
– Apply to plotter to draw diagrams
• Disadvantages
– Need to compute the position and
color of next dot at time of displaying
– Slow for complex image
– Expensive devices
CP411 Computer Graphics Graphics Hardware # 7
Raster Displays
• The screen / image is divided into
lines, and each line into dots,
called raster / raster pattern.
• Set memory block (called
framebuffer) corresponds to all
dots. Store the image raster
pattern in memory block line by
line, each dot on screen has a
corresponding position in
memory. The value stored in a
memory position represents the
color the dot.
• The video controller scans each
line, the beam intensity is creased
at a light dot according to the
value stored at the position in the
memory. Graphics Hardware #
8
Example: How to draw a character?

Graphics Hardware #
9
Hardware for raster display system

Figure 2-17 Architecture of a raster system with a fixed


portion of the system memory reserved for the frame buffer.

Graphics Hardware #
10
Render objects to frame buffer

• Often done by GPU


• GPU does more

Graphics Hardware #
11
Figure 2-20 Architecture of a raster-graphics system with a display processor.

Graphics Hardware #
12
Advantages and disadvantages of
Raster Displays
• Advantages
– Images are computed/generated a head of displaying, and stored in raster.
– Displaying is just copying the image from raster to screen.
– The displaying is independent of the complexity of image.
– Separate the image generation and displaying

• Disadvantages
– Require separate hardware for raster to store image
– Require high performance video controller to scan raster to display screen
– Require to generate image fast for applications like animations

Graphics Hardware #
13
Terms of Raster Displays
• Raster display paints the screen by synchronizing scanning the
raster pattern.

• Raster is a rectangular array of dots. A dot or picture


element of a raster is also called a pixel.

• A scan line is a row of pixels.

• Resolution refers to the number of pixels, typically


represented as the number of pixel per scan line times the
number of scan lines.

Examples

640 X 480, 1024 X 768

Graphics Hardware #
14
Terms of Raster Displays
• Raster pattern is stored in a designated memory block
called frame buffer

• Each pixel corresponds to a memory location, which can


be 1 bit, 8 bits, 16 bits, or 24 bits

• The value represent a color according to certain color


model and coding scheme, e.g. RGB

• The number of bits is called color depth

• The image represented in this way is called bitmap or


pixmap
Graphics Hardware # 15
Frame Buffer
• The frame buffer is a part of RAM in a computer allocated to hold
the graphics data of one frame of image.

• Frame buffer size determines the maximum resolution and color


depth of the image
FB size = resolution × color depth,
e.g. 640X480X8 bit = 2457600 bit = 307200 Byte

• Frame buffer can be a part of main memory, or on the video card

• Image is generated by CPU/GPU and write (or load) into frame


buffer

• Image in frame buffer is read out by video controller to display on


the screen

CP411 Computer Graphics Graphics Hardware # 16


Frame, refreshment, frequency, scanning
• A frame refers to a full scan and display of image on screen.
• A frame must be “refreshed” to draw new images
– As new pixels are struck by electron beam, others are decaying
– Electron beam must hit all pixels frequently to eliminate flicker

• Frequency refers the number frames per second the on the


screen. Example, 60 frames/sec

• How to scan to create frame?


– Progressive scanning
• Scan one line after another

– Interlaced Scanning
• Scan all odd lines one by one and then scan all even lines one by one
• This method can reduce flicker, why?

CP411 Computer Graphics Graphics Hardware #


17
Interlaced Scanning and Progressive scanning

CP411 Computer Graphics Graphics Hardware #


18
The unbalance of writing and reading
• CPU/GPU generate and write image to frame buffer.

• Video controller read frame buffer and display on monitor on a fixed


frequency, e.g. 60 Hz.

• It is slow to generate and write image to frame buffer.


– Affected by many factors: the complexity of a graphic image, CPU
and GPU speed, algorithms, and system status.

• What could happen when write and read frame buffer speed not
match?

• Graph generating speed matters for real time animation or virtual


reality. Real time animation needs 24 frames/ps. All efforts are made
to draw more, fast, good and cost less.

Graphics Hardware #
19
Video Graphics Arrays (VGA)
• Graphics hardware standard introduced by IBM
• Specifications:
– 256 KB Video RAM
– 16-color and 256-color modes
– 262,144-value color palette (6 bits each for red, green, and
blue)
– 25.175 MHz or 28.322 MHz master clock
– Maximum of 720 horizontal pixels
– Maximum of 480 lines
– Refresh rates at up to 70 Hz
– Vertical Blanking interrupt

Graphics Hardware #
20
VGA timing information
• Horizontal timing

Graphics Hardware #
21
Graphics Hardware #
22
Video card
• A video card, also known as a graphics accelerator
card, display adapter, or graphics card, is a PC
hardware component whose function is to rasterize
images in frame buffer and output images to a display.

• Major components
– Graphics processing unit (GPU): a dedicated graphics
microprocessor optimized for floating point calculations which
are fundamental to 3D graphics rendering.
– Video memory
• DDR RAM, 128 MB to 2.0 GB, 400 MHz to 2.4 GHz.
• Store program, data, and frame buffer

CP411 Computer Graphics Graphics Hardware #


23
Other components
• Video BIOS (firmware)
• RAMDAC
• Output connectors

• Motherboard interface
– PCI: 32 bit, 33 MHz. Replaced the previous buses from 1993. PCI allowed
dynamic connectivity between devices, avoiding the jumpers manual
adjustments

– AGP: First used in 1997. Dedicated to graphics bus, 32 bits, 66 MHz.

– PCI-Express: Point to point interface, released in 2004. In 2006 provided


double data transfer rate of AGP, 32 bits, 133 MHz
CP411 Computer Graphics Graphics Hardware #
24
GPU
1. GPU is a separate, self-contained
computing device dedicated for
graphics computing. GPU has its own
processing units, and its own memory
banks.

2. The CPU and GPU communicate over


the PCI bus.
– CPU sends graphic object model
data to video memory and
instructions to GPU
– GPU processes object data,
rasterize (generate pixel data) and
store the pixel data in frame buffer

CP411 Computer Graphics Graphics Hardware #


25
What GPU does?
• Dedicated to calculating the graphics functions such as
drawing basic graphic primitives (dot, line segment,
triangle, polygon, etc) with lighting effects, and
transformations.

• The roles of CPU and GPU?


– CPU is doing model computing
– GPU is doing rendering computing

• Major manufactures: NVIDIA, AMD, Intel

• Mobile SoCs contain the GPU cores


CP411 Computer Graphics Graphics Hardware #
26
GPU has more computing power
• Modern GPU has a parallel architecture
– Many problems map well to GPU-style computing
– GPUs have large amount of arithmetic units
– Increasing amount of programmability in the pipeline
• Programmable GPU
– New features map to GPGPU
– Unified shaders
– Direct access to computing units through APIs

• GPU has lots more applications


– High Performance Computing
– Data mining, AI
CP411 Computer Graphics Graphics Hardware #
27
CP411 Computer Graphics Graphics Hardware #
28
A logical block diagram of the R600 GPU, 2007. Source: AMD.

CP411 Computer Graphics Graphics Hardware #


29
A closer look at AMD's CPU/GPU Fusion

CP411 Computer Graphics Graphics Hardware #


30
Questions
1. What are the two types of displays for graphics?

2. Give examples of two types of printing devices using


the two types of display methods

3. How would you store images for the different types of


displays?

Graphics Hardware # 31

You might also like