Xem mẫu
- Khoa CNTT - ĐHBK Hà nội
Email: hunglt@it-hut.edu.vn
Tel: 0913030731
Lesson 1: Tổng quan về kỹ thuật đồ hoạ
Kỹ thuật đồ họa và Hiện thực ảo
Computer Graphics And Virtual Reality Các khái niệm tổng quan của kỹ thuật đồ hoạ máy
tính
Các kỹ thuật đồ hoạ
Kỹ Thuật đồ họa cơ sở Phân loại các lĩnh vực của kỹ thuật đồ hoạ
Kỹ Thuật đồ họa tiên tiến Hệ đồ họa tương tác (interactive)
Hiện thực ảo - VRML
Phần cứng đồ hoạ (Graphics Hardware)
Le Tan Hung
hunglt@it-hut.edu.vn
(c) SE/FIT/HUT 2002 (c) SE/FIT/HUT 2003 2
A Brief History of Computer A Brief History of Computer
Graphics Graphics
1926 – J.L. Baird
1885 - CRT (Cathode Ray Tube) invents the
1887 - Edison patents motion television.
picture camera
1888 - Edison and Dickson 30 line vertical,
record motion picture photos black and red scan.
on a wax cylinder
(c) SE/FIT/HUT 2003 3 (c) SE/FIT/HUT 2003 4
A Brief History of Computer A Brief History of Computer
Graphics Graphics
1963 1966
IBM creates the 360 models Ralph Baer creates the 1st comsumer CG product:
One of the First General
Purpose Mainframes
Odyssey Pinball
SRI develops the mouse.
(c) SE/FIT/HUT 2003 5 (c) SE/FIT/HUT 2003 6
CuuDuongThanCong.com https://fb.com/tailieudientucntt
1
- Khoa CNTT - ĐHBK Hà nội
Email: hunglt@it-hut.edu.vn
Tel: 0913030731
A Brief History of Computer A Brief History of Computer
Graphics Graphics
1968
1967 John Whitney: Permutations
GE introduces first full colour real time flight In "Permutations," (1968) he
simulator for NASA delineates a marvellous and exciting
new world. One senses a
choreographer. The movements are
reminiscent of traditional ballet. The
shapes follow the dictates of formal
geometry more than those of abstract
painting. Movement is three-
dimensional and the ambition for a
more polished three-dimensional
shaded space is apparent.
(c) SE/FIT/HUT 2003 7 (c) SE/FIT/HUT 2003 8
A Brief History of Computer A Brief History of Computer
Graphics Graphics
1973 1974
Michael Crichton’s Intel develop the 8080 processor.
“Westworld” uses 2D graphics
First time computer is used for image
manipulation.
Featured scenes that showed 1975
audiences the world viewed by the
eye circuitry of a synthetic human Mandelbrot plots fractals
(played by a very real Yul Brenner) in
a future Western theme park. This
effect was achieved with 2D
computer graphics tools mostly
derived from image processing
techniques. Bill Gates starts Microsoft
(c) SE/FIT/HUT 2003 9 (c) SE/FIT/HUT 2003 10
A Brief History of Computer A Brief History of Computer
Graphics Graphics
1976 1977
Steve Jobs and Steve Wozniak start Star Wars wins oscar for
Apple.
special effects.
1977
Academy of Motion Pictures Art 1978
and Sciences introduces Visual •Superman wins oscar for
Effects category for Oscars. special effects.
(c) SE/FIT/HUT 2003 11 (c) SE/FIT/HUT 2003 12
CuuDuongThanCong.com https://fb.com/tailieudientucntt
2
- Khoa CNTT - ĐHBK Hà nội
Email: hunglt@it-hut.edu.vn
Tel: 0913030731
A Brief History of Computer A Brief History of Computer
Graphics Graphics
1979 1980
Alien wins oscar for visual Disney’s TRON is the first
live action film with over
effects.
20 mins of computer
animations.
1980 Seagate Technology
•The Empire Strikes Back releases the HDD for PCs
wins oscar for visual effects.
(c) SE/FIT/HUT 2003 13 (c) SE/FIT/HUT 2003 14
A Brief History of Computer A Brief History of Computer
Graphics Graphics
1982
1981 IBM introduces the first IBM PC (16 bit The Genesis Effect (ILM)
8088 chip)
for Startrek II is the first
all computer animated
• Raiders of the visual effects shot for
Lost Ark wins film.
an oscar for
visual effects.
(c) SE/FIT/HUT 2003 15 (c) SE/FIT/HUT 2003 16
A Brief History of Computer A Brief History of Computer
Graphics Graphics
1983 1984 PIXAR Opens
1985
First Coke Polar Bears
Commercial The Last Starfighter is the
first live action feature film
with realistic computer
animation of highly detailed
models.
(c) SE/FIT/HUT 2003 17 (c) SE/FIT/HUT 2003 18
CuuDuongThanCong.com https://fb.com/tailieudientucntt
3
- Khoa CNTT - ĐHBK Hà nội
Email: hunglt@it-hut.edu.vn
Tel: 0913030731
A Brief History of Computer A Brief History of Computer
Graphics Graphics
1989 1990
The Abyss is the first Windows 3.0 ships
movie to include
convincing 3D character 1993
animation. Myst
1994
Playstation and N64 released
(c) SE/FIT/HUT 2003 19 (c) SE/FIT/HUT 2003 20
A Brief History of Computer A Brief History of Computer
Graphics Graphics
1995 1996
Quake Released by Independence Day
Id Software wins oscar for visual
effects.
Toy Story becomes
the first fully 3D
computer animation
feature film.
(c) SE/FIT/HUT 2003 21 (c) SE/FIT/HUT 2003 22
A Brief History of Computer A Brief History of Computer
Graphics Graphics
1997 1998
Titanic wins oscar Armageddon
for visual effects. Mouse Hunt
Bugs Life
PIXAR wins oscar
for best short film: 1999
Geri’s Game. The Matrix
Star Wars: The Phantom Menace
Disney’s Tarzan
(c) SE/FIT/HUT 2003 23 (c) SE/FIT/HUT 2003 24
CuuDuongThanCong.com https://fb.com/tailieudientucntt
4
- Khoa CNTT - ĐHBK Hà nội
Email: hunglt@it-hut.edu.vn
Tel: 0913030731
A Brief History of Computer
Graphics Kỹ thuật đồ họa vi tính.
2000 2002 Microsoft’s XBOX Definition (ISO)
Sony Playstation II Computer Graphics (Kỹ thuật đồ hoạ máy tính)
Walking with Dinosaurs Computer graphics deals with all aspects of
Disney’s Shrek creating images with a computer
model –
Interactive Computer Graphics:
(c) SE/FIT/HUT 2003 25 (c) SE/FIT/HUT 2003 26
Kỹ thuật đồ hoạ điểm
Pascal / C
(Sample based-Graphics) Bitmap program
SRGP
Các mô hình, hình ảnh của các đối tượng được hiển thị library
thông qua từng pixel (từng mẫu rời rạc) graphics algorithms
positions colour
Đặc điểm: lines,areas,...
Phương pháp để tạo ra các pixel
X Window
System Graphics hardware
Image
image formats, compression, transfer
(c) SE/FIT/HUT 2003 27 (c) SE/FIT/HUT 2003
Kỹ thuật đồ hoạ vector Ví dụ về hình ảnh đồ hoạ Vector
Vector = geometrical
Graphical Rendering
Model Parameters model + rendering
Rendering
Output
Device
(c) SE/FIT/HUT 2003 29 (c) SE/FIT/HUT 2003 30
CuuDuongThanCong.com https://fb.com/tailieudientucntt
5
- Khoa CNTT - ĐHBK Hà nội
Email: hunglt@it-hut.edu.vn
Tel: 0913030731
Raster and Vector Graphics
Raster
Hình ảnh và mô hình của các vật thể được biểu diễn bởi tập hợp các
điểm của grid
Wireframe Model Skeletal Model Muscle Model Thay đổi thuộc tính của các pixel => thay đổi từng phần và từng vùng
của hình ảnh.
Copy được các pixel từ một hình ảnh này sang hình ảnh khác.
Vector
Không thay đổi thuộc tính của từng điểm trực tiếp
Xử lý với từng thành phần hình học cơ sở của nó và thực hiện quá
trình tô trát và hiển thị lại.
Quan sát hình ảnh và mô hình của hình ảnh và sự vật ở nhiều góc
độ khác nhau bằng cách thay đổi điểm nhìn và góc nhìn.
© Walt Disney and TSL
Skin Hair Render and Touch up
(c) SE/FIT/HUT 2003 31 (c) SE/FIT/HUT 2003 32
Phân loại các lĩnh vực của
Computer Graphics Phân loại theo hệ toạ độ
Kü thuËt ®å ho¹ 2 chiÒu
CAD/CAM System
KiÕn t¹o ®å
ho¹ §å ho¹ minh ho¹ Kü thuËt ®å ho¹
§å ho¹ ho¹t h×nh vµ Kü thuËt ®å ho¹ ba chiÒu
Kü thuËt ®å nghÖ thuËt
ho¹
Xö lý ¶nh
Xö lý ®å Kü thuËt nhËn d¹ng
ho¹
Kü thuËt ph©n tÝch vµ
t¹o ¶nh
(c) SE/FIT/HUT 2003 33 (c) SE/FIT/HUT 2003 34
Các ứng dụng tiêu biểu của kỹ
Phân loại theo chức năng thuật đồ họa
Kỹ thuật xử lý ảnh (COMPUTER IMAGING) Xây dựng giao diện người dùng (User Interface)
Tạo các biểu đồ trong thương mại, khoa học, kỹ thuật
Kỹ thuật nhận dạng (Computer Vision techniques Tự động hoá văn phòng và chế bản điện tử
attempt to provide meaning to computer) images. Thiết kế với sự trợ giúp của máy tính (CAD_CAM)
Lĩnh vực giải trí, nghệ thuật và mô phỏng
Kỹ thuật tổng hợp ảnh (Computer Graphics)
Điều khiển các quá trình sản xuất (Process Control)
Geometry modelling Lĩnh vực bản đồ (Cartography)
(c) SE/FIT/HUT 2003 35 (c) SE/FIT/HUT 2003 36
CuuDuongThanCong.com https://fb.com/tailieudientucntt
6
- Khoa CNTT - ĐHBK Hà nội
Email: hunglt@it-hut.edu.vn
Tel: 0913030731
(c) SE/FIT/HUT 2003 37 (c) SE/FIT/HUT 2003 38
CAD-CAM application Hệ đồ họa tương tác
Mô hình hệ đồ hoạ tương tác
Các thành phần của hệ đồ hoạ tương tác
Bộ xử lý tương tác với người sử dụng
Các chuẩn của hệ đồ hoạ
(c) SE/FIT/HUT 2003 39 (c) SE/FIT/HUT 2003 40
Thành phần trong chức năng của
kỹ thuật đồ hoạ Các thà
thành phầ
phần của hệ đồ hoạ
hoạ tương tác
GUI
MODELING RENDERING DISPLAYING
( to describe) (to capture) (to show)
to the computer the description the image Application
what is create 2D image generate Application Graphics
Data
a table, a car, • from 2D / 3D image on Structure Program System
•• models screen
Geometric Engine Rendering Engine Raster & Display Engine
concerned with:
- modeling concerned with : concerned with:
- viewing & projection
- modeling transf. - drawing & clipping - hardware
primitives
- color models - local illumination &
shading
- how to display Computer Graphics Devices
- material property - texture mapping (rasterization)
- lighting property - global rendering
(c) SE/FIT/HUT 2003 41 (c) SE/FIT/HUT 2003 42
CuuDuongThanCong.com https://fb.com/tailieudientucntt
7
- Khoa CNTT - ĐHBK Hà nội
Email: hunglt@it-hut.edu.vn
Tel: 0913030731
3D Graphics Over World Wide
Model of RGP Web Animation
VRML
output pipeline Drawing Pascal / C
packages program 3D Graphics WWW
output primitives
transformation projections
output attributes
of objects SRGP lighting,shading
Application Application
Canvascontrol library
model program SRGP
copyPixel
graphics algorithms
Input device control positions lines,areas,... colour
Display Hardware
Input device measures
X Window
System
input pipeline Graphics hardware
WWW Image
(c) SE/FIT/HUT 2003 43 Video (c) SE/FIT/HUT 2003
image formats, compression, transfer
Bộ xử lý tương tác với người sử
Thành phần thư viện đồ hoạ dụng
Các thực thể cơ sở
Hệ thống đồ hoạ thông thường phải chứa một tập hợp các thủ tục
Điểm (pixel)
Đường thẳng (line) (chương trình con) để xử lý với các thiết bị vào ra (I/O System).
Đường tròn (circle) hệ thống đồ hoạ sinh ra các thiết bị ngoại vi lôgic để tương tác
Đa giác (polygon) ..v..v.
giữa người sử dụng và thiết bị ngoại vi này.
Các thuộc tính
Màu sắc (color) Một chu trình điển hình của các chương trình ứng dụng quản lý
Kiểu đường vẽ (line style) các thiết bị ngoại vi được gọi là vòng lặp sự kiện từ thiết bị
Kiểu văn bản (text style) (event-driven loop )
Mẫu tô (pattern).
(c) SE/FIT/HUT 2003 45 (c) SE/FIT/HUT 2003 46
Hệ thống đồ hoạ Giao diện hệ thống đồhọa
(Graphics System) Interface of Graphics System
Interface between application software and graphics hardware system
Core,
Consists of input subroutines and output subroutines accepting input data or
GKS, GKS-3D
commands from a user and converting internal representations into external
CGI (device interface) Application program
pictures on screen, respectively
CGM (metafile)
Phần mềm đồ hoạ hệ thống:
PHIGS (3D and realtime)
Là tập hợp các lệnh đồ hoạ của hệ thống (graphics output commands),
X-window Graphics system
Thực hiện công việc hiển thị cái gì (what object) và chúng sẽ được hiển thị như
PHIGS+ (PEX)
thế nào (how).
IGES
Phần mềm đồ hoạ hệ thống là phần mềm xây dựng trên cơ sở một thể loại phần
OpenGL
Operating system
cứng nhất định và phụ thuộc vào phần cứng.
DirectX
Phần cứng đồ hoạ: Input and Graphics
Metafiles
Là tập hợp các thiết bị điện tử (CPU, bộ nhớ màn hình) giúp cho việc thực hiện output devices hardware
các phần mềm đồ hoạ.
(c) SE/FIT/HUT 2003 47 (c) SE/FIT/HUT 2003 48
CuuDuongThanCong.com https://fb.com/tailieudientucntt
8
- Khoa CNTT - ĐHBK Hà nội
Email: hunglt@it-hut.edu.vn
Tel: 0913030731
Non-official industry standards
Các chuẩn giao diện của hệ đồ hoạ Các chuẩn của hệ đồ hoạ
GKS (Graphics Kernel System): OPENGL SGI’s OpenGL 1993
GKS Functional Description, ANSI X3.124 - 1985. DIRECTX Direct X/Direct3D 1997
GKS - 3D Functional Description, ISO Doc #8805:1988.
CGI (Computer Graphics Interface System):
CGM (Computer Graphics Metafile):
VRML (Virtual Reality Modeling Language):
PHIGS (Programmers Hierarchical Interactive
PHIGS Functional Description, ANSI X3.144 - 1985.
PHIGS+ Functional Description, 1988, 1992.
IGES
(c) SE/FIT/HUT 2003 49 (c) SE/FIT/HUT 2003 50
OpenGL DirectX
Software interface to graphics Commands interpreted Direct control of graphics hardware
hardware using client-server model Direct control of input/output devices, and sound
Client-server model Client (Application) issues
commands Application
Applicationprogram
program
250 distinct commands
Server (OpenGL) interprets
Object specification + image and processes commands Direct sound
Direct X
generation Direct input
Frame buffer configuration
Simple primitives: points, lines, Windows
WindowsAPI
API Direct draw
done by the window system
Direct 3D
polygons (pixels, images, bitmaps) ……..
3D rendering
Windows
Windowssystem
system
(c) SE/FIT/HUT 2003 51 (c) SE/FIT/HUT 2003 52
Phần cứng đồ hoạ (Graphics
Các thiết bị vào ra dữ liệu Hardware)
Máy in
Các thành phần phần cứng của hệ đồ hoạ tương
Dot size: đường kính của một điểm in bé nhất mà máy tác
in có thể in được
Addressability: khả năng địa chỉ hoá các điểm in có thể
có trên một đơn vị độ dài (dot per inch)
Số lượng màu có thể vẽ trên một điểm
Dot size Point per inch
InkJet 8 - 20/ 100 inch 200 ÷600
Laser 5/1000 inch 1500
Máy vẽ 6 ÷ 15/1000 inch 1000 ÷ 2000
(c) SE/FIT/HUT 2003 53 (c) SE/FIT/HUT 2003 54
CuuDuongThanCong.com https://fb.com/tailieudientucntt
9
- Khoa CNTT - ĐHBK Hà nội
Email: hunglt@it-hut.edu.vn
Tel: 0913030731
Màn hình CRT Màn hình CRT
Standard Dot-trio SONY Trinitron CRT
NEC Hybrid Mask Hitachi EDP
(c) SE/FIT/HUT 2003 55 (c) SE/FIT/HUT 2003 56
Các thiết bị hiển thị dạng vector Graphics Devices
MOVE 10,15
LINE 400,300 …
… (Display commands) Interface to
MOVE
LINE 600,800 10 host computer
15 (interaction data)
Refesh Buffer LINE Display
100 processor
25
CHAR
B
DrawLine(A, B): LU
CY
CRT
Turn beam off,
LINE
move to A.
Turn beam on,
… Stylus
A …
move to B. JMP
Refresh buffer memory Alphanumeric keyboard Data tablet
(c) SE/FIT/HUT 2003 57 (c) SE/FIT/HUT 2003 58
Typical raster graphics display
showing a house and a star Các thiết bị hiển thị dạng điểm
Interface to host computer
(Display commands) (interaction data)
Display Keyboard
00000000000000000000000001000000
processor Data input
00000000000000000000000001000000
00000000000000000000000111110000
00000000011000000001111111111111
00000000111100000000000111110000
00000011111111000000000001000000 CRT
00001111111111110000000001000000
00111111111111111100000000000000
00011111111111111000000000000000
00011111111111111000000000000000
00011111111111111000000000000000
00000000000000000000000000000000
Bitmap refresh buffer
(the 1’s are accentuated
for contrast)
(c) SE/FIT/HUT 2003 59 (c) SE/FIT/HUT 2003 60
CuuDuongThanCong.com https://fb.com/tailieudientucntt
10
- Khoa CNTT - ĐHBK Hà nội
Email: hunglt@it-hut.edu.vn
Tel: 0913030731
LCD-Liquid Crystal Display CRT Displays
A transmissive technology Advantages Disadvantages
Works by letting varying Fast repsonse (high Large and heavy (typ. 70x70
amounts of a fixed-intensity resolution possible) cm, 15 kg)
white backlight through an Full color (large modulation High power consumption (typ.
active filter depth of E-beam) 140W)
Organnic crystals that lign Saturated and natural colors Harmful DC and AC electric
themselves together and magnetic fields
Inexpensive, matured
When external force is applied technology Flickering at 50-80 Hz (no
they realign themselves memory effect)
Wide angle, high contrast
This is used to change and brightness Geometrical errors at edges
polarisation and filter light
(c) SE/FIT/HUT 2003 61 (c) SE/FIT/HUT 2003 62
Future Research Areas
LCD Displays Hướng nghiên cứu
Advantages Disadvantages Rendering
Graphics accelerators
Small footprint (approx 1/6 of CRT) High price (presently 3x CRT)
parallel processing photo-realism
Light weight (typ. 1/5 of CRT) Poor viewing angle (typ. +/- 50
Low power consumption (typ. 1/4 of degrees)
Geometric modeling real-time
CRT)
Low contrast and luminance (typ. physically-based image-based rendering
Completely flat screen - no 1:100) modeling
geometrical errors level of detail non-photorealistic
Crisp pictures - digital and uniform Low luminance (typ. 200 cd/m2)
Motion control / rendering
colors
No electromagnetic emission
synthesis Scientific visualization
Fully digital signal processing kinematics / dynamics Geometric algorithms
possible motion capture/ User interface
Large screens (>20 inch) on desktops modification
(c) SE/FIT/HUT 2003 63 (c) SE/FIT/HUT 2003 64
CuuDuongThanCong.com https://fb.com/tailieudientucntt
11
nguon tai.lieu . vn