Bài giảng Đồ họa hiện thực ảo - Bài 1: Kỹ thuật đồ họa và hiện thực ảo - Lê Tấn Hùng

Tổng quan về kỹ thuật đồ hoạ  
Lesson 1:  
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ạ  
‰ Hệ đồ họa tương tác (interactive)  
‰ Phần cứng đồ hoạ (Graphics Hardware)  
„
„
Kỹ Thuật đồ họa tiên tiến  
Hiện thực ảo - VRML  
Le Tan Hung  
(c) SE/FIT/HUT 2002  
(c) SE/FIT/HUT 2003  
2
4
6
A Brief History of Computer  
Graphics  
A Brief History of Computer  
Graphics  
1926 – J.L. Baird  
18
he  
n.  
18
picture camera  
1888 - Edison and Dickson  
record motion picture photos  
on a wax cylinder  
30 line vertical,  
black and red scan.  
(c) SE/FIT/HUT 2003  
3
(c) SE/FIT/HUT 2003  
A Brief History of Computer  
Graphics  
A Brief History of Computer  
Graphics  
1963  
1966  
„ Ralph Baer creates the 1st comsumer CG product:  
„ IBM creates the 360 models  
„ One of the First General  
Odyssey Pinball  
Purpose Mainframes  
„ SRI develops the mouse.  
(c) SE/FIT/HUT 2003  
5
(c) S
A Brief History of Computer  
Graphics  
A Brief History of Computer  
Graphics  
1968  
1967  
„ John Whitney: Permutations  
In "Permutations," (1968) he  
delineates a marvellous and exciting  
new world. One senses a  
„ GE introduces first full colour real time flight  
simulator for NASA  
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
10  
12  
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 gr
„
First time computer is used f
manipulation.  
1975  
„
Featured scenes that showed  
audiences the world viewed by the  
eye circuitry of a synthetic human  
(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.  
„ Mandelbrot plots fractals  
„ Bill Gates starts Microsoft  
(c) SE/FIT/HUT 2003  
9
(c) SE/FIT/HUT 2003  
A Brief History of Computer  
Graphics  
A Brief History of Computer  
Graphics  
1976  
1977  
„ Steve Jobs and Steve Wozniak start  
„ Star Wars wins oscar for  
Apple.  
special effects.  
1977  
1978  
„ Academy of Motion Pictures Art  
and Sciences introduces Visual  
Effects category for Oscars.  
•Superman wins oscar for  
special effects.  
(c) SE/FIT/HUT 2003  
11  
(c) SE/FIT/HUT 2003  
A Brief History of Computer  
Graphics  
A Brief History of Computer  
Graphics  
1980  
1979  
„ Disney’s TRON is the first  
live action film with over  
20 mins of computer  
animations.  
„ Alien wins oscar for visual  
effects.  
1980  
„ Seagate Technology  
releases the HDD for PCs  
•The Empire Strikes Back  
wins oscar for visual effects.  
(c) SE/FIT/HUT 2003  
13  
15  
17  
(c) SE/FIT/HUT 2003  
14  
16  
18  
A Brief History of Computer  
Graphics  
A Brief History of Computer  
Graphics  
1982  
1981 IBM introduces the first IBM PC (16 bit  
all computer animated  
visual effects shot for  
film.  
8088 chip)  
• Raiders of the  
Lost Ark wins  
an oscar for  
visual effects.  
(c) SE/FIT/HUT 2003  
(c) SE/FIT/HUT 2003  
A Brief History of Computer  
Graphics  
A Brief History of Computer  
Graphics  
„ 1984 PIXAR Opens  
1983  
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  
(c) SE/FIT/HUT 2003  
A Brief History of Computer  
A Brief History of Computer  
Graphics  
Graphics  
1989  
1990  
„ The Abyss is the first  
movie to include  
convincing 3D character  
animation.  
„ Windows 3.0 ships  
1993  
„ Myst  
1994  
„ Playstation and N64 released  
(c) SE/FIT/HUT 2003  
19  
21  
23  
(c) SE/FIT/HUT 2003  
20  
22  
24  
A Brief History of Computer  
A Brief History of Computer  
Graphics  
1995  
Graphics  
1996  
„ Quake Released by  
effects.  
Id Software  
„ Toy Story becomes  
the first fully 3D  
computer animation  
feature film.  
(c) SE/FIT/HUT 2003  
(c) SE/FIT/HUT 2003  
A Brief History of Computer  
A Brief History of Computer  
Graphics  
Graphics  
1997  
1998  
„ Titanic wins oscar  
„ Armageddon  
„ Mouse Hunt  
„ Bugs Life  
for visual effects.  
„ PIXAR wins oscar  
for best short film:  
Geri’s Game.  
1999  
„ The Matrix  
„ Star Wars: The Phantom Menace  
„ Disney’s Tarzan  
(c) SE/FIT/HUT 2003  
2003  
A Brief History of Computer  
Graphics  
Kỹ thuật đồ họa vi tính.  
„ Definition (ISO)  
„ Computer Graphics (Kỹ thuật đồ hoạ máy tính)  
2000  
2002 Microsoft’s XBOX  
„ Sony Playstation II  
„ Walking with Dinosaurs  
„ Disney’s Shrek  
„ Computer graphics deals with all aspects of  
creating images with a computer  
model –  
Interactive Computer Graphics:  
(c) SE/FIT/HUT 2003  
25  
27  
29  
(c) SE/FIT/HUT 2003  
26  
Kỹ thuật đồ hoạ điểm  
(Sample based-Graphics)  
Pascal / C  
Bitmap  
program  
SRGP  
„ Các mô hình, hình ảnh
thông qua từng pixel (
graphics algorithms  
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  
(c) SE/FIT/HUT 2003  
Kỹ thuật đồ hoạ vector  
Ví dụ về hình ảnh đồ hoạ Vector  
„ Vector = geometrical  
model + rendering  
Graphical  
Model  
Rendering  
Parameters  
Rendering  
Output  
Device  
(c) SE/FIT/HUT 2003  
(c) SE/FIT/HUT 2003  
30  
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  
Hair  
Render and Touch up  
Skin  
(c) SE/FIT/HUT 2003  
31  
33  
35  
(c) SE/FIT/HUT 2003  
32  
34  
36  
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
h
§å ho¹ ho¹t h×nh vµ  
nghÖ thuËt  
Kü thuËt ®å ho¹ ba chiÒu  
Kü thuËt ®å  
ho¹  
Xö lý ¶nh  
Xö lý ®å  
ho¹  
Kü thuËt nhËn d¹ng  
Kü thuËt ph©n tÝch vµ  
t¹o ¶nh  
(c) SE/FIT/HUT 2003  
(c) SE/FIT/HUT 2003  
Các ứng dụng tiêu biểu của kỹ  
thuật đồ họa  
ng (User Interface)  
„ Tạo các biểu đồ trong thương mại, khoa học, kỹ thuật  
„ Tự động hoá văn phòng và chế bản điện tử  
„ 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  
„ Điều khiển các quá trình sản xuất (Process Control)  
„ Lĩnh vực bản đồ (Cartography)  
Phân loại theo chức năng  
„ Kỹ thuật xử lý ảnh (COMPUTER IMAGING)  
„ Kỹ thuật nhận dạng (Computer Vision techniques  
attempt to provide meaning to computer) images.  
„ Kỹ thuật tổng hợp ảnh (Computer Graphics)  
„ Geometry modelling  
(c) SE/FIT/HUT 2003  
(c) SE/FIT/HUT 2003  
(c) SE/FIT/HUT 2003  
37  
39  
41  
(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  
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  
(c) SE/FIT/HUT 2003  
Thành phần trong chức năng của  
kỹ thuật đồ hoạ  
Các thành phần của hệ đồ hoạ tương tác  
G U I  
MODELING  
RENDERING  
DISPLAYING  
( to describe)  
(to capture)  
(to show)  
to the computer  
the description  
the image  
Application  
Application  
Program  
Graphics  
System  
what is  
create 2D image  
from 2D / 3D  
models  
generate  
image on  
screen  
Data  
a table, a car, •  
Structure  
• •  
Geometric Engine  
Rendering Engine  
Raster & Display Engine  
concerned with:  
- modeling  
concerned with :  
- viewing & projection  
- drawing & clipping  
primitives  
concerned with:  
- hardware  
- modeling transf.  
- color models  
- how to display  
(rasterization)  
- local illumination &  
shading  
Computer  
Graphics Devices  
- material property  
- lighting property  
- texture mapping  
- global rendering  
(c) SE/FIT/HUT 2003  
(c) SE/FIT/HUT 2003  
42  
3D Graphics Over World Wide  
Model of RGP  
Web  
Animation  
VRML  
WWW  
output pipeline  
Drawing  
Pascal / C  
program  
3D Graphics  
packages  
output primitives  
output attributes  
Canvascontrol  
projections  
transformation  
of objects  
lighting,shading  
SRGP  
library  
Application  
model  
Application  
program  
SRGP  
copyPixel  
graphics algorithms  
colour  
positions  
lines,areas,...  
Input device control  
Display Hardware  
Input device measures  
X Window  
System  
Graphics hardware  
input pipeline  
Image  
Video  
WWW  
(c) SE/FIT/HUT 2003  
43  
(c) SE/FIT/HUT 2003  
image formats, compression, transfer  
Bộ xử lý tương tác với người sử  
dụng  
Thành phần thư viện đồ hoạ  
„ 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  
c thiết bị vào ra (I/O System).  
ƒ
ƒ
ƒ
Điểm (pixel)  
Đường thẳng (line)  
Đường tròn (circle)  
„ hệ thống đồ hoạ sinh ra các thiết bị ngoại vi lôgic để tương tác  
giữa người sử dụng và thiết bị ngoại vi này.  
„ Đa giác (polygon) ..v..v.  
„ Các thuộc tính  
„ Một chu trình điển hình của các chương trình ứng dụng quản lý  
các thiết bị ngoại vi được gọi là vòng lặp sự kiện từ thiết bị  
(event-driven loop )  
ƒ Màu sắc (color)  
ƒ Kiểu đường vẽ (line style)  
ƒ Kiểu văn bản (text style)  
„ Mẫu tô (pattern).  
(c) SE/FIT/HUT 2003  
45  
(c) SE/FIT/HUT 2003  
46  
Hệ thống đồ hoạ  
(Graphics System)  
Giao diện hệthống đồhọa  
Interface of Graphics System  
„
„
Interface between application software and graphics hardware system  
Core,  
Consists of input subroutines and output subroutines accepting input data or  
commands from a user and converting internal representations into external  
pictures on screen, respectively  
GKS, GKS-3D  
CGI (device interface)  
CGM (metafile)  
PHIGS (3D and realtime)  
X-window  
PHIGS+ (PEX)  
IGES  
OpenGL  
Application program  
„
Phần mềm đồ hoạ hệ thống:  
„
Là tập hợp các lệnh đồ hoạ của hệ thống (graphics output commands),  
Graphics system  
Operating 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ư  
thế nào (how).  
„
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  
cứng nhất định và phụ thuộc vào phần cứng.  
DirectX  
Input and  
output devices  
Graphics  
hardware  
„
Phần cứng đồ hoạ:  
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  
các phần mềm đồ hoạ.  
(c) SE/FIT/HUT 2003  
47  
(c) SE/FIT/HUT 2003  
48  
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  
DIRECTX Direct X/Direct3D 1997  
„
„
GKS Functional Description, ANSI X3.124 - 1985.  
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  
52  
54  
OpenGL  
DirectX  
„
Direct control of graphics hardware  
Direct control of input/output devices, and sound  
„ Software interface to graphics  
„ Commands interpreted  
using client-server model  
hardware  
„ Client-server model  
„
„
ogram  
„ 250 distinct commands  
Server (OpenGL) interprets  
and processes commands  
„ Object specification + image  
Direct sound  
Direct input  
Direct draw  
Direct 3D  
……..  
generation  
Frame buffer configuration  
done by the window system  
Windows API  
„ Simple primitives: points, lines,  
polygons (pixels, images, bitmaps)  
„ 3D rendering  
Windows system  
(c) SE/FIT/HUT 2003  
51  
(c) SE/FIT/HUT 2003  
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  
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)  
tác  
ƒ Số lượng màu có thể vẽ trên một điểm  
„
Dot size  
„ InkJet 8 - 20/ 100 inch  
„ Laser 5/1000 inch  
„ Máy vẽ 6 ÷ 15/1000 inch  
Point per inch  
200 ÷600  
1500  
1000 ÷ 2000  
(c) SE/FIT/HUT 2003  
53  
(c) SE/FIT/HUT 2003  
Màn hình CRT  
Màn hình CRT  
Standard Dot-trio  
SONY Trinitron CRT  
Hitachi EDP  
NEC Hybrid Mask  
(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  
„ LINE  
„ LINE  
10,15  
400,30
600,80
Interface to  
host computer  
ay commands)  
(interaction data)  
15  
„ Refesh Buffer  
Display  
processor  
LINE  
100  
25  
CHAR  
LU  
CY  
LINE  
…
…
B
DrawLine(A, B):  
Turn beam off,  
move to A.  
Turn beam on,  
move to B.  
CRT  
Stylus  
A
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
(Display commands)  
(interaction data)  
Keyboard  
Data input  
Display  
processor  
00000000000000000000000001000000  
00000000000000000000000001000000  
00000000000000000000000111110000  
00000000011000000001111111111111  
00000000111100000000000111110000  
00000011111111000000000001000000  
00001111111111110000000001000000  
00111111111111111100000000000000  
00011111111111111000000000000000  
00011111111111111000000000000000  
00011111111111111000000000000000  
00000000000000000000000000000000  
CRT  
Bitmap refresh buffer  
(the 1’s are accentuated  
for contrast)  
(c) SE/FIT/HUT 2003  
59  
(c) SE/FIT/HUT 2003  
60  
LCD-Liquid Crystal Display  
CRT Displays  
„ A transmissive technology  
Advantages  
Disadvantages  
„ Works by letting varying  
amounts of a fixed-intensity  
white backlight through an  
active filter  
„ Fast repsonse (high  
„ Large and heavy (typ. 70x70  
resolution possible)  
cm, 15 kg)  
„ Full color (large modulation „ High power consumption (typ.  
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  
Hướng nghiên cứu  
LCD Displays  
Advantages  
Disadvantages  
„ Rendering  
„ Graphics accelerators  
„
„
„
Small footprint (approx 1/6 of CRT)  
Light weight (typ. 1/5 of CRT)  
High price (presently 3x CRT)  
„ photo-realism  
„ real-time  
Low power consumption (typ. 1
CRT)  
„ physically-based  
„
„
Low contrast and luminance (typ.  
1:100)  
Low luminance (typ. 200 cd/m2)  
„ image-based rendering  
„ non-photorealistic  
rendering  
„
„
Completely flat screen - no  
geometrical errors  
modeling  
„ level of detail  
Crisp pictures - digital and uniform  
„ Motion control /  
colors  
synthesis  
„ Scientific visualization  
„ Geometric algorithms  
„ User interface  
„
„
No electromagnetic emission  
„ kinematics / dynamics  
Fully digital signal processing  
possible  
„ motion capture/  
modification  
„
Large screens (>20 inch) on desktops  
(c) SE/FIT/HUT 2003  
63  
(c) SE/FIT/HUT 2003  
64  
pdf 11 trang yennguyen 20940 Free
Bạn đang xem tài liệu "Bài giảng Đồ họa hiện thực ảo - Bài 1: Kỹ thuật đồ họa và hiện thực ảo - Lê Tấn Hùng", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pdfbai_giang_do_hoa_hien_thuc_ao_bai_1_ky_thuat_do_hoa_va_hien.pdf