Election 97

VRML animation
In search of space

Understanding a few simple commands will let you zoom through our VRML constituency maps. Fin Fahey explains the essentials.

VRML (pronounced 'vermel' by the cognoscenti) or Virtual Reality Modelling Language is, like HTML, designed as a standard way of representing information in a form suitable for the Internet. Just as HTML is a standard way of integrating text and 'flat' graphics into a web page, VRML performs the same function for three-dimensional data - although it offers an intriguing way of looking at two-dimensional graphics.

A VRML document is known as a 'world' and, just as in the real world, you can walk, fly, look around, zoom in, zoom out and many other things. In fact a world can only be fully appreciated by moving around inside it, which means taking a little time to practice navigation in your VRML browser using the mouse. After a while it becomes quite intuitive, but expect a short learning period.

Until recently, Internet users required a stand-alone VRML browser to make sense of VRML worlds - however, with the advent of Netscape 3 in mid-1996, all Netscape 3 users have been provided with an integrated plug-in, and Microsoft is now belatedly getting in on the act. In case you missed it, here is a summary of your options - if you have...

Netscape 3: You should have no difficulty loading our VRML pages, since this carries the necessary plug-in, Live 3D Version 1.0. Note, however, that Live 3D is ever changing, and you may wish to download Netscape's latest version of Live3D 1.0 or their beta version of Live 3D 2.0, a VRML 2.0 plug-in with which these maps should work very well.

Minimal Netscape 3: If you have downloaded this cut-down version to save line time, you will now need to download the Live 3D 1.0 plug-in from Netscape.

Netscape 2 or earlier: See minimal Netscape 3.

Internet Explorer: Microsoft's VRML add-in for Explorer is now available as a download from the Microsoft site. Based on Intervista Worldview, it is slightly faster than Netscape's plug-ins, but this is offset by the crudity of its rendering.

Any other browser: Well, and this goes for everyone, take heart, there are more options around than simply those provided by Netscape and Microsoft - many stand-alone VRML browsers actually offer the best performance. Watch the links section for more info.

Live 3D and Microsoft's VRML add-in are reasonably easy to use, although life would be easier if Macs and PCs were provided with a joystick port. The account below concentrates on Live 3D, but more or less the same commands work with Microsoft VRML: both browsers have Walk, Slide and Spin commands, but Microsoft's browser includes a Tilt command that swivels your plane of reference around. Apart from this, both have a similar 'feel'.

To view a VRML world, simply click on the link to it from Netscape 3 or Internet Explorer (if you have the necessary plug-in), for example this constituency map of East Anglia.

You will now see the blocky East Anglian electoral map appear. If you move your mouse pointer around the screen (without pressing the button), you will see the various names of the constituencies appear - next to the constituency in Netscape, to the lower left of the screen in the Explorer plug-in. Note that, in Live 3D, clicking with the left mouse button wil take you to the relevant constituency profile, while in the Explorer plug-in, you will have to access the menu from the right mouse button to be presented with these options. It can become annoying in Live 3D when this happens - so use the Point command (see later) if you want to get in closer to a constituency object.

After loading a world expect to see a menu bar with various commands at the bottom of the screen, like this. Until Live 3D has analysed the world, these will be inactive. You will know when it has finished, because the blue and yellow timing bar at the bottom of the screen will disappear, and the entry view of the VRML world will appear in all its glory. Now you can really get moving...

Live 3D's menu bar

Walking the walk
The very first thing you may want to do is get further into the world, or stand further back from it. This is accomplished using the WALK command. Select it by clicking on Walk and it will turn green. You can walk in and out of the world now by dragging the mouse pointer up and down the screen. Until you get the feel of the program, use quite small mouse movements. Dragging Right and Left in Walk mode takes you out of the screen in a right or left curving path.

Although it is not next on the menu, the next most intuitive command you can use is Slide. SLIDE is towards the end of the Menu and selecting it allows you to scroll your viewpoint right/left, up/ down and combinations of both. It should be quite intuitive, because it is the sort of scrolling command that you may find yourself using with ordinary two-dimensional programs. Imagine it as being like using scroll bars at the side and bottom of the screen.

