The Annotated VRML 97 Reference

1 Intro     Concepts     3 Nodes     4 Fields/Events    Conformance
A Grammar     B Java     C JavaScript     D Examples     E Related Info    References
Quick Java         Quick JavaScript         Quick Nodes   

  About the Book
  Copyright © 1997-99
  Purchase the book from

Chapter 1

What is

Design Goals


VRML and
  the WWW




Chapter 1 Introduction

This chapter provides an introduction to VRML. It includes an overview of VRML, the goals and constraints used in designing VRML, a brief history of the specification, how VRML fits into the WWW, predictions on the future of the specification, and an overview of the VRML language.

+ 1.1 What Is VRML?

VRML, sometimes pronounced vermal, is an acronym for the Virtual Reality Modeling Language. Technically speaking, VRML is neither virtual reality nor a modeling language. Virtual reality typically implies an immersive 3D experience (such as a head-mounted display) and 3D input devices (such as digital gloves). VRML neither requires nor precludes immersion. Furthermore, a true modeling language would contain much richer geometric modeling primitives and mechanisms. VRML provides a bare minimum of geometric modeling features and contains numerous features far beyond the scope of a modeling language.

So if VRML is not virtual reality or a modeling language, what is it? There are several answers to this question. At its core, VRML is simply a 3D interchange format. It defines most of the commonly used semantics found in today's 3D applications such as hierarchical transformations, light sources, viewpoints, geometry, animation, fog, material properties, and texture mapping. One of the primary goals in designing VRML was to ensure that it at least succeeded as an effective 3D file interchange format.

The second answer is that VRML is a 3D analog to HTML. This means that VRML serves as a simple, multiplatform language for publishing 3D Web pages. This is motivated by the fact that some information is best experienced three dimensionally, such as games, engineering and scientific visualizations, educational experiences, and architecture. Typically these types of projects require intensive interaction, animation, and user participation and exploration beyond what is capable with a page-, text-, or image-based format (i.e., HTML).

Another answer is that VRML provides the technology that integrates three dimensions, two dimensions, text, and multimedia into a coherent model. When these media types are combined with scripting languages and Internet capabilities, an entirely new genre of interactive applications are possible. A 3D metaphor presents a natural user experience that supports classic two-dimensional (2D) desktop models as well as extends into broader contexts of space and place. Many have speculated that the 3D world model will supersede and thus replace the popular 2D desktop model as the primary user interface paradigm in the next decade. Of course, there are a variety of challenges that need to be overcome before this is possible, such as 3D user interface and navigation, user training, and ubiquitous 3D graphics performance.

A fourth answer, and the one most publicized and debated, is that VRML is the foundation for cyberspace and the on-line virtual communities that were painted and popularized by science fiction writers William Gibson in Neuromancer and Neal Stephenson in Snow Crash. Critics have accurately pointed out that VRML does not yet define the networking and database protocols necessary for true multiuser simu-lations. However, the strategy behind VRML has been

  • evolve the standard one step at a time
  • keep it simple
  • standardize only on problems that are completely understood and reasonably solved
  • encourage experimentation and extensions on the frontiers
  • don't reinvent technologies that can be solved outside of VRML (e.g., HTTP)

There are already several working, multiuser systems implemented on top of VRML—proof that the incremental approach is working.

So the answer to "What is VRML?" is actually "All of the above" and will most likely never be a simple one-sided answer. However, there are a few misconceptions or "wrong" answers. For example, VRML is not a programming library for application developers. Since VRML is based on the Open Inventor file format, many people assume that it also provides the rich programming interfaces and tools included in the Open Inventor toolkit. In actuality, VRML is an extended subset of Open Inventor's file format and does not define an application programmer interface (API). The fact that VRML includes scripting language integration tends to promote this misconception. Scripting language capabilities are predominantly intended for authors who need more power or integration.

---------- separator bar ------------
+ 1.2 Design Goals and Constraints for VRML 2.0

VRML 2.0 was created to extend the capabilities of VRML 1.0. VRML 1.0 specified static objects and scenes, and although it is very successful as a file format for 3D objects and worlds, objects and worlds that don't do anything aren't very interesting. The overall goal for VRML 2.0 was fairly modest: to allow objects in the world to move and to allow the user to interact with the objects in the world, allowing the creation of more interesting user experiences than those created with VRML 1.0. It was decided that more ambitious features—such as multiuser interaction or autono-mous creatures that can sense and react to their environment—would not be a standard part of VRML 2.0. It is expected that many extensions to VRML 2.0 will be implemented and tested, with the best extensions incorporated into a future version of the standard.

