Overview of Graphics Systems
Overview of Graphics Systems
Chapter 1
Outline
• Survey of Computer Graphics
• Overview of Graphics Systems
– Image Basics
– Graphics Hardware
• Input
– Describing something to the computer
• Computation
– Computing what we want to draw
• Output
– Final representation
What is the goal of computer
graphics?
• High level, why computer graphics?
Transformations Rasterization
Computation Stage
Computation
Model Output
Transformations Rasterization
Transformed
Model
How do we store this?
How is
What much
How
the
Howmemory
largest
bigmany
is the do
image we
pixels need
framebuffer?
you
arecantodisplay?
allocate
there?
for the framebuffer?
Framebuffer in Memory
• If we want a framebuffer of 640 pixels by
480 pixles, we should allocate:
framebuffer = 640*480 bits
• How many bit should we allocate?
Q: What do more bits get you?
A: More values to be stored at each pixel.
Why would you want to store something
other than a 1 or 0?
Framebuffer bit depth
• How many colors does 1 bit get you?
• How many colors do 8 bits get you?
– Monochrome systems use this (green/gray
scale)
• What bit depth would you want for your
framebuffer?
framebuffer =
[255 255 255 0 0 255 0 0 255 0 255 0 255 0 0
0 255 0 0 255 0 …]
Graphic Card Memory
• How much memory is on our graphic card?
– 640 * 480 * 32 bits = 1,228,800 bytes
– 1024 * 768 * 32 bits = 3,145,728 bytes
– 1600 * 1200 * 32 bits = 7,680,000 bytes
• How much memory is on your graphics card?
• As a side note: Playstation 1 has 2 MB RAM.
How do they do it? What is the TV
resolution? 1 bit alpha, no z buffer.
A: Egads! Not enough memory!
Q: What is dithering?
• Trading spatial resolution for intensity and
color depth.
• Sometimes call digital half-toning
• Increases the number of apparent colors
than are actually capable of being displayed
True
256colors
16 color
colors
Dithering
• Why does it work? Spatial integration.
Using the fact that our eyes usually blend
areas of high frequency.
• Why do you need it? If you don’t have
enough bits. Eyes can detect 100 shades of a
color. Banding occurs with fewer colors.
• Where do you see this? Printers and
newspaper! Let’s look at the Alligator.
Black and White Dithering
Let’s transition to OpenGL
• Now that we understand the input and
computation stage, let’s hold off on
different output types till after opengl + 2D
Output
Input Computation Output
The values in the framebuffer are converted from a digital (1s and
0s representation, the bits) to an analog signal that goes out to the
monitor. A video card’s RAMDAC performs this operation, once
per frame. This is done automatically (not controlled by your
code), and the conversion can be done while writing to the
framebuffer.
Image Quality Issues
3D Display
3D Object
Graphics Software
• How to talk to the hardware?
• Special purpose software
– Excel
– AutoCAD
– Medical Visualization
• Programming API
• Advantages?
• Please Read Section 2.9