Basics | Navigation | Creating | Compatibility | Cameras | Efficiency | Lighting | LODs | Avatars | Sound | Animation | Future

VRML Overview

Virtual Reality Modeling Language is a platform-independent standard for sharing 3D models on the Internet, and for 3D navigation on the Web.

Whereas HTML provides 2D forms, links and images -- VRML provides 3D links, objects and controls.

To use VRML you need a VRML browser or plugin. If you plan to use multiple VRML plugins for testing or comparison -- get a plugin manager, like Sony's NPC plugin chooser for Windows.

The Basics

VRML describes 3D models in the form of nestable "nodes". Nodes generally define 3D physical descriptions that may be made up of 3D primitives, such as spheres, cuboids, cones and cylinders, or of complex polyhedra made up of polygon facets.

In addition to these form descriptions, nodes can also define materials, colors, texture maps, lighting, shape transformations and viewing criteria.

These nodes support linkable anchors, so that clicking on a 3D object will bring up another 3D model or any other URL.

VRML 1.0

The following is a simple example of a VRML 1.0 file:

    #VRML V1.0 ascii
      Texture2{ filename "http://host/path/texture.gif" }
      Sphere{ radius 100 }
The "#VRML V1.0 ascii" tag must be on the very first line of VRML 1.0 files.

The Separator node is used to nest and separate VRML parts. All VRML 1.0 files must start with a parent Separator.

The Texture2 node specifies the image to be mapped to the surface of subsequent parts within that separator.

The Sphere node defines the primitive.

VRML 2.0

While the VRML 2.0 specification is a functional superset of VRML 1.0, the files are incompatible. Fortunately, most VRML 2.0 browser also support VRML 1.0.

In addition to the features supported in VRML 1.0, VRML 2.0 also provides a means to add behaviors to 3D objects. Using Java, you can animate 3D parts, or make them controllable by users or other programs.

The following is a simple example of a VRML 2.0 file:

    #VRML V2.0 utf8
    DEF MyModel Transform
        DEF MyShape Shape
          appearance Appearance
            material Material
              ImageTexture{ URL "http://host/path/texture.gif" }
          geometry Sphere{ radius 100 }
As you can see, VRML 2.0 is a bit more wordy than VRML 1.0. This was done to provide better support for enhancements and vendor extensions, as well as to provide a way to address separate parts and to add behaviors.

The "#VRML V2.0 utf8" tag must be on the very first line of VRML 2.0 files (utf8 indicates that this file uses ANSI encoding).

The Transform (or Group) node acts like a VRML 1.0 Separator. By naming the node, you can re-USE that node again in the model (as in VRML 1.0), but you can also change the fields within named nodes via events, Java or a scripting language.

All visible components are now wrapped in a Shape node, which generally has an Appearance field and a Geometry field. The Appearance field controls the color, material, etc of the shape, while the geometry defines its form.

Note that the VRML 1.0 Cube node has been replaced by the VRML 2.0 Box node... otherwise, most of the other node names and usage will be familiar.

Sony has provided a VRML 1.0 to VRML 2.0 converter for Windows.


Most VRML browsers support multiple modes of navigation. One method is POINT (or LOOK), which allows users to click on objects that they wish to navigate to. However, this disables linkable objects. Other modes include FLY, SPIN, SLIDE, etc.

Perhaps the easiest way for novices to navigate VRML is to use WALK mode. Unlike other modes that may leave the user wandering hopelessly upside-down, or jetting off into space, WALK always keeps your viewpoint upright, looking parallel to the horizon.

To navigate in WALK mode, click and drag your pointer (mouse, trackball, pen, etc) in the VRML display area -- being careful not to click on an object unless you wish to link to a new URL. Dragging upwards will generally move your viewpoint forward; dragging downwards will move you back. Dragging left or right, will swing your viewpoint left and right.

Note: some VRML plugins, notably SGI's Cosmo Player, force the user to drag one of the navigation icons in order to navigate. Very annoying, but one can get used to it after a while.

Tip: if you get lost in WALK mode - keep turning left... eventually you'll turn to face the main part of the model.

On some VRML browsers, dragging with your right mouse button will spin the object you are looking at (this is actually the same as SPIN mode navigation).

Once you become comfortable with WALK navigation, try experimenting with the other navigation modes.

Creating VRML

There are two approaches for learing to create VRML. If you are a programmer or are mathematically-inclined, the easiest way is to just visit a VRML site and use your Web browser to display the source of a VRML document. While binary forms of VRML are in the works, most VRML files are simple text files with WRL file extensions and x-world/x-vrml MIME types (model/vrml for VRML 2.0). Take a look at the code, and see how other VRML modellers are creating their forms.

The other approach is to acquire a VRML editor. While a number of them are becoming available on the market, most are fairly primitive and difficult to use. If you are a Computer Assisted Design (CAD) user, another approach would be to build the model using CAD and then convert it to VRML. If you do this, be sure to trim unnecessary parts and simplify objects first, otherwise you will end up with a VRML model that is too slow to load on the Net or navigate. Several shareware filters are available for reducing the size of VRML files.

When publishing VRML files on the Web, it is important to make sure that your Web server associates your file with the correct MIME type - otherwise browsers will not know to display the file as a VRML object. Check with your Web administrator to see if your server is configured for x-world/x-vrml and model/vrml MIME types.


Very few Web browsers have implemented the entire VRML specification, while others have added extensions that are not supported by most other browsers. It is important to keep in mind your audience when deciding which VRML features to use.

While all VRML browsers support the basic primitives, not all support spheres very well. Using spheres can be an efficient way to model some shapes -- however, some VRML browsers will use all your system memory just to render a handful of spheres, while others have no troubles at all with dealing with thousands of spheres.