The goals for VRML 2.0 might be modest, but the constraints placed on the design were very ambitious. The technical notes scattered throughout this book give examples of how and why specific design decisions were made. The entire VRML 2.0 design was profoundly influenced by several general design philosophies arising from the constraints put on the design by the VRML standardization process and the intended uses of VRML.

Simplicity was an important design constraint. The success of the HTML file format motivated this constraint. The simplicity of HTML fueled the explosive growth of the WWW. Because it is possible to create Web pages with any generic text editor, and because it is relatively easy to create an HTML browser, small organizations and individuals quickly created thousands of Web pages and a multitude of browsers. Even though VRML 2.0 is significantly more complex than VRML 1.0, there are at least a half a dozen different VRML 2.0 browsers available, with more under development. A simple specification encourages the development of more browsers, which leads to competition, which will encourage the development of higher quality implementations.

Another important design constraint was allowing implementations to be highly optimized. The performance ramifications of every feature were considered. If a fast implementation of something didn't seem possible, the feature was rejected. Features were also rejected if they made a "typical" implementation slower even when the feature was not being used. It is surprisingly easy to add a "little" feature that causes all implementations to be a little bit slower and is surprisingly hard to remove any feature once it is part of the specification. Good performance still requires a lot of work from world creators to create optimizable VRML files and requires a lot of work from VRML implementors to optimize their implementations, but VRML 2.0 is designed to make that work as easily as possible.

VRML 1.0 has gained widespread support as a file interchange format, and another constraint on the VRML 2.0 design was to make it an even better interchange format. This means that it must be easy for applications to both read and write VRML files. One of the critical design decisions was whether it would be best to add -animation and interaction capabilities to VRML by making VRML a full-fledged programming language. Programming languages are very powerful, but they make poor file interchange formats. For example, Adobe's PostScript and HTML are both used to define 2D documents and both could be used as file interchange formats. However, HTML is much more common, even though it was introduced long after PostScript and is much less powerful. One of the reasons HTML is so successful as a file interchange format is the wide variety of HTML editors that can read, modify, and write any HTML file. Because PostScript is a programming language, it is almost impossible to do the same for PostScript files. The needs of both VRML browsers and VRML editors are considered in the VRML 2.0 design.

Another property of a good file interchange format is composability. It should be relatively easy to take files created by various people or tools and compose them together to create a new document. This is another property that VRML shares with HTML: It is easy to cut and paste text from several HTML documents using either a generic text editor or a specialized editing tool, just as it is easy to cut and paste objects between VRML worlds.

Finally, scalability is a constraint on the VRML 2.0 design. VRML is designed to scale in three ways. First, it should be theoretically possible for a VRML browser to handle a world distributed across the Internet that contains millions or billions of objects. Second, VRML should work well when used with both very powerful and very inexpensive machines, allowing the VRML browser to trade off image or simulation quality for improved performance and to scale well with increased hardware performance. And third, VRML worlds should scale with network performance, from the 14.4K modems that are common today to multigigabit connections that might become common in the future. Scalability profoundly influenced the entire design of VRML 2.0, and although there are still many unsolved problems, the infrastructure defined by VRML 2.0 should continue to scale as worlds get larger and machines and networks get faster. The ultimate test of any design is a working, practical implementation, and at the time of this writing the scalability limits of the VRML 2.0 design have not been tested because none of the currently available browsers are designed to handle very large worlds.

---------- separator bar ------------
+ 1.3 History of the VRML Specification

In 1989 a new project was started at Silicon Graphics, Inc., by Rikk Carey and Paul Strauss (code name: Scenario) to design and build an infrastructure for interactive 3D graphics applications. The two original goals were to build a development environment that enabled the creation of a wide variety of interactive, distributed 3D applications and to use this environment to build a new 3D desktop interface. The first phase of the project concentrated on designing and building the semantics and mechanism for the foundation framework. The distributed applications issues were used as design goals throughout the work, but were beyond the scope of the first-phase implementation. In 1992 the Iris Inventor 3D toolkit was released as the first product of these efforts. Iris Inventor was a C++ toolkit that defined many of the semantics found in VRML today. An important part of the Inventor toolkit was the file format used to store application objects. From the very beginning, the Inventor file format was designed to be lightweight and easy to use. In 1994 the second major revision of Inventor was released. It was called Open Inventor because it was portable to a variety of platforms and because it was based on Silicon Graphics' OpenGL. The reference manual describing the objects and file format in the Open Inventor toolkit were eventually used by Gavin Bell to write the first draft of the VRML 1.0 specification.

