11-05-2011, 11:11 AM
[attachment=13528]
Creating Virtual Reality Applications Using FreeVR
Application demos
1) What is Virtual Reality?
What is Virtual Reality?
Physically immersive (generate input to user's sensory systems)
Interactive (user can change the experience)
What can we use for physically immersive?
3-d vision
projection systems: [anaglyphic (red/blue), polarized, active stereo]
head mounted displays.
What can we use for physically immersive?
3-d sound
multichannel speaker setups
Headphone simulation
What can we use for physically immersive?
Other:
Touch/force feedback
Taste
Smell
Environmental conditions (temperature)
Accelerations/motion
Direct connection to human nervous system
What can we use for interactive?
location tracking systems: magnetic, video, ultra-sonic
What can we use for interactive?
joysticks: wands, game controllers
other: gloves, eye tracking, biological indicators (heart-rate, breathing), props (steering wheels, fishing poles)
2) What are my choices for developing an application/experience?
Write from scratch
Low-level library
Medium-level library (scenegraph)
High-level graphical program
Use domain-specific, off the shelf program
Write from scratch
Pro:
complete control
maximum performance/speed possible
Con:
Long, difficult development
Often device dependent
Low-level library(CAVELib, FreeVR, DIVERSE)
Pro:
lots of control (C/C++,OpenGL programming)
device independent
Con:
difficult for non-programmers,
more control/freedom than most applications require
Medium-level library (OpenSceneGraph, Performer)
Medium-level library (OpenSceneGraph, Performer)
Pro:
built in algorithms to cull (eliminate) non-viewable objects
built in algorithms for collision detection
Con:
Still lots of programming
learning curve to use scenegraph format
usually still low-level library dependent
High-level graphical program (Virtools)
High-level graphical program (Virtools)
Pro:
Easy visual design of worlds
Visual, flow design for object behaviors
Con:
Expensive
speed/performance?
Still have to learn to “program”
Use domain-specific, off the shelf program (Amira, VMD)
Use domain-specific, off the shelf program (Amira, VMD)
Pro:
Very easy, especially if group is already using non-VR version of program
Con:
Individual configuration
not applicable to making custom applications
3) Why use FreeVR?
device independence (input and output)
free/opensource (CAVELib is not)
actively developed (cluster support soon)
I know how to configure it
How does it become device independent?
configuration file (.freevrrc) maps buttons, sensors, and screen locations to FreeVR internals. Different physical configurations require different .rc settings.
on startup FreeVR opens all necessary windows, and handles projection matrices, so correct view is on correct screen.
abstraction of buttons:
abstraction of location sensors:
abstraction of display space:
4) FreeVR program Outline pt.1
FreeVR program Outline pt.2
FreeVR programming Subtleties
Rendering and updates occur in separate processes, so shared memory is needed. FreeVR includes vrShmemAlloc0 which is comparable to malloc. Typically a world data structure is created, modified, and passed around.
because of the separate processes we need to lock the world data when we are writing and reading it. FreeVR includes vrLock. We can call vrLockReadSet(the_lock); vrLockReadRelease(the_lock);