Not all browsers support texture mapping, and of those that do, virtually all do it differently. The only way to guarantee consistent texture mapping is to use TextureCoordinate2 to explicitly define how mapping is to done, however, this significantly increases the size of the VRML model. The alternative is to make an assumption about what browsers your visitors will be using, and create texture maps that are consistent with that browser.

Some VRML browsers have added extensions for animated textures and simple 3D animated behaviors. These add considerable flexibility to your presentations, however, keep in mind that this will distort your models or even make them unviewable on some browsers.

Material colors are also handled differently on various browsers. Experiment with multiple browsers to achieve a material behavior that is fairly consistent on all browsers. The most reliable approach is to only use the diffuseColor attribute.

VRML Inline'g is an efficient way to include parts in a model, however, not all browsers treat inlined parts the same way. Similarly, the performance of Level Of Detail (LOD) handling on browsers varies dramatically. As with colors, experiment with various browsers before committing to using these techniques.

While all VRML 2.0 browsers are supposed to support Java for adding behaviors, they may also support other languages in addition to Java -- most also support some sort of scripting language.

Since there is no requirement or standard for VRML scripting languages, different browsers can support a different scripts. SGI has proposed, and supports, a standard VRMLScript language, which is a subset of JavaScript.


VRML cameras define the default viewpoint as users "enter" your VRML model. While the VRML specification defines several camera projections, most browsers only support the PerspectiveCamera node.

If no camera is specified, browsers will pick a point such that the entire model will be viewable in the display area, and the user's view will be pointing at the center. If you desire a different starting point, you need to define a camera position.

Some browsers support multiple, named cameras, which allow you to define targeted URL links, which teleport users from camera to camera.

Creating Efficient VRML Models

A major key to building useful VRML models is to keep them efficient. This speeds up download times and improves navigation performance.

Size is a critical factor. You can reduce size by using primitives when possible, instead of complex shapes. Using transforms allows you to mold primitives into a number of useful shapes.

Eliminate extraneous objects. This is especially true of models that come from CAD systems. CAD models tend to have a lot of shapes inside of others, or minute objects that might critical in engineering design -- but much of this is irrelevant in a presentation model.

Re-use objects. The VRML DEF and USE nodes allow you to define a complex shape once, and re-use it in other parts of the VRML model. These re-used parts can be modified in size, proportions and color, using transforms and other modifiers.

While it would seem that Inline objects would be as efiicient as DEF/USE, this is generally not the case with most VRML browsers. While convenient, it is probably more efficient to avoid Inline'g objects until browser technology improves.

VRML Lighting

VRML supports multiple light sources. Effective use of multiple light sources can dramatically enhance the way a VRML model appears. However, adding multiple light sources often slows the performance of most VRML browsers.

If navigation speed is essential, limit your light sources to a single DirectionalLight, or eliminate them altogether.

Level Of Detail

VRML supports a sophisticated concept called Level Of Detail. It allows you to define different presentations of an object depending on how far away you are from it. If you are far away, you can have a very simple representation, with a low part count; as you approach, the object can gain in detail and articulation.

Like Inline'g, LODs are not very well implemented on most VRML browsers; most load all the data for all the levels of detail for all the parts, even when they are not displayed. For a large, complex model, this can require substantial memory resources. Few browsers can currently handle LODs on a serious basis. Worse, some popular browsers implement LODs incorrectly, causing camera and transform nodes to behave improperly.

Once this technology matures, LODs will be an excellent way to maximize detail as well as navigation performance.


While most VRML applications are currently single user, a number of multi-user VRML environments are becoming available. When participating in a multi-user VRML environment, you need a way to represent the users. If you have read the novel Snow Crash, you have a good idea of how this is accomplished: through avatars.

An avatar is a repesentation of yourself in a 3D multi-user environment. As you move through VR space, others see you in the form of the avatar. Avatars may realistically represent you, they may be stylistic hominoidal forms, or completely non-human forms.

VRML 2.0 allows avatars to have articulated parts; using a VR suit, it can reflect your real movements.

In multi-user environments, you wil be dealing with many users/avatars, many of whom may not have high-end VRML workstations; the key to good Avatar design is to keep it simple. Most multi-user games either use pre-defined avatars, or restrict the file size of user's avatars.

VRML Sound

Some VRML browsers are beginning to support directional sound. By placing one or more sound sources in your model, a user with stereo sound support will hear the sound louder in one ear than the other as they turn about and hear the sound grow louder as they approach the source.


VRML models make excellent sources for generating computer animated movies and Animated GIFs. Simply view a model, take a snapshot of the view, and then move to the next view point, repeating the process. The frames can then be assembled into an animated movie.

The Future of VRML and the Web

HTML will continue to be a good medium for displaying text and 2D images. However, 2D lists, tables and links are not the most efficient way to navigate through large amounts of complex data or file systems.

VRML allows users to navigate through databases as if they were rooms with thumbnail posters on walls and files within drawers and cabinets. Distant signs can be used to flag topics -- if you see something you need on the other side of the room, you just FLY over there, rather than navigate through series of blind HTML links.

Multi-user environments will allow people to meet and talk through microphones and stereo speakers, share 3D presentations, hand each other virtual business cards, visit VR sales offices and play interactive, online games.

With the recent improvements of personal computers and the introduction of cable modems, it is quite possible that VRML will become the predominant method for navigating the Web in the near future.

Top | Basics | Navigation | Creating | Compatibility | Cameras | Efficiency | Lighting | LODs | Avartars | Sound | Animation | Future

© Copyright 1996 - Grafman Productions - ALL RIGHTS RESERVED
Grafman Productions