1 / 39

虛擬實境設計

虛擬實境設計. A Short Introduction by K.-P. Beier 魏兆煌 整理.

Download Presentation

虛擬實境設計

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 虛擬實境設計 A Short Introduction by K.-P. Beier 魏兆煌 整理

  2. TerminologyThe term 'Virtual Reality' (VR) was initially coined by Jaron Lanier, founder of VPL Research ("Visual Programming Language") (1989). Other related terms include 'Artificial Reality' (Myron Krueger, 1970s), 'Cyberspace' (William Gibson, 1984), and, more recently, 'Virtual Worlds' and 'Virtual Environments' (1990s). Today, 'Virtual Reality' is used in a variety of ways and often in a confusing and misleading manner. Originally, the term referred to 'Immersive Virtual Reality.' In immersive VR, the user becomes fully immersed in an artificial, three-dimensional world that is completely generated by a computer.

  3. Head-Mounted Display (HMD) The head-mounted display (HMD) was the first device providing its wearer with an immersive experience. Evans and Sutherland demonstrated a head-mounted stereo display already in 1965. It took more then 20 years before VPL Research introduced a commercially available HMD, the famous "EyePhone" system (1989).

  4. A typical HMD houses two miniature display screens and an optical system that channels the images from the screens to the eyes, thereby, presenting a stereo view of a virtual world. A motion tracker continuously measures the position and orientation of the user's head and allows the image generating computer to adjust the scene representation to the current view. As a result, the viewer can look around and walk through the surrounding virtual environment.

  5. To overcome the often uncomfortable intrusiveness of a head-mounted display, alternative concepts (e.g., BOOM and CAVE) for immersive viewing of virtual environments were developed. BOOMThe BOOM (Binocular Omni-Orientation Monitor) from Fakespace is a head-coupled stereoscopic display device. Screens and optical system are housed in a box that is attached to a multi-link arm. The user looks into the box through two holes, sees the virtual world, and can guide the box to any position within the operational volume of the device. Head tracking is accomplished via sensors in the links of the arm that holds the box.

  6. CAVEThe CAVE (Cave Automatic Virtual Environment) was developed at the University of Illinois at Chicago and provides the illusion of immersion by projecting stereo images on the walls and floor of a room-sized cube. Several persons wearing lightweight stereo glasses can enter and walk freely inside the CAVE. A head tracking system continuously adjust the stereo projection to the current position of the leading viewer.

  7. Input Devices and other Sensual Technologies A variety of input devices like data gloves, joysticks, and 3D Mouse allow the user to navigate through a virtual environment and to interact with virtual objects. 3D sound, tactile and force feedbackdevices, voice recognition and other technologies are being employed to enrich the immersive experience and to create more "sensualized" interfaces.

  8. Characteristics of Immersive VR • The unique characteristics of immersive virtual reality can be summarized as follows: • Head-referenced viewing provides a natural interface for the navigation in three-dimensional space and allows for look-around, walk-around, and fly-through capabilities in virtual environments. • Stereoscopic viewing enhances the perception of depth and the sense of space. • The virtual world is presented in full scale and relates properly to the human size.

  9. Characteristics of Immersive VR continue • Realistic interactions with virtual objects via data glove and similar devices allow for manipulation, operation, and control of virtual worlds. • The convincing illusion of being fully immersed in an artificial world can be enhanced by auditory, haptic, and other non-visual technologies. 2.

  10. Networked applications allow for shared virtual environments Shared Virtual Environments In the example illustrated, three networked users at different locations (anywhere in the world) meet in the same virtual world by using a BOOM device, a CAVE system, and a Head-Mounted Display, respectively. All users see the same virtual environment from their respective points of view. Each user is presented as a virtual human (avatar) to the other participants. The users can see each other, communicated with each other, and interact with the virtual world as a team.

  11. Non-immersive VR Today, the term 'Virtual Reality' is also used for applications that are not fully immersive. The boundaries are becoming blurred, but all variations of VR will be important in the future. This includes mouse-controlled navigation through a three-dimensional environment on a graphics monitor, stereo viewing from the monitor via stereo glasses, stereo projection systems, and others. Apple's QuickTime VR, for example, uses photographs for the modeling of three-dimensional worlds and provides pseudo look-around and walk-trough capabilities on a graphics monitor.

  12. VRMLMost exciting is the ongoing development of VRML (Virtual Reality Modeling Language) on the World Wide Web. In addition to HTML (HyperText Markup Language), that has become a standard authoring tool for the creation of home pages, VRML provides three-dimensional worlds with integrated hyperlinks on the Web. Home pages become home spaces. The viewing of VRML models via a VRML plug-in for Web browsers is usually done on a graphics monitor under mouse-control and, therefore, not fully immersive. However, the syntax and data structure of VRML provide an excellent tool for the modeling of three-dimensional worlds that are functional and interactive and that can, ultimately, be transferred into fully immersive viewing systems. The current version VRML 2.0 has become an international ISO/IEC standard under the name VRML97.

  13. VRML continue Rendering of Escher's Penrose Staircase (modeled by Diganta Saha):

  14. VR-related Technologies Other VR-related technologies combine virtual and real environments.Motion trackers are employed to monitor the movements of dancers or athletes for subsequent studies in immersive VR. The technologies of 'Augmented Reality' allow for the viewing of real environments with superimposed virtual objects. Telepresence systems (e.g., telemedicine, telerobotics) immerse a viewer in a real world that is captured by video cameras at a distant location and allow for the remote manipulation of real objects via robot arms and manipulators.

  15. ApplicationsAs the technologies of virtual reality evolve, the applications of VR become literally unlimited. It is assumed that VR will reshape the interface between people and information technology by offering new ways for the communication of information, the visualization of processes, and the creative expression of ideas.

  16. Note that a virtual environment can represent any three-dimensional world that is either real or abstract. This includes real systems like buildings, landscapes, underwater shipwrecks, spacecrafts, archaeological excavation sites, human anatomy, sculptures, crime scene reconstructions, solar systems, and so on. Of special interest is the visual and sensual representation of abstract systems like magnetic fields, turbulent flow structures, molecular models, mathematical systems, auditorium acoustics, stock market behavior, population densities, information flows, and any other conceivable system including artistic and creative work of abstract nature. These virtual worlds can be animated, interactive, shared, and can expose behavior and functionality.

  17. Applications continue Useful applications of VR include training in a variety of areas (military, medical, equipment operation, etc.), education, design evaluation (virtual prototyping), architectural walk-through, human factors and ergonomic studies, simulation of assembly sequences and maintenancetasks, assistance for the handicapped, study and treatment of phobias (e.g., fear of height), entertainment, and • • •

  18. 3D電腦繪圖-- 虛擬世界

  19. 攝影 2D動畫 3D動畫 3D遊戲 VR 影像處理技術層次

  20. 3D電腦繪圖--虛擬世界 相信多數人都看過“朱儸紀公園”中張牙舞爪的恐龍或者是“玩具總動員”中會說話的玩具和“蟲蟲危機”中可愛的昆蟲等等,這些栩栩如生,讓人分不出真假的東西就是由三度空間電腦繪圖(3D Computer Graphics)所創造出來的,而隨著半導體技術的精進,原本只能在昂貴的高階電腦工作站才能執行的3D電腦繪圖,已經普及到一般的個人電腦上,現在幾乎九成以上的電腦都配備有基本的3D繪圖功能,電視遊樂器更配備有超強的3D繪圖晶片,3D電腦繪圖已是十分普及。 現在3D電腦繪圖已深入到各個層面,尤其在影音娛樂多媒體方面,甚至應用在醫學上的斷層掃瞄及科學研究上,虛擬實境更是未來的夢想。 一、前言

  21. 3D電腦繪圖--虛擬世界 continue 二、3D電腦繪圖簡介 3D電腦繪圖的宗旨就是為了模擬出真實世界的物體,如何讓產生出來的圖片更逼真、更快速是努力的重點,那為什麼三度空間的物體可以顯現在二度空間平面的螢幕上呢?這就是利用許多複雜的演算法或模型來模擬真實物體在三度空間中的狀況,最後投射在二維平面的螢幕上。

  22. 如下圖所示,物體位於黃色區域中的三度空間內,人眼透過螢幕Screen所看到的就是此三度空間透射到二維平面上的狀態,而許多因素會影響到最後此影像的真實度,包含投射的技巧、物體模型的細緻程度、光源模型的精確度等等,底下就為3D繪圖流程簡單的說明(此一流程是最基本的概念,事實上在3D電腦繪圖的領域中有許許多多不同的方式來產生最後的圖形)。 如下圖所示,物體位於黃色區域中的三度空間內,人眼透過螢幕Screen所看到的就是此三度空間透射到二維平面上的狀態,而許多因素會影響到最後此影像的真實度,包含投射的技巧、物體模型的細緻程度、光源模型的精確度等等,底下就為3D繪圖流程簡單的說明(此一流程是最基本的概念,事實上在3D電腦繪圖的領域中有許許多多不同的方式來產生最後的圖形)。

  23. 3D電腦繪圖--虛擬世界 continue 1. 建立物體模型(Modeling) 如何描述一個三度空間中的物體其外觀形狀,此一動作就是建模,通常我們會用點、線、面去近似一個物體的外觀 。

  24. 3D電腦繪圖--虛擬世界 continue 建立此物體的模型資料,通常用(X,Y,Z)三度空間的座標來表示,這些資料就是供後面繪圖運算用的,有了物體外觀(X,Y,Z)的資料,可以利用很簡單的線性代數運算,就可以將這個物體放大縮小、移動和變形等等。 目前建立模型的方式大多靠軟體輔助設計如3DS Max、SoftImage、Maya等來完成,此一方法需手工且耗時,因此也有雷射掃瞄的儀器直接掃瞄真實物體的外觀。 物體模型的精細度對最後產生出來的圖形的真實度有很大的影響,也牽涉到資料處理的運算量。

  25. 3D電腦繪圖--虛擬世界 continue 2. 座標轉換 (Transform) 有了物體的三度空間模型資料,就可以用線性代數的方法將此物體移動、縮放、變形等等,這些動作其實都是座標轉換,藉由控制物體上每個點的座標變動,可以讓物體移動、旋轉、產生動畫,如下圖,在一空間中擺進了三個物體,並調整它們的位置和角度。

  26. 3D電腦繪圖--虛擬世界 continue 3. 光亮度計算 (Lighting) - 1 當一個三度空間中所有物體的座標資訊都處理好後,接下來的就是要計算每個物體的顏色了,如何計算物體的顏色呢?首先必須將此三度空間中的光源做一適當的model,就像光源可以分成很多種,如太陽光、電燈泡、探照燈等等,model好光源後,皆下來要做的就是計算此光源如何和這些物體作用,而最後反射到眼睛的光就是我們所看到此物體的顏色了,此部分就是利用光學反射、散射、透射等的原理來模擬 。

  27. 3D電腦繪圖--虛擬世界 continue 3. 光亮度計算 (Lighting) - 2 物體的顏色若要逼真就必須使用較複雜的運算,目前的方法大致可分成幾種:Local illumination、Ray Tracing(光跡追蹤)和Radiosity(熱幅射法) 。 Local illumination是較適合於硬體設計,但其品質是此三種中最差的但運算量也是最低的;光跡追蹤對於金屬物質的效果最逼真;熱幅射對於室內光源的效果較好,但光跡追蹤和熱幅射都需要耗費很久的時間且不適合做硬體加速,一般我們看到電影中逼真的動畫都是結合了光跡追蹤和熱幅射後所得到的最好效果,通常一張畫面都需要一台工作站運算幾小時,並不適合即時的3D應用。

  28. 3D電腦繪圖--虛擬世界 continue 3. 光亮度計算 (Lighting) - Gouraud Shading Local illumination:此方法只針對每個光源對此點的影響納入計算,不考慮到其他物體的影響,此方法還可分成兩種Gouraud Shading和Phong Shading。 Gouraud Shading是首先對每個物體模型的頂點做光亮度的計算,得到每個頂點(通常為三角形的頂點)的顏色值(如圖左),然後接著在用內插的方式將每個面內部(通常是三角形)的點的顏色給內插出來,其結果就如圖右,此方法的缺點是因為用內插的關係,所以無法模擬出金屬物體高亮度、高反光的地方,但好處是硬體運算量較少。

  29. 3D電腦繪圖--虛擬世界 continue 3. 光亮度計算 (Lighting) - Phong Shading Phong Shading是對物體上的每個點都去計算它的光亮度值,所以可以模擬出高反光的部分,但由於光亮度需要大量的浮點運算,所以目前的硬體架構幾乎都是採用Gouraud Shading。

  30. 3D電腦繪圖--虛擬世界 continue 3. 光亮度計算 (Lighting) - Ray Tracing Ray Tracing(光跡追蹤) 對於金屬物質的效果最逼真,也適用於陰影之呈現。

  31. 3D電腦繪圖--虛擬世界 continue 3. 光亮度計算 (Lighting) - Radiosity Radiosity(熱幅射法) 熱幅射對於室內光源的效果較好。

  32. 3D電腦繪圖--虛擬世界 continue 4. 貼圖 (Texture Mapping) 在計算完物體的顏色後整個影像已呈現出3D的立體效果,但這只有純色的結果,在真實世界中物體表面都會有紋路,甚至細小高低不平的紋路材質(如樹木、皮革等),我們利用簡單的貼圖就可以模擬出物體表面的這些效果(下圖),此動作牽涉到貼圖的精細度和材質使用的多寡,目前此單元是硬體中最耗費記憶體大小和頻寬的單元,所以才會有貼圖壓縮(Texture Compression) 的出現。

  33. 3D電腦繪圖--虛擬世界 continue 5. 隱藏面消除(Hidden Surface Removal) - 1 當我們眼睛往三度空間中的某個位置、角度看過去時,有些物體因為在後面會被遮住,所以在最後整張影像成像的時候必須將這些東西消除,最常用的方法是Z-Buffer,由於這些看不見的點都會耗費不必要的運算(如座標轉換、光亮度、 貼圖等) ,造成整體效能的降低,因此有許多方法被開發用來儘早在前級時消除這些看不到的物體 。

  34. 3D電腦繪圖--虛擬世界 continue 5. 隱藏面消除(Hidden Surface Removal) - 2 也許有人會問說,為什麼一開始要把這些看不到的東西送入硬體加速呢?那是因為通常我們是無法經由簡單的計算就可以得知物體的哪些部分是看不到的,況且3D電腦繪圖的精神就是你可以從任何角度觀看此空間,而產生出來的圖形的解析度也可以任意,所以當遇到互動式的3D應用時,就很難預先知道使用者眼睛的位置而將那些看不見的物體消除的 。

  35. 3D電腦繪圖--虛擬世界 continue 5. 隱藏面消除(Hidden Surface Removal) - 3 隱藏面的消除使用Z-Buffer是最簡單有效也是最笨的方法,Z-Buffer就是一塊儲存螢幕上每一點深度(Z)值的記憶體,當有新的點進來時就去比對此點的深度值是否比之前在Z-Buffer中的靠近眼睛,如果是的話就表示此點會遮蓋住後面的點,更新Z-Buffer成此一新的值,若不是的話,就表示新的點比目前的點還遠,所以看不到,就將它捨去掉。目前ATI在Radeon中所發表的Hierarchical Z Buffer也是為了加速消除隱藏面的方法。

  36. 3D電腦繪圖--虛擬世界 continue 概念總結: 到此我們簡單的呈現3D電腦繪圖的概念,事實上整個3D電腦繪圖的過程非常繁雜,還有許許多多為了模擬真實世界所發展出來的演算法,歸納起來整個3D繪圖系統可分成幾個部分:應用程式(API)、幾何處理(Geometry Processing)、繪圖處理(Rasterization Processing) 。上層API的部分,包含Library(如Direct3D、OpenGL),軟體開發者依循標準Library程式庫開發出3D的應用軟體出來,透過支援標準程式庫的3D晶片送到硬體加速,硬體加速目前包含幾何處理和繪圖處理,幾何處理包含前級座標轉換Transform和光亮度計算Lighting等等,統稱T&L,著重大量的浮點運算,後級繪圖處理包含顏色內插、著色、貼圖、消除隱藏面、透明度、霧狀、陰影模擬等等,均依賴像素的運算和記憶體存取等。

  37. 3D電腦繪圖--虛擬世界 finish 進階閱讀書目: 1. Alan Watt, “The Computer Image”, Addison Wesley => 2D、3D入門及深入 2. Alan Watt, “3D Computer Graphics”, Addison Wesley => 完整3D理論 3. Tomas Moller and Eric Haines, “ Real-Time Rendering ”, AK Peters (http://www.realtimerendering.com/)。 =>3D軟硬體加速技巧 相關網站:1. www.nvidia.com/developer.nsf2. http://www.opengl.org/3. www.microsoft.com/directx/4. Computer Graphics on the NET: http://ls7-www.cs.uni-dortmund.de/cgotn/

More Related