The SPIN command really starts to show off the true power of VRML. It rotates the whole VRML world around a specified point (or you could say that it rotates your entire viewpoint - in the opposite direction - around that point). But first, a word of caution - you need to know what point in the world you are rotating around. By default, VRML worlds are rotated around the 'origin'. We do not wish to consider the mathematics of three-dimensional rendering here - suffice it to say that the origin of the VRML world is where the Cartesian x, y, and z coordinates are all zero. In the case of our East Anglia world, this is way away to the southwest (the constituency worlds are based on British National Grid coordinates). So we need to change the point that the model rotates about, which is accomplished using the POINT command.

Walk into the model, select the Point command on the menu, and click on the constituency object you wish to rotate about. The view should zoom in towards it, but you can always Walk back out if you don't want to be that close. Now select Spin. By moving the mouse pointer around the screen, you can rotate the model in any desired direction.

Now you have played with these basic commands, try this exercise: for the East Anglian constituency map, go from the entry view, which is a wide screen view facing north, to a view looking straight down on the region as a flat map, at which point you can pretend it isn't 3D at all - scroll left and right, and zoom in and out to get a good look at the constituency names. If you have done this, you now know most of what you need to use VRML.

Going deeper
You can get a lot out of Live 3D using merely those basic four commands, but there's plenty more. For a start, if you click on the question mark on the far right, you will see a 'head-up display' appear on the left of the screen. This shows you that, even if you have selected a particular command, you can access the other commands by using the right mouse button, the keyboard or combinations of both. If you don't like the world's lighting, you can raise or lower its intensity using the LIGHTS command. Finally, the VIEWS command allows you to move backwards and forwards through prearranged viewpoints ("cameras").

The right mouse button has another function - by clicking on it and holding it down, you will be presented with a menu offering a host of alternatives. The top one is one of the most useful. If you get lost, just select this Entry View item, and you will be returned to your starting point, an indispensable 'Get out of jail free' function. Many of the other functions on the right-button menu replicate the screen menu functions, as you will see, but you will find a number of options which we will leave you to play with. Right now, you should be finding your way around quite well.

Menu commands are available from the right mouse button

Worlds enough and time
A VRML world consists of a collection of text statements describing 3D objects. If you have a world loaded into your browser, you can see what it looks like by selecting the View Source option (on the View menu in Netscape). Besides the depiction of 3D shapes, VRML can also allow hyperlinking just like HTML, although this has not been implemented under Live 3D - objects can be made clickable, so that users can zoom off to HTML documents, other VRML worlds, play music and many other things.

At this stage of development, however, 'virtual reality' is something of a misnomer - VRML is actually at its best when used to depict objects in a highly diagrammatic fashion (as in our constituency maps). This is partly because of the current rather low speed ('bandwidth') of the Internet, but more importantly because 3D rendering uses a lot of the power of the host machine. Our constituency maps have been heavily simplified and optimised so that they will download swiftly and give good results on a 66 MHz 486 PC, but a VRML starts to look truly amazing on Pentium machines from 100MHz upwards. And, as with most of today's software, the more memory you have the better - on a PC, 16 megabytes is the absolute recommended minimum.

VRML was born at the first annual World Wide Web Conference in Geneva, Switzerland in Spring 1994. A year later, an authoritative VRML specification (VRML 1.0) had emerged, based on the Open Inventor ASCII File Format from Silicon Graphics. Since then VRML has been associated (as with any precocious infant technology) with "eye-candy" - the sort of graphic extravaganzas that graphics fanatics love. However, like HTML, VRML was originally conceived of as a general way of representing any graphic data on the World Wide Web and, as machine performance rises it is likely to become an important Internet tool. A far more powerful specification of VRML, VRML 2.0, was released in mid-1996. This allows animation and complex interactions between objects, plus an enhanced set of graphic commands. Live 3D is not a VRML 2.0 browser, although these are already available on the web, and Netscape will shortly be linking up with Silicon Graphics to bring the Cosmo VRML 2.0 browser to all its users.

Other worlds
If you are interested in finding out how VRML works, the full 1.0 and 2.0 specifications are available on the web, and there are many 'cool worlds' for you to sample.

Coming soon - watch this space for our set of cool links.