by Justin Couch
When most people think of the Web they think of the 2D page. Sometimes this is spruced up with some pretty graphics, maybe a bit of sound or video, but seldom do 3D worlds come to mind. With the release of Netscape 3.0, the ability to explore virtual worlds is built into the basic browser with the Live3D plug-in. These virtual worlds are built with the emerging standard called Virtual Reality Modeling Language or VRML.
In this chapter, I present an overview of what VRML is, what you can do with it, how to view it, and some of the basic tools needed to create it. The next chapter presents additional technical issues about how the latest version of the language is written.
In its simplest form, VRML allows you to create platform-independent 3D objects. It is a 3D equivalent to HTML, but has more capabilities than just putting a 3D shop on your Web page. VRML and HTML have a number of things in common. Both are written as text files, they can be shown on any type of computer with the appropriate browser, and they are not the first of their kind, but they are the most popular because they are in the right place at the right time.
The first version of VRML was created by taking Silicon Graphics' Open Inventor file format and tweaking it to work with the Internet. This was the result of a meeting at the First International Conference on the World Wide Web. Mark Pesce and Tony Parisi had developed a demo program called Labyrinth that showed the use of a platform-independent graphics format. At this same conference, Tim Berners-Lee and David Ragget (the inventors of HTML and HTTP) held a discussion forum about what was then termed the Virtual Reality Markup Language. Shortly after this, Modeling was substituted for Markup in the name.
VRML's designers wanted to create a platform-independent way to send 3D worlds across the Internet. For this to work, the file format had to describe where objects were placed in 3D space and their attributes such as color. VRML browsers would run on everything from powerful UNIX workstations to humble desktop pcs. Silicon Graphics offered the Open Inventor file format for use which was greatly accepted. A number of changes were made to make it compatible with the Internet and World Wide Web. This was released in May 1995. Following a number of different interpretations, a clarified version called 1.0c was then issued in January 1996.
In December 1995 it was proposed that the next version of VRML incorporate simple behaviors. Like everything else in the development of VRML, new pieces were being done bits at a time. VRML 1.0 described only static scenes. VRML 2.0 included programmable behavior but not the multiuser virtual environments of William Gibson's cyberspace. They could be built on top of VRML 2.0, but multi-user virtual environments are not part of the language specification. The official VRML 2.0 spec was released on August 4, 1996-the opening day of SIGGRAPH, one of the most important conferences for the international graphics community.
There are now two official versions of VRML. However, unlike HTML versions, there is no backward compatibility. You need to make a choice of the version that you are going to produce. The first version was deliberately limited to creating static scenes. In this way it is not much better than a standard Web page. A user can wander about, click on links to other worlds or pages, and enjoy the scenery, but that is all. The second version of VRML introduces programmable behaviors-meaning that things are really starting to live up to that virtual reality tag.
Along with the addition of behaviors, VRML 2.0 adds many other things. The most important for general world design is the ability to incorporate real 3D sound and video file formats. From a world creator's point of view, however, other changes are even more significant. The major difference between versions is the completely different approach to creating VR worlds. To incorporate behaviors into the version 1.0 file format would have required a lot of messy additions. Worlds which were created in the version 1.0 format can't simply have extra information added to put in the behaviors. A whole new system needed to be drawn up. At the file level everything-even the header-is different.
Judging by the experience with tools for VRML 1.0, you may think that the browsers are available first and then the authoring tools catch up. In fact, it is the other way around. Many of the products that had VRML 1.0 exporters built in were very quickly updated to produce the same output in 2.0 format. However these tools were still only capable of doing the same things-static scenes. This has the immediate advantage that you can get in and start generating output straight away.
Browsers are a lot further from being completed. With the addition of behaviors, VRML 2.0 is much more complex than the original version. At the time of this writing, there were only three browsers available for 2.0 as compared to the 10-15 available for the original version. However Netscape's own VRML browser, Live3D, supports VRML 2.0 from version 2 on. This has the obvious advantage that the capabilities of VRML are available on everyone's desktop sooner rather than later.
Not only are there dedicated VRML browsers and modelers, but almost all of the major 3D modeling packages include support through either plug-in exporters or native capabilities. This has the great advantage that you can use your current skills to create content for a new audience.
For the rest of this chapter, I introduce some of the types of tools that you can use to create VRML files. If you want to know how to write a VRML 2.0 file, take a look at the next chapter for an overview.
VRML browsers come in two types: stand-alone and plug-ins for HTML browsers. With the speed at which Netscape is currently moving, your latest version of Navigator includes Live3D, a VRML plug-in, as standard. This is good news, because you can assume that most people have VRML capabilities. However, the Live3D plug-in is only capable of displaying VRML 1.0 files, so you need an alternative to view 2.0 worlds.
If you're going to view only your VRML world, then a stand-alone browser works satisfactorily. However, if you're planning to create mixed HTML and VRML worlds, particularly using Frames, then you need a plug-in browser. Stand-alone browsers offer one advantage-you can run your VRML browser and your HTML browser at the same time. A frames-based approach limits the user's ability to wander -look at full-sized documents-particularly if the user wants the 3D world to be a constant reference point for exploring various documents.
Caution |
VRML worlds may look different depending on what browser you use, just as HTML pages look different when running on two different browsers. For example, one of the biggest problems with the first-generation browsers was that the colors seemed different between them. Where one browser made the world look very bright, another, even running on the same machine, made it look darker. |
One of the most common VRML browsers on the desktop is Live3D, Netscape's own VRML browser. Live3D is distributed as a standard part of browsers from Navigator version 3 onward. It offers most of the standard features that you find in the other browsers. The browser with Navigator 3 is only capable of viewing VRML 1.0 worlds. To view VRML 2.0 worlds, you need to get one of the browsers mentioned later in the chapter. Netscape will no doubt update their browser to be compliant with 2.0 in the future. The following sections look at how to navigate VRML worlds via the Live3D browser.
Before the VRML development community moved to the second version of the VRML specification, a call went out to all interested parties for their proposals. Six submissions were received from Silicon Graphics/Sony, Apple, Microsoft, Sun, IBM, and the German National Research Center for Information Technology (GMD). Of these, the Moving Worlds proposal by SGI and Sony was accepted by popular vote to be the starting point for version 2. As a result, Microsoft took their proposal, which was called ActiveVRML, and started marketing it against VRML 2.0.
Although it does have the potential to read VRML 1.0 files, ActiveVRML is no longer true VRML, as decided by the VRML Architecture Group (VAG)-the controlling body of the VRML standards development group. Microsoft released an alpha version of their ActiveVRML browser in January 1996, but little has been seen of them since then.
Microsoft has stated its support for VRML 2.0 standard by licensing the core technology from DimensionX (http://www.dimensionx.com/), which makes Liquid Reality-a Java-based VRML toolkit.
WorldView is available either as a stand-alone program or as a plug-in to Netscape 1.x and above, as well as for Microsoft's Internet Explorer. WorldView has one advantage over Live3D in that it can run with whatever your favorite browser environment is. The screen shot presented in Figure 39.1 shows the stand-alone version.
Figure 39.1 : InterVista's WorldView Browser.
One of WorldView's nice features is its ability to nominate your own camera positions while navigating a world and then return back to them. The rendering is very smooth, but it isn't very accurate for handling mesh objects.
VR Scout was the first VRML 1.0 browser released that didn't belong to Silicon Graphics. As a result, it's one of the most developed and stable browsers of the current crop. It is also one of the strictest browsers in terms of compliance with the specification. If your file doesn't load and run in VR Scout, you should definitely go back and fix it up until it does.
The rendering of objects with VR Scout is more accurate than WorldView-particularly large mesh objects (see Figure 39.2). But this means that the performance is not as good even though both programs have the same underlying rendering library. In my general experience, VR Scout performs at about half the speed of WorldView, although it will be different for each person. Accurate measurement is really not possible.
Figure 39.2 : Chaco's VR Scout.
When VRML changed file format so radically from version 1.0, SGI's Open Inventor-based browser, WebSpace, was no longer able to support VRML 2.0. So SGI started from scratch.
CosmoPlayer comes with its own stand-alone converter so that it can be used for VRML 1.0 files. This sometimes causes problems with files that aren't quite compliant with VRML 1.0c because it either won't display them or, even worse, only half displays them. The converter supports Netscape's Spin and SpinGroup extension nodes and turns them into legal VRML 2.0 files using the standard nodes.
Early releases of CosmoPlayer support VRMLScript, which is a derivative of Netscape's JavaScript, for programming simple behaviors. Later versions will also include Java support as well as a Java interface to control the VRML world. Although this does limit some of the potential functionality, all the common behavioral tasks can be constructed. It is available as a Netscape plug-in and Internet Explorer plug-in using the Netscape compatibility option. Figure 39.3 gives you a glimpse of CosmoPlayer.
CyberPassage was the first VRML 2.0 browser to be available. (Yes, Sony does produce things other than TVs and stereo systems.) In the second version, it now supports VRML 2.0 and retains the same svelte interface of the first version (see Figure 39.4).
CyberPassage only operates as a stand-alone product, which is a bit of a pity, but its very fast rendering puts it ahead of CosmoPlayer on most aspects.
CyberPassage supports Java for scripting, which makes it much more extensible when you need to do that little something extra such as talking to a network or running multithreaded behaviors within a script. It still retains its multi-user capabilities from the first version. These capabilities allow you to participate in virtual worlds with people from around the globe in real-time.
Macintosh Browsers |
The range of browsers for the Macintosh is much more limited. The main one is Live3D, which is included with Netscape Navigator. Live3D is only VRML 1.0-compliant at the time of this writing. |
For most people, the easiest and quickest way to construct a VRML world is to use a modeling package. Modelers can be divided into three categories: those that export to another format and use an external converter, those with internal support through plug-in exporters or native exporters, and those dedicated to VRML tools.
One of the first ways that complex VRML models were constructed was with non-VRML modeling tools like AutoDesk's 3D Studio and Caligari's TrueSpace. These tools export to a standard format like DXF, which then has a third-party converter like wcvt2pov change that into VRML. This provides a very quick working base for many VRML worlds because they can leverage existing knowledge to get going.
Today a number of these tools contain plug-in exporters that can automatically produce VRML output files. One of the most widely used is Syndesis Corporation's Interchange, which acts as a plug-in file exporter for most popular modeling tools which supports VRML 2.0 export. However, it only exports static scenes. Another exporter comes from Kinetix which plugs into 3D Studio. This exporter uses the whole capability of the 3DS products. All of your animations and scene details are reproduced in the VRML file.
One of the more interesting results of VRML is the number of software companies that have released separate, dedicated VRML authoring tools, which are based on their non-VRML modeling tools. The next section looks at several of these.
Like all things, the best way to produce a product is to use a tool designed for the job. There are a wide range of tools available, ranging from those that barely hide VRML from you to those that can create any sort of file format. This section examines three of the most popular tools used in the VRML community today. They are all VRML 1.0 tools, but upgraded versions that export to VRML 2.0 will be released.
The range of tools is quite wide. At one end of the spectrum you have IDS's VRealm Builder. If you really want to learn VRML while you're creating a scene, then VR-Builder is the software for you. It presents a four-view layout on the right side while you see the structure of the VRML file graphically produced on the left (see Figure 39.5).
Figure 39.5 : VRealm Builder being used to construct the basics of the author's original home world.
At the other end of the spectrum is Caligari's Pioneer. Pioneer is a spin-off from Caligari's TrueSpace product, which you may be familiar with already in your other Web graphics work. It contains the same user interface, but has been modified to handle the VRML way of doing things (see Figure 39.6). Pioneer used to be known as Fountain but not much else has changed about it.
Figure 39.6 : Caligari's Pioneer in action.
Naturally there is a whole collection of various modeling tools in between. You can pick the amount of VRML that you want to learn up front and then find a tool for it. With tools like Pioneer, you may never know that you are creating VRML. However at some stage, you will eventually have to learn how to write it in order to tweak the file format and the scene.
Once you have created your VRML file, you want to be able let the world see it. VRML files end with the extension .wrl. Sometimes you may see them end with .wrl.gz. These are files that have been compressed to make them smaller. Both kinds are legal, and the Web browsers will handle them properly without you having worry about it.
On the server end, you need to make sure that your Web server is configured for the correct MIME type. Most servers come with the configuration already done, but you need to check that it serves up the type of x-world/x-vrml for VRML files. In October 1996, the top-level MIME type of model was approved. VRML will belong under this type as the type model/vrml.
At the time of writing, no VRML browsers were capable of handling this new type. This capability should be available as new releases of the browsers come out, but it would be best to check before you go ahead and set up this type.
VRML is now starting to gain critical mass for Web support. With Netscape support in its latest versions of Navigator, you can be sure that any VRML content that you create can be seen by almost everyone visiting your site. There are now a number of modeling tools available to create your content quickly but eventually you need to learn how it works.
In the next chapter, you are shown how to write a VRML 2.0 world by hand. If VRML is of interest to you, then read on because the capabilities are quite wide. VRML will be used for more than just a few personal home pages.