Computer Graphics/and MultimediaCMM472/CIT773
What is CG ?, History of CG, CourseOverview
Applied Computer Science and Multimedia, SIE&T 2
Introduction
• Story of CG– Producing image using computer– 40 years ago : display a few line on CRT– Now generated images are indistinguishable
from photographs
Applied Computer Science and Multimedia, SIE&T 3
Application of CG
• Depends on the user community need • Advance of hardware and software• Area of CG
– Display information – Design– Simulation– User interface
Applied Computer Science and Multimedia, SIE&T 4
Display Information
• Classical using spoken and written language• Drawing field
– Babylonians (4000 years ago) use stone for floor plan– Greek (2000 years ago) till Renaissance
• Has idea of architecture graphically– Before today use manual drafting and drawing – Today : computer based system
• Able to develop and manipulated in real-time
Applied Computer Science and Multimedia, SIE&T 5
CG Applications
• Statistic– 100 years : explored the techniques for plotting
data– Now, computer plotting package provided
variety of technique, color tools etc.• Medicine
– Interested in data-analysis problems– Image technology, CT, MRI, Ultrasound, PET
Applied Computer Science and Multimedia, SIE&T 6
Design
• Engineer, architecture using CAD– Iterative process for best or optimize solution– Ex. Mechanical parts, VLSI etc.
• CAD package has interactive tools ex. menu, tool bar– interactive interface and analyze etc.– Able to generate different image, different view
Applied Computer Science and Multimedia, SIE&T 7
Simulation
• Refer to capable of generating images in real-time• Applied with advance hardware • Ex. Training Pilot, Flight simulator• Some special VLSI chip able to generate
sophisticate game• Photo realistic movie • Together with headset led her has stereoscopic
effect by different view for each eye
Applied Computer Science and Multimedia, SIE&T 8
User Interface
• GUI from OS like MS windows, X windows, Macintosh OS
• Use of menu and icon, mouse• Different only in detail
Applied Computer Science and Multimedia, SIE&T 9
Graphical System• 5 major elements
– Processor, memory, frame buffer, output devices and input devices
• General for every system
Applied Computer Science and Multimedia, SIE&T 10
Pixel and Frame buffer
• Picture is produced as array of pixel (raster)• Pixel are stored in Frame buffer memory :
VRAM for fast redisplay• Depth : number of bits for each pixel
– 24 bit has true color system : RGB system• Resolution : number of pixel in frame
buffer
Applied Computer Science and Multimedia, SIE&T 11
Detail of area around one eye showing individual pixel.
Pixels. Image of Yeti the cat
Applied Computer Science and Multimedia, SIE&T 12
Output Device
• Domain type : CRT display• Computer convert display signal from digital to analog to
control plate• Refresh rate : rate for retrace the screen at least 50 times
per second
The cathode-ray tube (CRT)
Applied Computer Science and Multimedia, SIE&T 13
2 systems for refresh rate
• In order to avoid flicker of display• Interlace display :
– Odd row and even row are refresh alternately• Noninterlace display
– Display scan in one time row by row
Applied Computer Science and Multimedia, SIE&T 14
Color display system
Shadow-mask CRT
Applied Computer Science and Multimedia, SIE&T 15
Images
• Computer generate synthetic images• Lighting , shading and properties involve
many aspect of image formation
Applied Computer Science and Multimedia, SIE&T 16
Object and Viewers in CG
• Object references – Shape referred by object point to reference coordinate
system– Position– Geometric primitives : eg. point, line etc.
• Viewer• One who observe object ( man, camera etc.)• The same object different image for different place
Applied Computer Science and Multimedia, SIE&T 17
A’s view
B’s view C’s view
Image seen by three different viewers
Applied Computer Science and Multimedia, SIE&T 18
Image forming in real camera
Viewer and object are both in 3D system but the formed image is 2D
Applied Computer Science and Multimedia, SIE&T 19
Light and Images
• Make an image more realistic• Light from source strike and reflect from object
enter the camera give some surface detail to the viewer
A camera system with a light source
Applied Computer Science and Multimedia, SIE&T 20
Ray tracing
• The strike and illuminate ray that interact the object surface is the ray that make an image to viewer
Scene with single point source
Applied Computer Science and Multimedia, SIE&T 21
Ray tracing
A
B
C
D
E
F
Applied Computer Science and Multimedia, SIE&T 22
Source of light
• Light travels in straight line to object• Point source
– Light from single location emit equally in all direction• Light bulb
– Emitting over an area, more in one direction• More sources can be modeled by a number of
point sources• Monochromatic light : source of single frequency
Applied Computer Science and Multimedia, SIE&T 23
Receptor: Human Visual system
• Extremely complex • Response to 350 nm to 780 nm light• Sensor :3 type cone cell and 1 type of rod cell
The human visual system
• Resolution : how large object size that can see• Intensity: the measure of light energy• Brightness : how perceive intense light that
emitted form object• Eyes do not have the same response like
monochromatic– Red light and green light with same intensity have
different to us
Applied Computer Science and Multimedia, SIE&T 25
CIE standard observer curve
Cone sensitivity
Applied Computer Science and Multimedia, SIE&T 26
Pinhole Camera: How image build on projection plane
• Simple geometric model to understand how image contribute
Pinhole camera Side view of pinhole camera
• Properties– Infinite depth of field
• Disadvantage– Admits only single ray– Unable to adjust to different angle of view
q : view angle
Applied Computer Science and Multimedia, SIE&T 28
The synthetic camera model
• Learn to understand that the specification of the object is different from the viewer
Imaging system
Applied Computer Science and Multimedia, SIE&T 29
Equivalent views of image formation
(a) With image formed on the back of camera
(b) With image plane move in front of the camera
Applied Computer Science and Multimedia, SIE&T 30
Imaging with the synthetic camera
Applied Computer Science and Multimedia, SIE&T 31
Image Clipping
Clipping (a) with window in initial position, and (b) with window shifted.
Applied Computer Science and Multimedia, SIE&T 32
Application Programmer Interface
Applied Computer Science and Multimedia, SIE&T 33
Application model for programmer
Application programmer’s model of software
• Set of function reside in a graphics library• API should match the conceptual model that the user
wish to employ to the specific images• Available API: OpenGL, PHIGS, Direct3D, VRML
and JAVA-3D• Specification of the synthetic camera model
– Objects– Viewer– Light source– Material Properties
Applied Computer Science and Multimedia, SIE&T 35
Modeling - Rendering
• Renderer duty– Adding light source – Material properties– Other detail effect
The modeling-rendering pipeline
Applied Computer Science and Multimedia, SIE&T 36
Graphic Architecture
• Information had to be sent with high enough rate to avoid flicker
Early graphics system
Applied Computer Science and Multimedia, SIE&T 37
Display Processor
Display-processor architecture
Applied Computer Science and Multimedia, SIE&T 38
Pipeline: arithmetic processing pipeline
Arithmetic pipeline
Applied Computer Science and Multimedia, SIE&T 39
Object processed geometry
Geometric pipeline
Convert the object coordinate system to display system
Limit the image part on display
Project 3D object into 2D on display
2D image converted to pixel and store at frame buffer
Applied Computer Science and Multimedia, SIE&T 40
Performance characteristic
• Pipeline architecture• Floating point VLSI chip : able to do 4*4
matrix