In 1994 Mark Pesce and Tony Parisi built an early prototype of a 3D browser for the WWW, called Labyrinth. Later that year, Mark and Brian Behlendorf created the VRML mailing list, www-vrml, and issued a call for proposals for a formal specification for 3D on the WWW. Gavin Bell saw the obvious suitability of Inventor and quickly put together a proposal based on Open Inventor by choosing the fundamental elements of the Inventor file format (leaving out the tricky stuff), adding a couple of necessary WWW features (WWWAnchor and WWWInline nodes), and using the Inventor reference manual as the starting point for the text. After a stimulating debate on the mailing list, the Inventor proposal was voted in as the working document for the specification. Gavin, with help from Tony, Rikk, and a variety of Inventor engineers, revised and finalized the first draft of the VRML 1.0 specification. In October 1994 at the Second International Conference on the World Wide Web in Chicago, the specification was published.

During the first half of 1995 the VRML 1.0 specification underwent a variety of fixes and clarifications, but was functionally unchanged. By August 1995 there was a lot of discussion on the mailing list concerning the creation of a VRML 1.1 or a VRML 2.0. Some people thought that VRML needed only a few incremental features, while others felt that it needed a complete overhaul. But, everyone agreed that VRML 1.0 was missing key features (animation, interaction, and behavior) and that a significant revision was needed. The debates raged from September to December with no clear outcome. In January 1996 a request for proposals for VRML 2.0 was issued to the VRML mailing list. The Moving Worlds proposal led by Silicon Graphics, Inc. (, in collaboration with Sony Corporation ( and Mitra (, received a strong majority of the votes and became the working document for the VRML 2.0 specification. In August 1996 at SIGGRAPH 96 in New Orleans, the first version of the VRML 2.0 specification was released.

At its July 1996 meeting in Kyoto, the International Standards Organization's (ISO) JTC1/SC24 committee agreed to publish the August 1996 version of VRML 2.0 as Committee Draft (CD) 14772. The Draft International Standard (DIS) text was submitted in April 1997. This draft of the VRML specification is known as "VRML97" (following the ISO naming convention that incorporates the year of release into the name). Following a four-month ISO DIS ballot, VRML97 should be forwarded for publication as an ISO standard in mid 1997. The text will be published electronically as an HTML document and will mark the first time that an ISO standard has been so published.

---------- separator bar ------------
+ 1.4 VRML and the WWW

VRML is designed to fit into the existing infrastructure of the Internet and the WWW. It uses existing standards wherever possible, even if those standards have some shortcomings when used with VRML. Using existing standards instead of inventing new, incompatible standards makes it much easier for the Web developer, who can use existing tools to help create VRML content. It also makes it much easier for somebody implementing the VRML standard, since libraries of code for popular standards already exist.

VRML files may contain references to files in many other standard formats. JPEG, PNG, GIF, and MPEG files may be used as texture maps on objects. WAV and MIDI files may be used to specify sound that is emitted in the world. Files containing Java or JavaScript code may be referenced and used to implement programmed behavior for the objects in your worlds. Each of these is an independent standard, chosen to be used with VRML because of its widespread use on the Internet. This book (and the VRML97 specification) describes how they are used with VRML; it does not attempt to define these other standards or describe how to create files in these other file formats.

The definition of how VRML should be used with other standards is generally done by the organizations that define those standards. For example, the World Wide Web Consortium (W3C) is standardizing an <OBJECT> tag for HTML that will be used to embed VRML, Java, or other file types into HTML documents (replacing the currently used, pseudostandard <EMBED> and <APPLET> tags). Using VRML with HTML pages and Java applets can be very effective. Combining both 2D and 3D information is often much better than either 2D or 3D alone.

There are at least six different ways that VRML, HTML, and Java may be combined, making it easy to get confused about whether or not some particular combination is required by the HTML, Java, and/or VRML standards. The following list summarizes the possibilities:

  • VRML file inside an HTML file: This is a semistandard part of HTML using the <EMBED> or <OBJECT> HTML tag, although HTML does not require that HTML browsers support embedding of VRML files (or any other type of file) into HTML documents.
  • Java code inside a VRML file: This is a standard (although not required) part of VRML 2.0, using a Script node that refers to the compiled Java code.
  • Java applet communicating with a VRML browser: This is a not-yet-standard extension to VRML 2.0 known as the External Authoring Interface (EAI). At some time in the future it will probably become a standard (but perhaps not required) part of VRML.
  • Java classes corresponding to VRML nodes: Several companies are developing programming toolkits that define in-memory representations of VRML nodes that can be used in any way the programmer wishes. These can be extremely useful when implementing VRML browsers or VRML tools, but none are yet a standard part of either VRML or Java.
  • HTML file inside a VRML file: Using an HTML file as a texture map to display it inside a 3D world would be an interesting extension to VRML, but it is not yet supported by any VRML browser and is not part of VRML 2.0.
  • Java applet inside a VRML file: Using a Java applet as a texture map to display the Java program inside the 3D world would also be an interesting extension. Interaction with the Java program could also be supported by projecting pointing device motion onto the applet. However, this also is not supported and is not part of VRML 2.0.

---------- separator bar ------------
+ 1.5 Versions

The April 4, 1997 revised VRML 2.0 (aka VRML 97) specification contains numerous editorial fixes and several technical changes from the original August 4, 1996, version. With the exception of changes to the Java and JavaScript interfaces, VRML files are backward compatible. Therefore, VRML files based on the August 1996 version should read successfully into implementations based on the April 1997 revision.

---------- separator bar ------------
+ 1.6 Future of the VRML Specification

[Author's Note: This section is fairly out of date--see the Web3D Consortium for more recent developments, including the X3D initiative:]

There are several obvious short-term issues for the VRML specification. A binary file format for VRML has been discussed and debated since the early days of VRML. At present, standard file compression tools, such as gzip, are used to compress VRML files. This yields, on average, about a 5:1 compression ratio and requires no extra implementation by the VRML browser. However, many users and developers have requested even more compression. A binary format for VRML could produce much higher compression ratios (e.g., 10:1 to 50:1). Therefore, a request for proposals was issued to the VRML community in September 1996 ( The only submitted proposal was by IBM, Apple, and Paragraph International, Inc. ( This proposal has been adopted as the working document for VRML's binary file format and will continue to be reviewed and revised, and eventually ratified as an addendum to the VRML specification.

The second obvious short-term issue for VRML is the External Authoring Interface (EAI). Many users have requested that a standard programmer interface to VRML browsers be defined. This feature allows technical users to write external programs that communicate with a VRML browser. In October 1996 a request for proposals for an EAI was issued ( Two proposals were received and the proposal by Chris Marrin of Silicon Graphics, Inc., won the voting and was selected as the working document (
/ExternalInterface.html). This work will continue to be reviewed and revised, and eventually ratified as an addendum to the VRML specification.

Many feel that the most important long-term issue for VRML is adding multiuser capabilities. At present there are several groups working on related research and proposals, such as Living Worlds (, Open Community (, and Universal Avatars ( The first implementations of these proposals will appear in 1997 and should be interesting to see.

---------- separator bar ------------
+ 1.7 An Overview of VRML

The following is a brief overview that describes the major features of VRML.

1.7.1 Scene Graph Structure

VRML files describe 3D objects and worlds using a hierarchical scene graph. Entities in the scene graph are called nodes. VRML 2.0 defines 54 different node types, including geometry primitives, appearance properties, sound and sound properties, and various types of grouping nodes. Nodes store their data in fields, and VRML 2.0 defines 20 different types of fields that can be used to store everything from a single number (the SFFloat field type) to an array of 3D rotations (the MFRotation field type).

The VRML scene graph is a directed acyclic graph. Nodes can contain other nodes (some types of nodes may have "children") and may be contained in more than one node (they may have more than one "parent"), but a node must not contain itself. This scene graph structure makes it easy to create large worlds or complicated objects from subparts.

1.7.2 Event Architecture

VRML 2.0 defines an event or message-passing mechanism by which nodes in the scene graph can communicate with each other. Each node type defines the names and types of events that instances of that type may generate or receive, and ROUTE statements define event paths between event generators and receivers.

1.7.3 Sensors

Sensors are the basic user interaction and animation primitives of VRML. The TimeSensor node generates events as time passes and is the basis for all animated behaviors. Other sensors are the basis for all user interaction, generating events as the viewer moves through the world or when the user interacts with some input device. Sensors only generate events; they must be combined with other nodes via ROUTE statements to have any visible effect on the scene.

1.7.4 Scripts and Interpolators

Script nodes can be inserted between event generators (typically sensor nodes) and event receivers. Scripts allow the world creator to define arbitrary behaviors, defined in any supported scripting language. The VRML 2.0 specification defines Script node bindings for the Java and JavaScript languages.

Interpolator nodes are essentially built-in scripts that perform simple animation calculations. They are usually combined with a TimeSensor and some node in the scene graph to make objects move.

1.7.5 Prototyping: Encapsulation and Reuse

VRML 2.0 includes a prototyping mechanism for encapsulating and reusing a scene graph (the PROTO statement). Geometry, properties, and animations or behaviors can be encapsulated, either separately or together. Prototyping allows the definition of a new node type in terms of a combination of existing node types, which can make VRML easier to use and can reduce the size of VRML files.

1.7.6 Distributed Scenes

VRML 2.0 includes two primitives that allow a single VRML world definition to span the WWW. The Inline node allows the inclusion of another VRML file stored anywhere on the Web and the EXTERNPROTO statement allows new node definitions to be fetched from anywhere on the WWW. More generally, EXTERNPROTO allows nodes to be defined external to the VRML file and it is the basic extensibility mechanism for VRML.