Đồ họa hiện thực ảo - Bài 1 Intro - EN version (HUST) GV. Lê Tấn Hùng

LI
lienhejb
0 次下载
12
0

资料内容

第 1 页

Khoa CNTT - ĐHBK Hà nội Email: hunglt@it-hut.edu.vn Tel: 0913030731 A Brief History of Computer Graphics Lesson 1: Kỹ thuật đồ họa và Hiện thực ảo Computer Graphics And Virtual Reality 1885 - CRT (Cathode Ray Tube) 1887 - Edison patents motion z Kỹ Thuật đồ họa cơ sở picture camera z Kỹ Thuật đồ họa tiên tiến z Hiện thực ảo - VRML 1888 - Edison and Dickson Le Tan Hung record motion picture photos hunglt@it-hut.edu.vn on a wax cylinder 1 2 A Brief History of Computer Graphics Computer Graphics: 1960-1970 1926 – J.L. Baird z 1960 William Fetter (Thuật ngữ kỹ thuật invents the đồ hoạ máy tính (Computer Graphics) z 1960 - SAGE (Semi-Automatic Ivan Sutherland’s PhD television. Ground Environment System) Bút z sáng thesis at MIT 1960-1963 Dự án Sketchpad tại MIT – Vấn đề tương tác người z máy z 1963 Ivan shutherland (hội nghị Fall Loop – 30 line vertical, Joint Computer - lần đầu tiên khả năng Display something tạo mới, hiển thị và thay đổi được thực z black and red scan. z User moves light pen hiện trong thời gian thực trên màn Computer generates new CRT z ) display z Wireframe graphics – Sutherland tạo ra rất nhiều z Display Processors thuật toán cho CG z Storage tube 3 4 A Brief History of Computer A Brief History of Computer Graphics Graphics 1963 z 1966 Ralph Baer creates the 1st comsumer CG z IBM creates the 360 models product: – One of the First General Purpose – Odyssey Pinball Mainframes 1967 z z SRI develops the mouse. GE introduces first full colour – real time flight simulator for NASA 5 6 goupee.com fb.com/groups/goupee 1

第 2 页

Khoa CNTT - ĐHBK Hà nội Email: hunglt@it-hut.edu.vn Tel: 0913030731 Lịch sử phát triển A Brief History of Computer 1970-1980 Graphics 1973 z CG:1970-1980 Raster Graphics z Michael Crichton’s “Westworld” z uses 2D graphics z Beginning of graphics z First time computer is used for image standards manipulation. z Featured scenes that showed – IFIPS audiences the world viewed by the GKS: European effort eye circuitry of a synthetic human z (played by a very real Yul Brenner) in – Becomes ISO 2D standard a future Western theme park. This z Core: North American effort effect was achieved with 2D computer – 3D but fails to become ISO graphics tools mostly derived from standard image processing techniques. 7 8 A Brief History of Computer A Brief History of Computer Graphics Graphics 1974 z 1977 Star Wars wins oscar for special Intel develop the 8080 processor. effects. z z 1978 Superman wins oscar for special 1975 effects z Mandelbrot plots fractals z Bill Gates starts Microsoft z 1979 Alien wins oscar for visual effects. 1976 z 1980 The Empire Strikes Back wins oscar z Steve Jobs and Steve Wozniak start Apple. for visual effects. 1977 z Academy of Motion Pictures Art and Sciences introduces Visual Effects category for Oscars. 9 10 A Brief History of Computer 80-90 Graphics z CG: 1980-1990 1981 Special purpose hardware IBM introduces the first IBM PC (16 bit 8088 – Silicon Graphics geometry engine chip) z – VLSI implementation of graphics pipeline – Industry-based standards z PHIGS • Raiders of the z RenderMan Lost Ark wins – Networked graphics: X Window System an oscar for – Human-Computer Interface (HCI) visual effects. 11 12 goupee.com fb.com/groups/goupee 2

第 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 1982 1983 z 1984 PIXAR Opens z The Genesis Effect (ILM) z First Coke Polar Bears for Startrek II is the first all Commercial computer animated visual effects shot for film. 13 14 A Brief History of Computer Lịch sử phát triển Graphics 90-00 1985 z CGraphics: 2000-03 z CGraphics: 1990-2000 OpenGL API z Photorealism z The Last Starfighter is the first live z action feature film with realistic Tạo ra bộ phim hoạt hình hoàn z Graphics cards for PCs computer animation of highly detailed z dominate market models. chỉnh đầu tiên (Toy Story) – Nvidia, ATI, 3DLabs 1989 z Khả năng mới của phần Game boxes and game players z cứng push the market z The Abyss is the first movie to include Texture mapping convincing 3D character animation. – z CGraphics trở thành công cụ – Blending cho công nghiệp sản xuất – Accumulation, stencil buffer phim: Maya, Lightwave 15 16 A Brief History of Computer A Brief History of Computer Graphics Graphics 1995 1996 z Quake Released by z Independence Day wins Id Software oscar for visual effects. z Toy Story becomes 1997 the first fully 3D computer animation z Titanic wins oscar for visual feature film. effects. z PIXAR wins oscar for best short film: Geri’s Game. 17 18 goupee.com fb.com/groups/goupee 3

第 4 页

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 1998 2000 2002 Microsoft’s XBOX z Armageddon z Sony Playstation II z Mouse Hunt z Walking with Dinosaurs z Bugs Life z Disney’s Shrek 1999 z The Matrix z Star Wars: The Phantom Menace z Disney’s Tarzan 19 20 Kỹ thuật đồ họa vi tính. Kỹ thuật đồ hoạ điểm (Sample based-Graphics) z Definition (ISO) – Method and Technologies for converting data to and from a graphics devices via a computer z Các mô hình, hình ảnh của các đối tượng được hiển thị z Computer Graphics (Kỹ thuật đồ hoạ máy tính) là một lĩnh thông qua từng pixel (từng mẫu rời rạc) vực của Công nghệ thông tin mà ở đó nghiên cứu, xây z Đặc điểm: dựng và tập hợp các công cụ (mô hình lý thuyết và phần – Có thể thay đổi thuộc tính mềm) khác nhau để: – Xoá đi từng pixel của mô hình và hình ảnh các đối tượng. z kiến tạo, lưu trữ, xử lý Các mô hình (model) và hình ảnh – Các mô hình hình ảnh được hiển thị như một lưới điểm (grid) các (image) của đối tượng pixel rời rạc, z Computer graphics deals with all aspects of creating – Từng pixel đều có vị trí xác định, được hiển thị với một giá trị rời rạc images with a computer (số nguyên) các thông số hiển thị (màu sắc hoặc độ sáng) – Tập hợp tất cả các pixel của grid cho chúng ta mô hình, hình ảnh đối Interactive Computer Graphics: - user controls contents, structure, and tượng mà chúng ta muốn hiển thị appearance of objects and their displayed images via rapid visual feedback. 21 22 BitmapBitmap Pascal / C Kỹ thuật đồ hoạ vector program SRGP z Mô hình hình học (geometrical library Graphical Rendering model) cho mô hình hoặc hình ảnh Model Parameters của đối tượng graphics algorithms Xác định các thuộc tính của mô positions z lines,areas,... colour hình hình học này, z Quá trình tô trát (rendering) để hiển X Window thị từng điểm của mô hình, hình System Graphics hardware ảnh thực của đối tượng Rendering z Vector = geometrical model + rendering Image image formats, compression, transfer Output 23 24 Device goupee.com fb.com/groups/goupee 4

第 5 页

Khoa CNTT - ĐHBK Hà nội Email: hunglt@it-hut.edu.vn Tel: 0913030731 Ví dụ về hình ảnh đồ hoạ Vector Wireframe Model Skeletal Model Muscle Model © Walt Disney and TSL 25 26 Skin Hair Render and Touch up Phân loại các lĩnh vực của Raster and Vector Graphics Computer Graphics z 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 CAD/CAM System điểm của grid KiÕn t¹o ®å – Thay đổi thuộc tính của các pixel => thay đổi từng phần và từng vùng ho¹ §å ho¹ minh ho¹ của hình ảnh. – Copy được các pixel từ một hình ảnh này sang hình ảnh khác. §å ho¹ ho¹t h×nh vμ z Vector Kü thuËt ®å nghÖ thuËt – Không thay đổi thuộc tính của từng điểm trực tiếp ho¹ 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á Xö lý ¶nh – trình tô trát và hiển thị lại. Xö lý ®å Kü thuËt nhËn d¹ng – Quan sát hình ảnh và mô hình của hình ảnh và sự vật ở nhiều góc ho¹ độ khác nhau bằng cách thay đổi điểm nhìn và góc nhìn. Kü thuËt ph©n tÝch vμ t¹o ¶nh 27 28 Phân loại theo hệ toạ độ Phân loại theo chức năng Kü thuËt ®å ho¹ 2 chiÒu z Kỹ thuật xử lý ảnh (COMPUTER IMAGING) Kü thuËt ®å ho¹ Kỹ thuật nhận dạng (Computer Vision techniques z Kü thuËt ®å ho¹ ba chiÒu attempt to provide meaning to computer) images. ƒ Kỹ thuật đồ hoạ hai chiều: là kỹ thuật đồ hoạ máy tính sử dụng hệ Kỹ thuật tổng hợp ảnh (Computer Graphics) toạ độ hai chiều (hệ toạ độ phẳng), sử dụng rất nhiều trong kỹ z thuật xử lý bản đồ, đồ thị. Kỹ thuật đồ hoạ ba chiều: là kỹ thuật đồ hoạ máy tính sử dụng hệ z Geometry modelling ƒ toạ độ ba chiều, đòi hỏi rất nhiều tính toán và phức tạp hơn nhiều so với kỹ thuật đồ hoạ hai chiều. 29 30 goupee.com fb.com/groups/goupee 5

第 6 页

Khoa CNTT - ĐHBK Hà nội Email: hunglt@it-hut.edu.vn Tel: 0913030731 Các ứng dụng tiêu biểu của kỹ thuật đồ họa z Xây dựng giao diện người dùng (User Interface) z Tạo các biểu đồ trong thương mại, khoa học, kỹ thuật, minh họa z Tự động hoá văn phòng và chế bản điện tử z Thiết kế với sự trợ giúp của máy tính (CAD_CAM) z Lĩnh vực giải trí, nghệ thuật và mô phỏng z Điều khiển các quá trình sản xuất (Process Control) z Lĩnh vực bản đồ (Cartography) GIS 31 32 Square: Final Fantasy 33 34 Pixar: Monster’s Inc. Computer Aided Design (CAD) CAD-CAM application 35 36 goupee.com fb.com/groups/goupee 6

第 7 页

Khoa CNTT - ĐHBK Hà nội Email: hunglt@it-hut.edu.vn Tel: 0913030731 Mô hình Hệ đồ họa ƒ Mô hình hệ thống ƒ Mô hình chức năng ƒ Các chuẩn của hệ đồ hoạ 37 38 Hệ thống đồ hoạ Mô hình hệ thống đồ họa (Graphics System) z Interface between application software and graphics hardware system Core, Consists of input subroutines and output subroutines accepting input data or z GKS, GKS-3D Application program commands from a user and converting internal representations into external CGI (device interface) pictures on screen, respectively CGM (metafile) z 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ư thế – PHIGS+ (PEX) nào (how). IGES Operating system – 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 cứng nhất định và phụ thuộc vào phần cứng. DirectX z Phần cứng đồ hoạ: Input and Graphics – 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 output devices hardware Metafiles phần mềm đồ hoạ. 39 40 Thành phần trong chức năng của kỹ thuật đồ hoạ 3D Graphics Over World Wide Web3D Graphics Over World Wide Web G U I Animation VRML Drawing Pascal / C packages program 3D Graphics WWW MODELING RENDERING DISPLAYING transformation projections ( to describe) (to capture) (to show) SRGP lighting,shading to the computer the description of objects the image library what is create 2D image generate a table, a car, • from 2D / 3D image on graphics algorithms • • models screen positions lines,areas,... colour Geometric Engine Rendering Engine Raster & Display Engine concerned with: concerned with : X Window - modeling concerned with: System - modeling transf. - viewing & projection - hardware Graphics hardware - color models - drawing & clipping - how to display primitives (rasterization) - material property - lighting property - local illumination & WWW Image shading 41 - texture mapping 42 Video image formats, compression, transfer goupee.com fb.com/groups/goupee 7

第 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ạ z GKS (Graphics Kernel System): chuẩn xác định các hàm đồ hoạ chuẩn, được thiết kế như một tập hợp các công cụ đồ hoạ hai chiều và ba chiều. z OPENGL thư viện đồ họa của hãng Silicon – GKS Functional Description, ANSI X3.124 - 1985. Graphics, được xây dựng theo đúng chuẩn của một – GKS - 3D Functional Description, ISO Doc #8805:1988. hệ đồ họa. z CGI (Computer Graphics Interface System): hệ chuẩn cho các phương pháp – SGI’s OpenGL 1993 giao tiếp với các thiết bị ngoại vi. DIRECTX thư viện đồ hoạ của hãng Microsoft CGM (Computer Graphics Metafile): xác định các chuẩn cho việc lưu trữ và z z chuyển đổi hình ảnh. – Direct X/Direct3D 1997 z VRML (Virtual Reality Modeling Language): ngôn ngữ thực tại ảo, một hướng phát triển trong công nghệ hiển thị được đề xuất bởi hãng Silicon Graphics, sau đó đã được chuẩn hóa như một chuẩn công nghiệp. z PHIGS (Programmers Hierarchical Interactive Graphics Standard): xác định các phương pháp chuẩn cho các mô hình thời gian thực và lập trình hướng đối tượng. – PHIGS Functional Description, ANSI X3.144 - 1985. – PHIGS+ Functional Description, 1988, 1992. 43 44 OpenGL OpenGL-related Libraries Software interface to graphics z Commands interpreted using z Window tasks z client-server model hardware z User input For portability, there are z Client-server model – Client (Application) issues no commands for these. commands z Complicated shapes z 250 distinct commands – Server (OpenGL) interprets z Object specification + image and processes commands – OpenGL Utility Library (GLU) generation Window system support libraries – Frame buffer configuration – z Simple primitives: points, lines, done by the window system polygons (pixels, images, bitmaps) z GLX / WGL / PGL z 3D rendering – OpenGL Utility Toolkit (GLUT) – OpenInventor 45 46 DirectX OpenGL Design Goals z Direct control of graphics hardware z SGI’s design goals for OpenGL: z Direct control of input/output devices, and sound – High-performance (hardware-accelerated) graphics API – Some hardware independence Application program – Natural, terse API with some built-in extensibility Application program z OpenGL has become a standard (competing with DirectX) because: – It doesn’t try to do too much Direct sound Direct X z Only renders the image, doesn’t manage windows, etc. z No high-level animation, modeling, sound (!), etc. Direct input It does enough Windows API Direct draw – Windows API z Useful rendering effects + high performance Direct 3D – Open source and promoted by SGI (& Microsoft, half-heartedly) …….. Windows systemWindows system 47 48 goupee.com fb.com/groups/goupee 8

第 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 Raster Displays (early 70s) like television, scan all pixels in regular pattern use frame buffer (video RAM) to eliminate sync problems RAM ¼ MB (256 KB) cost $2 million in 1971 NEC Hybrid Mask Hitachi EDP 49 50 Display Technology: Raster CRTs Các thiết bị hiển thị dạng điểm z Raster CRT pros: – Allows solids, not just wireframes – Leverages low-cost CRT technology (i.e., TVs) – Bright! Display emits light z Cons: – Requires screen-size memory array – Discreet sampling (pixels) – Practical limit on size (call it 40 inches) – Bulky – Finicky (convergence, warp, etc) 51 52 CRT Displays LCD-Liquid Crystal Display Advantages Disadvantages z A transmissive technology z Fast repsonse (high resolution z Large and heavy (typ. 70x70 cm, z Works by letting varying amounts possible) 15 kg) of a fixed-intensity white backlight Full color (large modulation High power consumption (typ. through an active filter z z depth of E-beam) 140W) z Organnic crystals that lign Saturated and natural colors Harmful DC and AC electric and themselves together z z Inexpensive, matured magnetic fields z When external force is applied z they realign themselves technology z Flickering at 50-80 Hz (no memory Wide angle, high contrast and effect) z This is used to change z polarisation and filter light brightness z Geometrical errors at edges 53 54 goupee.com fb.com/groups/goupee 9

第 10 页

Khoa CNTT - ĐHBK Hà nội Email: hunglt@it-hut.edu.vn Tel: 0913030731 Display Technology: LCDs LCD Displays z Transmissive & reflective Advantages Disadvantages LCDs: LCDs act as light valves, not z Small footprint (approx 1/6 of CRT) z High price (presently 3x CRT) – light emitters, and thus rely on z Light weight (typ. 1/5 of CRT) z Poor viewing angle (typ. +/- 50 an external light source. z Low power consumption (typ. 1/4 of degrees) – Laptop screen: backlit, CRT) transmissive display z Low contrast and luminance (typ. z Completely flat screen - no 1:100) – Palm Pilot/Game Boy: geometrical errors reflective display z Low luminance (typ. 200 cd/m2) z Crisp pictures - digital and uniform colors z No electromagnetic emission z Fully digital signal processing possible z Large screens (>20 inch) on desktops 55 56 Màn hình Plasma Display Technology Plasma display panels z Plasma Display Panel z Pros – Similar in principle to Large viewing angle – fluorescent light tubes Good for large-format – – Small gas-filled capsules displays are excited by electric field, – Fairly bright emits UV light z Cons – UV excites phosphor – Expensive – Phosphor relaxes, emits – Large pixels (~1 mm versus some other color ~0.2 mm) – Phosphors gradually deplete – Less bright than CRTs, 57 58 using more power Display Technology: DMDs Display Technology: DMDs z Digital Micromirror Devices (projectors) z DMDs are truly digital pixels – Microelectromechanical (MEM) devices, fabricated z Vary grey levels by modulating pulse length with VLSI techniques Color: multiple chips, or color-wheel z z Great resolution z Very bright z Flicker problems 59 60 goupee.com fb.com/groups/goupee 10

第 11 页

Khoa CNTT - ĐHBK Hà nội Email: hunglt@it-hut.edu.vn Tel: 0913030731 Màn hình hữu cơ Display Technologies: Organic LED Arrays Organic LED Arrays z Organic Light-Emitting Diode z OLED pros: (OLED) Arrays – The display of the future? – Transparent – OLEDs hoạt động tương tự cơ chế – Flexible của LEDs bán dẫn Cấu trúc là màng chất dẻo mỏng: – Light-emitting, and quite z Màng film cấu tạo bởi các phần tử bright (daylight visible) – hữu cơ, các phân tử phát sáng bởi – Large viewing angle sự thăng hoa khí trong môi trường chân không – Fast (< 1 microsecond off- – Mầu sắc được tạo thành từ các lớp on-off) mầu gồm các phân tử huỳnh quang Can be made large or small được kích thích. – – Mịn, không to như các hạt tinh thể và không phát nhiệt – Có thể tạo màn hình rộng loại OLEDs 61 62 Display Technologies: Organic LED Arrays Direct Color Framebuffer OLED cons: z Store the actual intensities of R, G, and B individually in the z framebuffer – Not quite there yet (96x64 displays) except niche markets z 24 bits per pixel = 8 bits red, 8 bits green, 8 bits blue z Cell phones (especially back display) z Car stereos – 16 bits per pixel = ? bits red, ? bits green, ? bits blue – Not very robust, display lifetime a key issue – Currently only passive matrix displays DAC z Passive matrix: Pixels are illuminated in scanline order (like a raster display), but the lack of phosphorescence causes flicker z Active matrix: A polysilicate layer provides thin film transistors at each pixel, allowing direct pixel access and constant illumination See http://www.howstuffworks.com/lcd4.htm for more info – Hard to compete with LCDs, a moving target 63 64 Color Lookup Framebuffer Framebuffers: True-Color z Store indices (usually 8 bits) in framebuffer A true-color ( 24-bit or 32-bit) framebuffer stores one byte z z Display controller looks up the R,G,B values before triggering each for red, green, and blue the electron guns Color Lookup z Each pixel can thus be one of 224 colors Table Pay attention to 0 z DAC Endian-ness Pixel color = 14 14 R G B z How can 24-bit Frame Buffer and 32-bit mean the same thing here? 1024 65 66 goupee.com fb.com/groups/goupee 11

第 12 页

Khoa CNTT - ĐHBK Hà nội Email: hunglt@it-hut.edu.vn Tel: 0913030731 Framebuffers: Indexed-Color Framebuffers: Hi-Color An indexed-color (8-bit or PseudoColor) framebuffer stores one byte per z Hi-Color was a popular PC SVGA standard z pixel (also: GIF image format) z Packs pixels into 16 bits: z This byte indexes into a color map: – 5 Red, 6 Green, 5 Blue z How many colors – Sometimes just 5,5,5 can a pixel be? Each pixel can be one of 216 colors z z Still common on low-end displays z Hi-color images can exhibit worse quantization artifacts (cell phones, PDAs, than a well-mapped 8-bit image GameBoys) z Cute trick: color-map animation 67 68 – X : 0 ÷ Xmax 2 màu/ 1 bit – Y : 0 ÷ Ymax 16 màu/ 4 bit – 256 màu/ 8bit – 216 màu/ 16 bit – 224 màu/ 24 bit – 640 × 480 × 16 → Video RAM = 2MB – 1024 × 1024 × 24 → Video RAM = 24MB 69 goupee.com fb.com/groups/goupee 12

显示前 12 页。下载资料查看完整内容。

评论 (0)

登录 以加入讨论

暂无评论。快来抢沙发吧!