VR Using QuickDraw 3D - 1
Volume Number: 14
Issue Number: 7
Column Tag: Power Graphics
Desktop VR using QuickDraw 3D, Part I
by Tom Djajadiningrat and Maarten Gribnau, Delft University of Technology
Edited by the MacTech Editorial Staff
Using the View Plane Camera for Implementation of a
Head-Tracked Display
Summary
Wouldn't it be cool to be able to look around three dimensional objects displayed on
your monitor by moving your head, just as if the objects were standing there? Kind of
like a hologram, but with the flexibility of 3D computer graphics. Futuristic and
expensive? It could be easier and cheaper than you think. In a two part article we
explain how to implement such a system, also known as a head tracked display, on a
PowerMacintosh. Head-tracked perspective provides the user with a sense of depth
without the use of stereoscopy. To facilitate implementation we use QuickDraw 3D,
Apple's 3D graphics library. In terms of hardware all you need is a PowerMac with
QuickDraw 3D, an absolute position-measuring device with three degrees of freedom
and, preferably, a QuickDraw 3D accelerator board. This month we discuss the
graphics-related aspects of a head-tracked display. Next month, we will discuss the
hardware-related aspects.
Introduction
When we move about in everyday life we see objects in our environment from
different perspectives. As we do this it appears that objects at different relative depths
shift with respect to each other. This phenomenon, called movement parallax, is a very
strong depth cue. It is possible to mimic movement parallax in virtual reality
systems. In immersive Virtual Reality (VR) (where the user wears a helmet)
movement parallax is combined with stereoscopy. Apart from immersive systems
there is also another category of VR systems called Desktop VR which uses a
conventional monitor. Desktop VR is a rather broad term which can mean anything
from a simple system showing a perspective "walk-through" with mouse
interactivity, to a complex system using both stereoscopy and movement parallax.
With immersive VR the user's real environment is completely replaced by a virtual
one, while with desktop VR a virtual scene is embedded within the user's real
environment. One of the good things about a desktop VR system which uses movement
parallax only is that the user's 3D impression is considerably improved without the
need for some kind of 3D glasses and stereo rendering. For movement parallax, all that
is needed is a way of determining the user's head position. As a result only a minimum
of headwear is required.
When the user looks around a virtual scene displayed on a monitor, his head position
changes, which can be detected by means of a position sensor attached to his head. In
response the computer can update the perspective of the scene shown on the monitor in
accordance with his new head position. The result is that the user can look around the
objects in the virtual scene as if they were standing in front of him (Figure 1).
Figure 1. An observer looking at a virtual house displayed on a head-tracked display.
By moving his head to the right, he views the house from the right. By moving his head
to the left, he views the house from the left.
Perception psychology uses the term movement parallax to describe a particular depth
cue. In the human-interfacing community many terms are used to describe desktop VR
systems which make use of the movement parallax depth cue. These terms include
head-tracked display, head-slaved virtual camera, animated perspective and virtual
window system. In this article we will use the term head-tracked display.
A Head-Tracked Display on the Mac
Required and recommended software and hardware
What you need is a PowerMacintosh, QuickDraw 3D 1.5.3, a position sensor with three
degrees of freedom, and preferably a QuickDraw 3D accelerator card. We use
QuickDraw 3D because it facilitates communication with input devices, and
implementation of the correct coupling between head position and camera movement.
The position sensor needs to detect position with three degrees of freedom and needs to
be suitable for attaching to the head. A low cost option is to use a FreeD (formerly
known as the "Owl") ultrasonic tracker by Pegasus Technologies. Other, more
accurate, but also more expensive options are, for example, a Dynasight infra-red
tracker by Origin Instruments or a Flock of Birds electro-magnetic tracker by
Ascension Technologies. Please note that we supply basic driver applications and
source code for the FreeD, the Dynasight and the Flock of Birds. We also provide
information on how to connect these devices to a Macintosh computer.
A QuickDraw 3D accelerator board is recommended because, with movement parallax,
frame rate is quite important. The lower the frame rate, the longer the delay between
establishing the sensor position and the corresponding perspective being displayed on
the monitor. In the meantime the user may have moved to a different location. As a
result of this lag, the perspective which is displayed does not match the user's viewing
position. To the user this mismatch expresses itself as distortion and instability of the
virtual scene.
What you should know
We assume that you are familiar with the basics of QuickDraw 3D programming. If you
have not dealt with QuickDraw 3D before we suggest that you have a look at the
introduction to QuickDraw 3D in Develop 22 (Thompson and Fernicola, 1995) or at
chapter nine "QuickDraw 3D" of "Tricks of the Mac Game Programming Gurus
(Greenstone, 1995).
Overview Of The Two-Part Article
There are two software components which together form our head-tracked display: a
viewer application, called MacVRoom, and a driver. As mentioned previously, the
implementation of the head-tracked display is described in two parts. In this month's
graphics issue we give an explanation of how to control the camera by the user's head
position to show the corresponding perspective on the monitor. We also show you how
to actually get the head-tracked display up and running. This section tells you how to
use MacVRoom, how to attach the sensor to your head, and how to troubleshoot.
Next month, we will explain how to write the driver and how to use the Pointing
Device Manager to handle the communication between the driver and MacVRoom. We
will also discuss a number of calibration methods to get the best possible results.
Depending on your needs, you may wish to read parts of, or all of this and next month's