Signal processing approach of CG
Analog Digital
Resampling Requantization
Graphics Hardware modeling
model
image synthesis
digital image
Balázs Csébfalvi display
Department of Control Engineering and Information Technology email:
[email protected] Web: http://www.iit.bme.hu/~cseb
Analog Digital
Image information building element: • vector • pixel 2 / 55
Raster versus vector displays
Vector graphics system
x y I 10 10 1 5 -30 0 -15 0 1
DA converters
Drawing time ~ # of vectors 1D elements: no filling Aliasing, jaggies
display list 3 / 55
Drawbacks of vector display
n n n n n n
electron beam movement 4 / 55
Raster Graphics System
the display is excited for short time 20 frames/second to avoid flickering the refresh rate depends on the complexity only 1D elements (line segments) filling is not supported photorealistic rendering is not possible
5 / 55
6 / 55
1
Video refresh controller n
Video refresh controller
controls the display device • sends synchronization signals • modulates the intensity of the beam • converts the digital information to analog voltage signals • controls the horizontal and vertical retraces
basic video refresh controller operations
7 / 55
Raster Graphics System
8 / 55
Drawbacks of a raster system n
n
n
n
n n n n
pixels (picture element) at grid points cover the entire screen pixel data is stored in a frame buffer (special memory segment) beams are modulated according to the content of the frame buffer movement of the beam is fixed the refresh rate doesn’t depend on complexity filled objects are supported photorealistic rendering is possible
n n
elements (polygons, lines, …) are transformed to pixel format ⇒ scan conversion the digital model is resampled/requantized correct sampling is not practical ⇒ aliasing
9 / 55
Raster-Scan Characters
defined as a grid of pixel positions
10 / 55
Frame buffer
defined as a curve outline 11 / 55
architecture of a raster system with a fixed portion of the system memory reserved for the frame buffer 12 / 55
2
Display Processor
Raster system with a display processor
n
Interface between the frame buffer and the general part of the computer
n
Takes and executes high-level drawing commands
n
Calculates the pixel colors of high-level primitives
13 / 55
Display processor
14 / 55
Functions of the GPU
Early systems • functions (e.g. scan conversion) realized in a software library • CPU executes the software routines
n
n n n
Advanced systems • functions realized in hardware (GPU) • interface between the CPU and the frame buffer • relieves the CPU of high-level operations • GPU is well optimized • video refresh controller is usually included
n
n n n
transformations clipping scan conversion shading 2D/3D texture mapping alpha blending
15 / 55
Color coding n n n
Indexed color coding
pixel colors are stored on n bits the frame buffer contains n-bit words n can be
n
n
• 1: binary or monochromatic display • 2, 4, 8, 12: early systems like CGA • 24, 32: advanced systems like VGA n
16 / 55
n n
color coding modes • true color mode: n = r + g + b • 2r red • 2g different green shades • 2b blue • 2n different colors can be selected • 2n different colors can be displayed at the same time • indexed color coding
n
n n n 17 / 55
pseudo colors, colors are indices to a lookup table (LUT) color components stored in m bits LUT written by the application 2n different colors can be displayed at the same time 23m different colors can be selected at the same time 3m >> n usually applied in low-cost systems LUT: very fast memory 18 / 55
3
Indexed color coding
Indexed color coding n
n n n
n
which index represents a color best ? ⇒ linear search of the LUT only for 2D drawing or simple shading in 3D interpolation of the indices does not make sense ⇒ complex shading is not supported ?-correction: • LUT can be exploited for the final color transformation • separately for the color channels
19 / 55
20 / 55
5-block memory
Speed problems of the frame buffer
shift register
frame buffer: 106 x 8…24 bits = 1..3Mbyte pixel time : < 10nsec Drawing (animation): 1 sec: 15...25 times pixel writing=1/15/106 = 66nsec
n
Display: 1 sec: 50…100 times pixel reading=1/50/106 = 20nsec
Solution: • parallel reading into shift registers • time for writing: • while the beam is moving back at the end of each line/frame • during the refreshing accesses to the shift registers • parallel writing 21 / 55
Video-RAM
n
n
n
n
A
B
C
D
E
LUT CPU data
CPU address
Multiplexer X-Y counters
ABCD EAB ABC 22 / 55
Video Display Devices (1) n
1024
1024
1024
1
2
n
n LUT
CPU data
CPU address
n
n
cathode-ray tube (CRT) • refresh CRT (raster-scan display, vector display) • direct-view storage tubes refresh CRT • electrons hit phosphor-coated screen • permanent glowing through refreshing • phosphor persistence • resolution, e.g., 1280x1024, aspect ratio
Multiplexer Y counter
23 / 55
24 / 55
4
Video Display Devices (2)
Video Display Devices
n
basic design of a magnetic-deflection CRT
raster-scan displays • television technology • object represented as set of discrete points • screen point: pixel (picture element) • refresh buffer, frame buffer • bitmap • 3Mbytes for 1024x1024x24 • refresh rate (60 - 120 Hz) • horizontal, vertical retrace • interlacing
25 / 55
Raster Scan Display Principle
26 / 55
Video Display Devices (3) n
Color CRT Monitors • phosphors emit different-colored light • beam-penetration (for vector displays) • two layers of phosphor • slow beam → outer layer (say red) • faster beam → inner layer (say green)
• shadow-mask (for raster displays) • • • • 27 / 55
three different phosphors: R,G,B hexagonal arrangement additive color-mix, RGB-model 24 bits color information (16 million colors), true28 / 55 color system
Video Display Devices (4)
RGB Shadow Mask Technology
n
29 / 55
Flat-Panel Displays • reduced volume, weight, power requirement • emissive displays (plasma panel, LEDs) • nonemissive displays (LCD) • LCDs (liquid-crystal displays) • polarized light is (non)passing through liquid crystal material • refresh buffer, 60Hz refresh rate • passive-matrix, active-matrix
30 / 55
5
LCD Monitor n n
Color LCD Monitor
LCD (Liquid Crystal Display) advantages • flat • light-weight • radiation free
n
disadvantages
• low contrast • high persistence
(c) How Stuff Works 31 / 55
Plasma-Panel Display n n n
32 / 55
LED monitors
glowing gas between 2 glass panels advantages: flat, high brightness, good image disadvantages: heavy, expensive, instable
n
LEDs (Light Emitting Diods) are arranged in matrix form, each one can be controlled separately
n
advantages: flat, light-weight, robust, bright disadvantages: high energy consumption, expensive, reduced colors (blue LEDs?)
n
33 / 55
3D Display Techniques n
34 / 55
3D Display Techniques
Three-Dimensional Viewing Devices
n
Three-Dimensional Viewing Devices
• vibrating flexible mirror • stereoscopic and virtual-reality systems
• vibrating flexible mirror • stereoscopic and virtual-reality systems
• shutter glasses (+ tracking) • headset with tracking • other VR devices • stereolithographic apparatus (SLA)
• shutter glasses (+ tracking) • headset with tracking • other VR devices • stereolithographic apparatus (SLA)
35 / 55
36 / 55
6
Vibrating Mirror Display
Vibrating Mirror Display
screen
screen
eye
eye
virtual image
virtual images mirror
vibrating mirror 37 / 55
Vibrating Mirror Display
38 / 55
Vibrating Mirror Display
screen
screen
eye
eye
virtual images
virtual images vibrating mirror
vibrating mirror 39 / 55
3D Display Techniques n
40 / 55
Virtual Reality Devices
Three-Dimensional Viewing Devices
Virtual reality = stimulation of the human senses to simulate a fictive environment (reality) plus the possibilities to interact with this world
• vibrating flexible mirror • stereoscopic and virtual-reality systems • shutter glasses (+ tracking) • headset with tracking • other VR devices • stereolithographic apparatus (SLA) n n n
41 / 55
eyes: privat eye, head mounted displays (hmd) ears: headphones, loudspeakers in hmd tactile sense: data glove, data suit
42 / 55
7
Shutter Glasses
Head Mounted Display (HMD) viewing a stereoscopic projection
2 small screens display images for both eyes: J head movement controls virtual camera J artificial image only L limited field-of-view L rather expensive L seasickness
43 / 55
Lightweight HMD
44 / 55
Interactive Walkthrough
ultrasound tracking device used with stereoscopic glasses to track head position 45 / 55
Data Glove
data glove as interaction device
46 / 55
Virtual Windtunnel
HMD in combination with data glove 47 / 55
48 / 55
8
Virtual Table
Very large Viewing Screens
very large screen area
49 / 55
50 / 55
Other VR Devices
CAVE small room (3x3m) with display walls
full immersion with 3Dprojection (with glasses) 51 / 55
52 / 55 Quelle: Fraunhofer IGD
3D Display Techniques n
Stereolithographic Apparatus (SLA) UV-laser gun
Three-Dimensional Viewing Devices • vibrating flexible mirror • stereoscopic and virtual-reality systems • shutter glasses (+ tracking) • headset with tracking • other VR devices • stereolithographic apparatus (SLA)
polymerized plastic (solid)
53 / 55
is dipped in layer by layer liquid plastic
54 / 55
9
SLA examples
55 / 55
10