Powered by
JSPWiki v2.8.2
g2gp 17-01-2009
View PDF

Previous | Next | Contents


Section 3: Virtual Reality Methods and Techniques#

3.7 VRML: Virtual Reality Modeling Language #

3.7.1 What is VRML?

Virtual Reality Modeling Language (VRML) was developed by the Web3D Consortium and was designed for use on the Internet. VRML is both a scene description language and a file format for virtual worlds. The language is used to describe the geometry and behaviour of three-dimensional scenes. VRML is a popular 3-D format for the web because of its relative ease of use, standardisation and the comparatively small file sizes that it produces.

Three specifications for VRML have been developed. The Web3D Consortium defined VRML 1.0 as a minimum specification to get VRML off the ground quickly and then continued development work, adding features and higher levels of interactivity and releasing VRML 2.0 as an International Organisation for Standardization (ISO) Committee Draft in 1996. VRML 2.0 has now been superseded by VRML 97, which has been approved by the ISO and published as International Standard ISO/IEC 14772-1:1997. There are a number of VRML 2.0 worlds on the Internet; however, there is backwards compatibility between VRML 2.0 and VRML 97 and these worlds can be used successfully in VRML 97 viewers.

VRML allows for the description of hierarchies of simple shapes such as cubes, cylinders and spheres. More complex shapes can also be defined, as can surface materials, texturing of facets and level of detail (LOD) data. Objects can be linked to other URLs via hotspots. Other features include transformation (the reuse of objects more than once), viewpoint setting (which allows users to look at pre-defined views of the world), the definition of lighting within the world and 'shapehints' (which define how particular objects and object types will be rendered). VRML also works with other standard file formats in use on the Internet. Sounds, textures and animations can be linked to objects described in a VRML file by referring to image files, sound clips and program scripts in standard formats.

Features that were first introduced in VRML 2.0 were made easier to implement in VRML 97. The most important of these features are 'sensors' which perform collision and proximity detection. Checks can be built into the world to test the visibility of an object from a given viewpoint. User interactions such as clicking and dragging are allowed and time can be measured and expressed. Importantly, there is the ability to incorporate scripts which program behaviours in the worlds, for example scripts can be used to change the lighting as a user moves around a space (see Case Study 3 for more examples of programmed behaviours).

3.7.2 How to view VRML worlds

VRML viewers are needed to allow users to navigate their way through and interact with VRML worlds. Most web-browsers now include a VRML viewer. However, some browsers do not and users must download a plug-in or viewer from the World Wide Web. A number of different viewers are available for download and many are free. They differ in the style of navigation and performance that they can offer users. VRML developers often point users to a particular viewer. Users, on the other hand, may select a different viewer because they are familiar with its style of navigation.

The Cosmo Player is one of the most popular viewers because it offers a wide range of movements. The Cosmo Player runs on a wide range of operating systems and is now distributed by Computer Associates International. VRML browsers that support multi-user shared worlds are also available, for example Blaxxun Contact 4.0 (see Section 4.6).

A list of all of the browsers that are currently available can be found at the VRML repository, http://www.web3d.org/vrml/vrml.htm.

3.7.3 What is needed to develop VRML worlds?

VRML can be written using a text editor and viewed through a web browser, requiring no financial investment other than the time taken to learn how to write VRML and access to a computer. There are many books available on writing VRML and there are also some good manuals and on-line tutorials on the World Wide Web. However, hand coding is time consuming, can be tedious and it can be difficult to spot problems and debug the resulting code.

Another option is to use a VRML world-building tool. These packages allow authors to define worlds graphically and save them as VRML. This process is much faster and easier than hand coding but is more expensive. Often CAD packages are used to create 3-D models which are then exported as VRML files; CAD to VRML converters may also be used. Textures, sound, interactivity and behaviours are then added to the VRML using a text editor. There are dozens of world builders available, varying in price and quality, with new systems emerging all the time. The VRML repository includes a list of world builders along with syntax checkers and optimisation tools. When selecting world builders, developers are recommended to select those which will produce VRML that complies with the ISO standard.

Once worlds have been created, a syntax checker can be used to check that the VRML code is correct. Optimisation programs can also be used to improve the performance of the world by removing redundant shapes from the code.

Large libraries of VRML objects, textures and sounds are available on the World Wide Web. Some libraries are copyright free, others require the copyright to be credited and other libraries operate on a commercial basis. See Section 3.4 for a discussion of issues to consider when selecting items from libraries. When selecting objects it is important to check the units of measurement that have been used and whether they have been optimised so that they are drawn quickly on screen.

3.7.4 Problems with VRML

Although VRML is the most popular format available for delivery of 3-D models on the Internet, there are some problems associated with it. VRML is not the best virtual reality system. It is rather a 'jack-of-all-trades', providing many basic functions which are designed to run on all platforms. It can never replace more sophisticated specialised VR systems optimised for specific tasks or configured to run on specialised hardware. Although standardisation helps developers to make sure that VRML files will be delivered consistently on different browsers and plug-ins there are differences, particularly in their handling of lighting and colour. However, the browser manufacturers are co-operating to improve conformance and as a result of their work, together with that by Eric Haines on the implementation of the VRML colour and lighting model, the differences are becoming more subtle.

At the present time, VRML is the best standard that exists for publishing, constructing and viewing virtual worlds on desk-top computers. VRML is currently the best standard for archiving and reuse of virtual reality, although the Web3D consortium are working on developing X3D (see Section 3.8) as the successor to VRML.

3.7.5 How to find out more about VRML

The first place to go to find out more about VRML is the WEB3D consortium at http://www.web3d.org and the VRML repository at http://www.web3d.org/vrml/vrml.htm. Both of these sites are kept up-to-date and contain many useful links. See these for specifications, user guides, tutorials and also for lists of world-building tools, converters, syntax checkers and optimisation tools.

The VRML 97 specification International Standard ISO/IEC 14772-1 is available for download from http://www.web3d.org/fs_technicalinfo.htm.

For a very accessible introduction, see Bob Crispin's VRML Works at http://hiwaay.net/~crispen/vrml/. This site guides you from the process of choosing a browser to writing your own worlds.


Previous | Next | Contents