OpenGL has been put to many uses. This chapter is about one use in particular that has recently become widely popular: virtual reality.
OpenGL is ideally suited for a variety of graphical and modeling purposes, and it is the enabling technology behind the pseudorealism of virtual reality. These computer-generated “worlds,” in which many of the user’s senses can be immersed, contain three-dimensional scenes that include sound and sometimes feeling and resistance via tactile feedback mechanisms. Some products offer technology as diverse as tactile feedback gloves, three-dimensional goggles, and arcade-style computer games that allow realistic movement in all directions.
The Internet, which is far more mature technologically than is virtual reality, has recently become the popular playground of the modern computer enthusiast—not to mention a necessity for the professional, academic, and military users for which it was originally intended. Few of us today are unfamiliar with the term cyberspace—a virtual world of its own with many places to visit and people to meet—and most of us have spent at least some time surfing this network of computers and information resources.
In this chapter we will briefly discuss an implementation of virtual reality over the Internet that has its origins in OpenGL. For the sake of brevity, we will assume you have some familiarity with the Internet, the World Wide Web (the Web or WWW), and the Web browsers that facilitate navigation across the World Wide Web.
It didn’t take long for someone to make the connection between cyberspace and virtual reality. If in cyberspace you are traveling around the world, visiting different places and accessing various types of information, it makes sense to be able to do this in a visual environment rather than with textual displays that are so hard to muddle through.
Graphical navigation of the Internet first began when Tim Berners-Lee at the European Center for Nuclear Physics (CERN) in Geneva devised a set of protocols that made it possible to easily encode the connection between various files contained in FTP archives. These connections link documents to other documents of interest, allowing navigation from one document to another, even across directories, computers, and continents. These protocols use Universal Resource Locators (URLs) to identify document locations and were the genesis of the World Wide Web.
Soon thereafter, Marc Anderson (who later founded Netscape Communications Corporation) created a Web browser that could mix various kinds of files, including text and graphics, into a single presentation. This browser was NCSA Mosaic, and it could represent the relationships within a document to other documents, as well as provide a protocol for formatting the documents with embedded images and different types of text. The Internet hasn’t been the same since. In less than a year, the Internet went from being a technical thing-a-ma-bob to something anyone can use with point-and-click ease.
Web pages comprise mostly text documents in a special format called HTML (HyperText Markup Language). HTML documents can embed other documents, graphics, even video and sound, as well as hypertext links to other documents and Web sites. Figure 20-1 shows a typical Web home page; this one belongs to Silicon Graphics and is fairly graphics heavy. By clicking on a button for a subject of interest to you, or on a “hot spot” on the larger image, you are transported to another page containing the linked information of interest and/or a whole new set of categories and links to other pages.
The graphical yet two-dimensional method of Web navigation became immensely popular in just a couple of years. “Navigating” through cyberspace in this manner was very efficient as long as the information you were seeking could be represented as a document. However, the world is not a library, and Internet entrepreneurs were pushing the limits of what could be accomplished effectively with two-dimensional document-centric navigation.
Then in 1994 (not that long ago!), Mark Pesce and Tony Parisi created a new type of Web document and browser that could navigate in three dimensions. On Valentine’s Day 1994, the first virtual reality Web site was up and running. It was three-dimensional, and it allowed you to navigate a 3D scene and click on objects of interest that were linked to other 3D scenes or HTML Web pages.
These 3D files were modeled with a new scripting language, VRML (originally meaning Virtual Reality Markup Language and eventually Virtual Reality Modeling Language). Silicon Graphics (SGI), a world leader in computer graphics technology, graciously placed their Open Inventor scene-description language file format in the public domain, and it became the basis for VRML version 1.0.
Fueled by free source code from SGI, by April of 1995 VRML became the darling of the popular Internet press. VRML browsers from multiple vendors appeared on the market, for all of the popular platforms including PCs. Now the technology existed for users to do more than just select items from a menu. Now they could actually walk through a library or museum or even a shopping mall, and pick up and examine items of interest.