FreeVR Library Programming Tutorial (w/ OpenGL)

The FreeVR Library will be used to exemplify many VR interface and programming techniques. FreeVR will work in most local VR facilities (eg. CAVE™ or Head-Based-Display), as well as on the available desktop machines in a simulated-VR mode. It can be used on PC's with Linux and OpenGL installed, or in a (currently very) limited way on PC's with Cygwin installed.

The FreeVR webpage is www.freevr.org.

This tutorial takes the approach of starting with an extremely simple initial example and then advancing in very small increments (baby steps) until we can perform some interesting tasks in virtual reality. Another point to make about this tutorial is that it is not intended as a means to learn advanced OpenGL programing. The computer graphics in these examples are all very simple. The goal of the tutorial is to highlight programming tasks that are unique to programming for a virtual reality system.

On the other hand, some basic OpenGL techniques can be learned by following this tutorial, as it will show how to handle texture maps, billboards, cutting planes, and moveable lights.

Other tutorials are under development for interfacing FreeVR to additional rendering and world simulation systems. Presently there is a tutorial available for the SGI Performer scene-graph library, but as Performer has greatly decreased in usage new tutorials will cover similar, but more popular libraries.

This tutorial has been most recently tested with FreeVR version 0.6a.


Part 3: Examples 12 - 14

Now that we know the basics about creating simple VR experiences, and have done a couple of interesting things, such as grabbing and moving objects, we will continue the tutorial of OpenGL FreeVR programs by introducing how to let participants travel through the virtual world, give objects (simple) behaviors, and add user interface objects to the world.

Each example links to a copy of the source code (and the difference from the previous example) . The examples can be compiled with one or more of the following additional files:



Example 12: Traveling through the world (ex12)

Another common way to "interact" with a virtual world is to move through it.

 


Example 13: Agent-style interaction with the world (ex13)



Example 14: User Interface: Virtual Controls (ex14a-14f)


The following six examples show how different forms of virtual controls can be implemented and used to control actions within the virtual world.

These examples are implemented in a very rudimentary fashion, with limits on how they can be positioned in the virtual world.

These examples now require some additional shapes not included in the simpler version of the shape source code. The new shapes code is in (wrs_shapes.c).



Example 14a: Virtual Controls: Toggle Button (ex14a)



Example 14b: Virtual Controls: Slider (ex14b)



Example 14c: Virtual Controls: Lever (ex14c)



Example 14d: Virtual Controls: Radio Buttons (ex14d)



Example 14e: Virtual Controls: Joystick (ex14e)



Example 14f: Virtual Controls: Push Button (ex14f)



Example 15: The four methods of manipulation (ex15)

This example is not yet fully implemented.





Last modified 10 January 2010.
Bill Sherman, shermanw@indiana.edu

© Copyright William R. Sherman, 2010.
All rights reserved. In particular, republishing any files associated with this tutorial in whole or in part, in any form (included electronic forms) is prohibited without written consent of the copyright holder. Porting to other rendering systems is also prohibited without written consent of the copyright holder.