Bài 12 Thực tại ảo
I. Virtual Reality
Khái niệm “virtual” ?
Bài 12 - Hiện thực ảo
Virtual Reality
“Virtual” là 1 trong những từ được lạm dụng trong ngành công nghệ cao
ngày nay và được dùng phổ biến.
“virtual bank”, “virtual heritage”,... ngụ ý đến 1 điều kỳ quái monstrosities.
virtual X
CNTT-ĐHBK Hà nộiKhoa CNTT/ĐHBK
Hà nội
với X có thể là bất cứ thứ gì , điều gì. virtual X không phải là X nhưng
có giao diện (hình dáng, hoạt động ...) giống hệt như X
Ví dụ: virtual memory không phải là bộ nhớ nhưng nó làm việc với vi
xử lý đúng như là bộ nhớ.
Tương tự virtual disks, virtual terminals, virtual networks, etc.
1
CNTT-ĐHBK Hà nội
Định nghĩa Virtual Reality
2
Lịch sử phát triển
Coates (1992):
1962 : Sensorama (from the movie industry : Morton Heilig)
1970sh : visualisation of virtual world on the screen
Greenbaum (1992):
1970 : First Head Mounted Display : Daniel Vivkers from Utah
University (From a Ivan Sutherland / MIT 's idea)
Theo kinh nghiệm con người:
1982 : Dataglove
(Isdale, 1998)
Các thuật ngữ khác thường dùng:
Virtual Worlds, Virtual Environments, Immersive VR, Cyberspace
...
CNTT-ĐHBK Hà nội
3
So sánh Virtual Reality và các
Media khác
1980-85 : First VR commercial products 1987 Virtual Cockpit
(British Aerospace) head and hand tracking, eye tracking, 3d
visuals, 3D audio, speech recognition vibro tactile feedback
1990-95 : Popularisation of VR (Film, Books...)
ARMY – spend close to $1000 million 1998 in VRresearch.
CNTT-ĐHBK Hà nội
4
Kiến trúc hệ thống của Virtual
Environments
Sống động - Vividness (biểu diễn được
môi trường chính xác)
breadth (visibility, audibility, touch,
smell)
depth (quality, fidelity-chính xác)
Tương tác - Interactivity (cho phép
người dùng có khả năng thay đổi môi
trường )
speed (update rates, time lag)
mapping (text, speech, gestures,
gaze, complex behavior patterns)
CNTT-ĐHBK Hà nội
5
CNTT-ĐHBK Hà nội
6
Khoa CNTT - ĐHBK Hà nội
CuuDuongThanCong.com
0913030731
/>
1
Bài 12 Thực tại ảo
Thành phần Kiến trúc
Đặc điểm
Đối tượng, thực thể- Objects, entities (cars, buildings, sky, …)
Tính chất hình học- Shape, color, texture
Tính chất vật lý – Weight, speed, position, etc…
Người dùng - User
Tương tác với môi trường, có thể được nhìn thấy bằng CAMERA
Có hình thể tham gia vào thế giới ảo (avatar)
Có thể nghe, nói (Voice recognition)
Có thể di chuyển (gesture recognition)
Đa người dùng - Multi user
Mạng máy tính - Network connection
Mô phỏng - Simulation
Điều khiển ứng dụng
Điều khiển hướng sự kiện (tránh va chạm)
Mô phỏng hướng theo tính chất vật lý của đối tượng (act according the objects physical
attributes)
Thế giới, môi trường World
Kết nối tát cả những phần khác nhau vào thành 1 môi trường mà người dùng hoạt
động ở trong đó
7
CNTT-ĐHBK Hà nội
Một VR thật không tồn tại, làm con người cảm thấy thoải mái
khi có các nhầm lẫn, Phải có được đặc điểm
Cảm giác hoà nhập - immersion:
Cho phép tương tác với các đối tượng trong cảnh như cách
ngời dùng làm trong thực tế chấp nhận tính xấp xỉ với hạn độ
hợp lý.
Tạo càng nhiều cảm nhận trên các giác quan càng tốt
9
Trong thực tế để đạt được chấp nhận:
Hoà nhập - “immersion”.
8
Công nghệ trong VR
CNTT-ĐHBK Hà nội
Virtual reality (VR), Phải đảm bảo
CNTT-ĐHBK Hà nội
Đặc điểm Thực tế của Hiện thực ảo
Màn hình hiển thị-Visual displays: hiển thị thế giới ảo đến người
sử dụng.
Hệ thống theo dõi-Tracking systems: theo dõi vị trí và hướng của
người dùng trong môi trường ảo
Hệ thống tính toán-Computation Systems: thực hiện những tính
toán cần thiết để sinh ra không gian ảo
Thiết bị xúc giác-Haptic devices: cung cấp thao tác và nhận được
các cảm giác phản hồi từ thế giới thực
Audio systems- phản hồi âm thanh từ thực tại ảo
CNTT-ĐHBK Hà nội
10
Cảm nhận môi trường ảo
Perceive ?
Perceive
a) monoscopic cues( cảnh mono)
relative size
interposition and occlusion( lỏng lẻo)
perspective distortion( méo)
lighting and shadows
texture gradient
motion parallax ( thị sai chuyển động)
b) binocular (stereoscopic) cues
stereo disparity (phân tách)
convergence( hội tụ)
hearing
sound
ears,body
The ability to hear; the auditory faculty; SYN. audition, auditory
sense, sense of hearing, auditory modality.
sight
image
eyes
The ability to see; the faculty of vision; SYN. vision, visual sense,
visual modality.
touch
surface / temperature
skin
The faculty of touch; SYN. sense of touch, skin senses, touch
modality, cutaneous senses.
smell
odour
nose
The faculty of smell; SYN. sense of smell, olfaction, olfactory
modality.
taste
savour, flavour
tongue/nose
The faculty of taste; SYN. gustation, sense of taste, gustatory
modality.
kinesthesia
position, movement,
muscular
tensions
muscles
The perception of body position and movement and muscular tension
etc; SYN: kinaestesia, feeling of movement
proprioception
balance, acceleration,
position, location,
orientation,
movement of the
body
ear
The ability to sense the position and location and orientation and
movement of the body and its parts.
Anthropocentric User-Diagram
CNTT-ĐHBK Hà nội
11
CNTT-ĐHBK Hà nội
12
Khoa CNTT - ĐHBK Hà nội
CuuDuongThanCong.com
0913030731
/>
2
Bài 12 Thực tại ảo
Tái tạo cảm giác
Yêu cầu VR
recreate sensation ?
a) monoscopic cues
realistic rendering / lighting simulation
b) stereoscopic cues -> stereodisparity presentation of
appropriate view to each eye
- time multiplexing of images
- multiplexing with chromatic filters (anaglyph)
- multiplexing with polarizer filters
- providing two views simultaneously
Color Encoded Stereo Image Pair
CNTT-ĐHBK Hà nội
Ứng dụng
Cảnh-scene: cần được vẽ, sinh ra phụ thuộc vào điểm nhìn của người dùng
Vị trí của mắt cần xác định, thiết bị theo dõi xác định hướng và vị trí của đầu và mắt.
Theo đó Phần mềm cần hiệu chỉnh ma trận chiếu phù hợp để có kết quả..
Cảnh hiển thị 3-D .
stereo vision: Hình ảnh nhận được sử dụng sự khác biệt We perceive 3-D primarily
using the difference between the images received by the two eyes -.
perceive 3-D is by focus: the lens in the eye focuses light differently for near vs.
far objects.
The user needs to be able to affect the scene somehow.
Tracking capability (to determine head/eye placement), the user a hand-held
object with a tracker on it.
User’s motions directly, either through placement of tracking devices on the
user’s clothes, or by giving the computer several video feeds of the user.
13
CNTT-ĐHBK Hà nội
14
An Immersive Car Simulator
Using HMD(© British Aerospace)
Science
–
–
–
–
–
Engineering
Aero Engine design
Submarine design
Architecture
Human factors modeling
Industrial concept design
Telecoms engineering
Entertainment
Computer animator
Television
Game system
Computational Neuroscience
Molecular modeling
Phobias ~ Virtual Therapy
Telepresence
Ultrasound Echolography
Training
–
–
–
–
–
–
High-risk work
Flight simulation
Medicine
Military training
Nuclear industry
Accident simulation (Airline,
car collision testing)
CNTT-ĐHBK Hà nội
15
CNTT-ĐHBK Hà nội
16
Phân loại VR- Desktop VR
A BOOM Display Application in
Aerodynamics
(© NASA Ames Research Center)
Desktop VR
Window on a World (WoW)
CNTT-ĐHBK Hà nội
17
Non-immersive: chuột 3d, window system
3D world hiển thị tren màn hình, chuột và bàn phím là đầu vào tương tác.
Giá thấp, dùng cả với PC thông dụng.
VRML, Games
Một số hệ thống sử dụng một màn hình truyền thống để hiển thị thế giới trực
quan (visual world).
Người ta phải xem màn hình hiển thị như là một cửa sổ mà qua cửa sổ đó
người ta có thể thấy một thế giới ảo.
Thách thức đối với lĩnh vực đồ hoạ máy tính là làm cho hình ảnh trong cửa sổ
đó trông giống như thật, âm thanh nghe giống thật và các đối tượng hành
động giống thật.
“One must look at a display screen as a window through which one beholds a
virtual world. The challenge to computer graphics is to make the picture in
the window look real, sound real and the objects act real” [quoted from
Computer Graphics V26#3].
CNTT-ĐHBK Hà nội
18
Khoa CNTT - ĐHBK Hà nội
CuuDuongThanCong.com
0913030731
/>
3
Bài 12 Thực tại ảo
Thế giới thực bổ xungAugmented Reality
Ánh xạ Video (Video Mapping)
Đây là một biến thể của cách tiếp cận theo kiểu WoW. Tiếp cận theo kiểu này
sẽ kết hợp một đoạn video hình ảnh người sử dụng với đồ hoạ 2D. Người sử
dụng sẽ thấy một màn hình hiển thị tương tác của hình anh ta với máy tính.
DVR hệ thống đơn giản sử dụng các thiết bị tương tác thông thường như :
chuột 3d, window system. Thế giới 3D được hiển thị trên màn hình, chuột và
bàn phím là đầu vào tương tác.
Ưu điểm của hệ thống và các ứng dụng loại nay là chi phí và giá cả thấp, có
thể dùng được cả với PC thông dụng và các thiết bị thông dụng khác.
Phù hợp với việc phát triển những ứng dụng đại trà và các sản phẩm cấp thấp
không cần đến đội chính xác tuyệt đối.
CNTT-ĐHBK Hà nội
19
CNTT-ĐHBK Hà nội
Xuất hiện ảo-Virtual presence
... Is experienced by a person when sensory information generated only by and within a
computer compels a feeling of being present in an environment other than the one the
person is actually in” (Sheridan, 1992, pg.6)
Presence: là cảm nhận tâm lý xuất hiện ở một môi trường dựa vào công nghệ hình
thành theo kiểu hoà nhập - immersive.
Trên thực tế hệ thống hoạt động theo kiêu này không cần thiết áp dụng cho tất cả mọi
người mà chỉ cho một vài người có vai trò nhất định trong cộng đồng.
Việc tích hợp giữa immersive và presence luôn là bài toán khó cho công nghệ . Một
ứng dụng của Presence là: Telepresence và teleoperate
Telepresence : Là thuật ngữ mô tả việc sử dụng các công nghệ khác nhau gây
hiệu ứng đặt ngưòi dùng tại một vị trí khác.
Telepresence là một cách mường tượng, hình dung các thế giới được sinh ra
hoàn toàn trong máy tính. Đây là một kỹ thuật kết nối các cảm biến từ xa
trong thế giới thực với cảm giác của người điều khiển. Các cảm biến từ xa
này có thể được định vị trên một robot, giống như là các công cụ.
Lính cứu hoả sử dụng các phương tiện điều khiển từ xa để xử lý những trường
hợp nguy hiểm. Các bác sĩ giải phẫu sử dụng các thiết bị vô cùng nhỏ trên
những dây cáp để thực hiện ca phẫu thuật mà không cần rạch ra một lỗ lớn
trên cơ thể bệnh nhân. Các thiết bị này có một video camera nhỏ ở đầu làm
việc (business end).
Các robot được trang bị các hệ thống telepresence này đã thay đổi cách thức
thực hiện các cuộc thí nghiệm về biển sâu hoặc núi lửa. Kỹ thuật này ngoài ra
còn được áp dụng trong các cuộc nghiên cứu vũ trụ...
21
CNTT-ĐHBK Hà nội
II. Immersion( hoà nhập)
20
Telepresence
Xuất hiện - Presence
CNTT-ĐHBK Hà nội
Sự kết hợp giữa đồ hoạ và thế giới thực tạo thành 1 hệ thống
chung phục vụ cho việc nhìn nhận và đánh giá thế giới thực.
Kết hợp Telepresence và các hệ thống thực tại ảo cho ta một
thực tại hỗn hợp(Mixed Reality) hay các hệ thống mô phỏng
liền mạch (Seamless Simulation systems).
Ở đây, các dữ liệu vào sinh sinh ra bởi máy tính sẽ được hợp
nhất (kết hợp) với các dữ liệu vào telepresence và/hoặc quan
điểm (cách nhìn) về thế giới thực của người sử dụng.
Tạo ra cảm giác hoà nhập giữa người dùng và môi trường, hình ảnh quan
sát là hình ảnh người sử dụng nhìn được bao gồm cả không gian và
phương hướng.
Phần hình ảnh người dùng quan sát được chỉ là 1 phần rất nhỏ so với
không gian hiển thị
Thông thường công nghệ cho hiển thị đóng vai trò quan trọng và các cảm
nhận khác cũng được kiểm tra.
Hệ thống thực tại ảo - VR systems sẽ tạo cho người dùng là một phần của
thế giới ảo đang được mô phỏng chứ không đơn thuần môi trường ảo đang
mô phỏng là 1 góc của thế giới thực mà người dùng hiện hữu.
Hệ thống immersive VR đầu tiên là hệ thống mô phỏng lái máy bay mà ở
đó sự hoà nhập là sự kết hợp tinh xảo giữa các thiết bị thật và các hình ảnh
ảo. Buồng lái thật với các thiết bị thực tế cho phép phi công sử dụng như 1
chuyến bay bình thường. Hình ảnh hiển thị là những cảnh ảo được chuẩn
bị sẵn.
CNTT-ĐHBK Hà nội
23
22
Kỹ thuật sinh immersive
Head-Mounted Display: Put the screen right in front of the
user’s eyes. Include a lens, for comfortable focusing.
Advantage: It is easy to give the eyes different views.
Disadvantage: Need separate screen for each user.
BIG Disadvantage: When the user’s head moves, there is noticeable lag
before the image updates. (Faster computers should fix this problem.)
Large-Screen Display: Use a very large screen or group of
screens that fill the user’s vision.
Advantage: Image-update lag is not as much of a problem. (Why not?)
Advantage: Multiple users can view a single screen (but only one gets a
precisely correct view).
BIG Disadvantage: The setup is incredibly expensive.
Challenge: How to give the eyes different views?
CNTT-ĐHBK Hà nội
24
Khoa CNTT - ĐHBK Hà nội
CuuDuongThanCong.com
0913030731
/>
4
Bài 12 Thực tại ảo
Hoà nhập mức độ thấp
First Level of Immersion /
Interactivity Low level, Physical level
Phân loại
Immersive - Virtual Environments
1. Immersive Virtual Environments- môi trường ảo hoà nhập
• các đối tượng tương tác quan sát được và độc lập hoàn toàn với thế giới thật
• Cảnh ảo phản ứng lại các hành động tương tác của đối tượng.
• các đối tượng không thể tác động lên môi trường thật
2. Semi-Immersive Virtual Environments-môi trường ảo bán hoà nhập
• các đối tượng có thể tác động lên cả môi trường thật và ảo
• vai trò của các đối tượng trong môi trường ảo lớn hơn nhiều so với môi trường
thật
• tác động nên môi trường thực là rất hạn chế
Because the computer is physically connected to the human
body by its senses and its motor responses.
The physical devices, Which interface to use ?
You have to know that not only Sight interface exist (HMD...),
but lots of other,l you should have an idea of all the others
What Hardware (interface, computer) ?
What Software (Driver, Toolkit, Programming Language...) ?
3. Non-Immersive Virtual Environments – VR thông thường
• các cảnh 3D như là 1 phần của thế giới thật (môi trường vật lý)
• các đối tượng đáp lại hoàn toàn trong thế giới thật
• Tồn tại rất ít quan hệ với môi trường ảo - VE
CNTT-ĐHBK Hà nội
25
Second Level : Mental Immersion / Interactivity of the user
Triadic diagram for the behavioral interfacing
Desired Behavior... where are the
shemas...
Effective motor function : what the
user will do : Schema, Schema by
substitution or Metaphore
Effective perception : as natural as
possible, with as many senses as
possible, and as weel synchorised
(cohering) as possible
programmed motor function :
Behavorial Software Assistance
Programmed perception : what is
available from the virtual world
CNTT-ĐHBK Hà nội
CNTT-ĐHBK Hà nội
Các bước thiết kế
VR Environments
Content
• story writing
• scenario setup
• semantics
Objects
• geometry and static attributes (color etc…)
• textures
• sound
Dynamics
• object relationships
• events
• dynamic object properties (behavior)
System Implementation
27
CNTT-ĐHBK Hà nội
Low Level Tools
High Level Tools
• Keep Track of Primitive Lists
• Transformation of Vertices
• Drawing of Primitives
• Reading Devices on Driver Level
• Polygon Intersection Testing
Examples
• Loading Objects (Geometry, Sounds…)
• Scene Graph Construction
• Advanced Camera Models
• Automatic Sensor Handling
• Automatic Collision Detection
Examples
28
• C++ Compiler
• Simulation Libraries (WorldToolKit, VRT, DIVE, dVise)
• WorldUp, Superscape
• C++ Compiler
• OpenGL, Direct3D
CNTT-ĐHBK Hà nội
26
29
CNTT-ĐHBK Hà nội
30
Khoa CNTT - ĐHBK Hà nội
CuuDuongThanCong.com
0913030731
/>
5
Bài 12 Thực tại ảo
V. Phần cứng Mô hình chung
Generic VR System
Head Tracker Receiver
Head-mounted display(HMD)
Head phones
Microphone
Physical Simulation
and Animation
Lights
Illustration Model
Head Position
INPUT
Hand Position
Objects
Geometry
Surface Properties
Dynamic Properties
Physical Constrains
Acoustic Properties
Glove
Visual
Audio
Tracker
Transmitter
Pressure sensors
Pushing, pulling, and twisting
Joysticks
Specific platforms of exploration
Gloves
Finger angle (flexible sensors)
Tracking the movement of the hands
Sonic or electromagnetic system
Postures
33
Laser Scanner
LEDs
Hi-ball tracker
CNTT-ĐHBK Hà nội
34
4 categories of haptic devices
3D array
32
Sonar-based
3D Input (Haptic device)
Puppets
Eye Tracking
CNTT-ĐHBK Hà nội
3D Trackball (Space-ball)
• Robot Arms (e.g. Grope, Phantom)
• Active Joystics (e.g. Microsoft Sidewinder)
• Vibrotactile Devices (e.g. Logitec Cyberman)
VE
Database
3D mouse
Haptic Displays (force feedback)
CNTT-ĐHBK Hà nội
Machine
Intelligence
6 DOF: translation and rotation of X, Y, Z
axes
• Multi-Channel Sound Systems
• Specialized Convolution Processors (e.g. Convolvotron)
Graphics
Processor
Degree of Freedom (DOF)
Acoustic Displays (spatial sound)
Real-time OS
Head-mounted display(HMD)
• Head Mounted Displays (HMD)
• Projection Displays (CAVE, Virtual Plane)
Face / Gesture /
Motion Analysis
3D Input/output
Visual Displays (3D imagery)
VE
31
Display & interactive Devices
Force-feedback devices
Hand and body tracking
3D Sound
Processor
Haptic
Màn hình và các thiết bị tương tác
Haptics
Host Computer
3D Tracker
System
CNTT-ĐHBK Hà nội
Dials
Voice
Recognition
OUTPUT
Collision Detection
Video Camera
Glove tracker
receiver
Hand position and orientation
forces and torque feedback devices
tactile devices
devices to produce other stimuli such as heat or cold.
Gaze sensing
CNTT-ĐHBK Hà nội
35
CNTT-ĐHBK Hà nội
36
Khoa CNTT - ĐHBK Hà nội
CuuDuongThanCong.com
0913030731
/>
6
Bài 12 Thực tại ảo
Sensory Interface
CNTT-ĐHBK Hà nội
Motor Interface
37
X. CAVE
"CAVE Automatic Virtual Environment”.
1. Introduction
CNTT-ĐHBK Hà nội
38
CAVE - An Immersive VR Environment
(EVL, University of Illinois at Chicago)
One of the leading VR environments is the CAVE.
“CAVE” stands for “CAVE Automatic Virtual Environment”.
Originally a hardware/software combination, the CAVE was developed
at the Electronic Visualization Lab at the U. of Illinois, Chicago, in the
early 1990’s.
The software component has since been separated and turned into a
commercial product (CAVELIB, sold by VRCO) that runs in any number
of VR environments.
CNTT-ĐHBK Hà nội
39
Standard CAVE hardware consists of:
Any number of walls (screens).
• The original idea was four: three vertical and a floor.
• ARSC has a 1-wall CAVE called an “ImmersaDesk”; we plan to
get a 3-or-4 wall CAVE soon.
Any number of stereo glasses.
A wand.
• One of these is for the driver; it has a tracker on it.
Like GLUT, CAVELIB handles program execution
via registered callbacks.
• This is a stick with a tracker on it, along with some buttons and a
directional control (“joystick”).
• The wand functions like a 3-D mouse.
CNTT-ĐHBK Hà nội
40
3.CAVE:
Software
2.CAVE Hardware
CNTT-ĐHBK Hà nội
41
GLUT can still be used with CAVELIB, but you never
call glutMainLoop, and so GLUT callback registration
does nothing.
Thus, the full features of GLUT are not available in
CAVE programs.
On the other hand, for programmers who are familiar with
GLUT, learning CAVELIB is not hard.
CNTT-ĐHBK Hà nội
42
Khoa CNTT - ĐHBK Hà nội
CuuDuongThanCong.com
0913030731
/>
7
Bài 12 Thực tại ảo
CAVE:
Software [2/3]
CAVE:
Software [3/3]
CAVE programs run as a collection of processes.
The processes are created and managed by CAVELIB. The
programmer does no forking.
There is a main process, one process for each wall (and various other
processes that the programmer does not need to worry about).
These processes may need to access common data.
• There are facilities for allocating shared memory.
• Read/write locks are available.
CAVELIB includes facilities for:
• This is done automatically.
• For example, a standard 4-wall CAVE needs 8 projection matrices for each frame
of animation (assuming the user has 2 eyes).
Most of this is handled by CAVELIB, but the programmer needs to
explicitly allocated shared memory and set/clear locks.
CNTT-ĐHBK Hà nội
43
Determining head position and orientation.
Computing projection matrices for each wall, for each eye.
Determining wand position and orientation, as well as the state of the wand
buttons and joystick.
Managing all the various processes.
Allocating shared memory areas.
Setting and clearing read/write locks on objects.
Determining the time.
Starting up and ending the whole mess.
CNTT-ĐHBK Hà nội
44
Khoa CNTT - ĐHBK Hà nội
CuuDuongThanCong.com
0913030731
/>
8