All Categories :
VRML
Chapter 22
Adding Interactivity: The Future of VRML
-by Justin Couch
CONTENTS
When the development of VRML first began, deliberate decisions
were taken to design the language a step at a time. Version 1.0
was purely for static scenes. Version 2.0, which Part IV examined
in detail, added behaviors that could be programmed. The future
certainly has other surprises in store.
This chapter looks at some of VRML's possibilities, as well as
some interesting current developments. This chapter includes the
following topics:
- Where to next? A look at what's happening in the near future
with the VRML standard. To get 2.0 out the door, a number of areas
were left out because they were incomplete.
- It's always good to know what your limits are. VRML has its
limits as well, and you'll learn what they are and the best means
to get around them.
- So where is everybody else in cyberspace? A look at the various
multiuser variants currently going around in VRML.
- Multiuser worlds will be taking off shortly, so you'll need
a virtual body- you have to look like something. I outline some
basic rules for creating your own character, called an avatar.
- Although the multiuser stuff is interesting, you really need
to know how to mix VRML with other technologies on the Internet,
such as frames. You'll learn about combining VRML with HTML frames,
as well as how to create a very cool Web site.
As time for the release of VRML 2.0 grew closer and closer, the
VRML development community realized that many of the hoped-for
parts were not going to be finished in time. Instead of pushing
back the release dates, the specification writers dropped a number
of areas they felt were not yet complete. Among these was the
VRML binary file format and the method of talking to a VRML world
from another application.
Despite what has been said over the past years, virtual reality
is still in its infancy. True VR requires the heavy use of 3D
graphics and some serious hardware. Until the release of the Pentium
CPU, there was never enough horsepower on the home PC to participate
in a VR world-at least, not with any degree of speed. With the
release of Microsoft's Direct3D standard, however, there has been
a new interest in 3D graphics on the desktop. Now almost every
major video card manufacturer has video cards offering 3D acceleration
in the pipeline. The combination of the two has led to a rush
of 3D applications on the desktop, with VRML leading the way.
Even VRML lacks some of the basic qualities required of a virtual
reality system. Although it's possible to create a lot of the
functionality for multiuser systems within VRML 2.0, there are
no built-in capabilities within the language itself. Even some
of that capability was left out in the effort to get VRML 2.0
ready by its release date.
VRML 2.1
Some of the unfinished portions of the 2.0 specification are slated
for an update of the standard in version 2.1. This next version
should be finished some time before the beginning of 1997. Don't
worry; the plan is to not change the file format you have learned
in this book and not to make incompatibilities between the two
versions. You could say that 2.1 is more a maintenance release
of VRML, with a few extra features thrown in.
Probably the first goal for 2.1 is to get the binary format sorted
out, which will provide a customized format for distributing large
VRML worlds across the Internet. Until now, users have had to
rely on gzip, a compression program that compresses the text file
before sending it to the end user. A binary format will provide
an even better solution because extra space won't need to be wasted
on text strings to define the world. Instead of, say, eight bytes
to contain a node description, you will use only one.
The binary format is expected to be based on Apple's 3DMF format,
which is the basis of many of its current offerings. 3DMF is more
a method of producing these files than the actual format itself.
Apple already has a QuickTime Movie and VR products based on it.
This will be a welcome edition to VRML. If you learn by looking
at other people's code, don't despair-you will have the ability
to convert between text and binary formats. This was one of the
implied requirements of the binary file format.
Next on the to-do list of 2.1 is the external API definition.
This API will enable you to control the world from an outside
application. As shown later in this chapter, it's possible to
get the VRML world to control the HTML page in a limited way,
but there's absolutely no way of doing the opposite. The external
API contains all the functionality of the internal scripting browser
interface and adds a little more. So if you have a Java or JavaScript
program, you will be able to control what happens in your VRML
world from a Web page or even a complete standalone program.
There are a few other issues related to 2.1. One of these is exactly
which language will be supported in the Script nodes. When this
issue was first raised, it resulted in a language war on the development
mailing list. At the moment, there's no one required language
that all browsers must support. To be completely cross-platform
means you will need to write your behaviors in both Java and JavaScript.
VRML 3.0
My crystal ball (shown in Figure 22.1) is last season's model,
so I hope it still works. Anyway, I'll give it a shot
Figure 22.1: Looking into the future of VRML, the wizard is unable to see a clear picture.
Based on the discussion undercurrents happening on the VRML development
list (www-vrml), it seems
there are several areas to be addressed in the next major version
of VRML.
Multiuser Capability
This is a tricky topic-everybody has a favorite protocol he or
she wants to use. However, with VRML 2.0, world writers have the
ability to experiment freely and easily with protocol. It's likely
that by the time VRML 3.0 is being discussed, a consensus on how
to achieve this will be in place. This may not be an exact definition
of a protocol, but maybe an agreement from the browser writers
can be made that VRML 3.0 worlds will be inherently multiuser
capable.
Seamless Worlds
There are already several proposals concerning the creation of
seamless worlds in VRML 2.0. At the moment, VRML worlds are static
in size. At some point, you reach the boundary and need to click
on an object to go to the next part of the world. The current
methods of providing seamless worlds are based on extending VRML
2.0 with Java so that this can be done. Where this could lead
nobody knows. One possibility is that it ends up creating the
equivalent of William Gibson's matrix on the Internet-a global
3D world accessible by everyone.
Heads-Up Displays
Another interesting topic that will probably be addressed is the
issue of heads-up displays (HUD) within the VR world. If you want
to display text related to some particular part of the world,
then you need to run a separate HTML window. VRML enables you
to add head-mounted displays and data gloves so that you can have
an immersive VR environment. When you are in an immersive environment,
you lose the ability to use the flat screen, text-type pages you
get on a screen. HUD capabilities have come up a number of times
in the discussions of www-vrml, and it's likely some form of them
will be in VRML 3.0.
By now, you should have a pretty good idea of what VRML can and
cannot do. Many of these restrictions depend on your own abilities
and requirements. It wouldn't take much for the average programmer
to code some solutions, but you probably aren't experienced enough
in handling the complexities of TCP/IP communications to whip
up your own multiuser scripts in a couple of days. After all,
this book shows you how to enhance an existing site with VRML
rather than show you the insides of VRML. How to write scripts
in VRML can fill a book by itself.
VRML is still, by definition, a single-user world. Unless you
go out of your way to include multiuser capabilities, you will
be enjoying your own solitude in your virtual environment. To
add multiuser capabilities, you will either have to write your
own system for both the VRML end and the server to handle it or
use somebody else's code and server. Later in this chapter, some
of the systems that VRML browser companies have written using
their own extensions are examined. In VRML 1.0, this meant you
had to use that company's browser to access the world. In VRML
2.0, you just include the VRML extension mechanisms examined in
the next chapter, so you no longer need to rely on one browser.
To a certain extent, seamless worlds can be created by placing
proximity sensors around the edge of the world, then loading in
the neighboring section when the user gets near the edge. This
is a lot more complex than you might first imagine. It's a research
topic all by itself. A number of companies and individuals (including
myself) are actively trying to solve this problem in a useful
way. This probably isn't a problem you will try to tackle yourself.
One problem not yet solved is interactions between objects already
in the scene. Chapter 16, "Adding
a Dash of Reality," looked at the Collision node. This node
provides collision detection between the user and objects, but
it doesn't cover what happens when your animated robot walks through
a wall. Currently, the robot can walk straight through, but you
aren't able to do so. The problem lies in the amount of CPU power
it takes to compute the collisions. With the speed of current
home computers, everything would be way too slow.
VRML also lacks the ability to type text into the world directly.
Although you should be able to type text directly in the future,
at the moment you must use the multiframed approach presented
later in this chapter. You can't directly affect the world contents
(at least not with VRML 2.0-though you will with the external
API and VRML 2.1). The text documents need to present information
in a way that the VRML world cannot. Jeff Sonstein's VRMLYahoo!
front-end experiment combines the VRML part to provide the search
capabilities with the HTML document to show the search results.
The combination works effectively and probably means that direct
input abilities to the VRML worlds will be a while in coming.
The popular press always seems to refer to the whole Internet/WWW
thing as cyberspace. If you are a Gibson fan, you probably
cringe every time you read about references to the whole Internet
thing being cyberspace. However, there are companies out there
trying to make cyberspace happen. Many of these companies use
their own proprietary format for describing the worlds, so this
chapter looks only at the ones that use VRML as the basic system.
Coution |
OnLive and Worlds Chat work only on MS Windows 95 or 3.1. If you're using NT, you will have some problems with the system crashing. OnLive won't even install if it finds you have the incorrect hardware and software set up.
|
OnLive has a unique 3D chat environment where you can use your
sound card with speakers and a microphone to talk and hear conversations,
rather than typing messages as you do in other chat environments.
OnLive can be found on the Web at
http://www.onlive.com/.
OnLive's main product is called Traveler. It's the front-end that
enables you to travel to other worlds and chat with online visitors.
The main meeting world is called Utopia, but new worlds are showing
up all the time, including some movie-related theme-based worlds.
So, ever wanted to go to Utopia? You need the right program to
visit, and OnLive's Traveler works great (unless you're on Windows
NT, as noted previously).
- The first thing you need is the Traveler program. Start by
visiting OnLive's Web site at www.onlive.com
and move to its beta forum to download the Traveler program.
Note |
You need to fill out a form to download the program. The program, currently in beta form, is still free.
|
- Install the program by running the downloaded file to decompress
its contents, then running the setup program.
Note |
When running the setup program, Traveler becomes the default VRML browser for your browser. To change this, go to Options | General Preferences in the Netscape browser.
|
- Once Traveler is installed, click on its icon to launch the
program. The first dialog box you see is the Choose an Avatar
selector. This is where you select your avatar. The avatar is
seen by all other visitors within the world. Here you give your
avatar a name, if you like the current model. (If you don't like
the current model, you can create a new one.)
- You can create your own avatar by clicking the Create New
button. After clicking the Create New button, click the Avatar
Models tab to select an avatar from the library of choices, as
shown in Figure 22.2. You also can change the color of your avatar
with the Color tab. When you're done modifying your model, click
the OK button.
- To visit the OnLive community, click the Go OnLive button.
The Traveler window is displayed with several menu options. Traveler
zips you to Utopia by showing you a series of boxes onscreen.
- One of the first things you need to do is to set your microphone
level. Use the Options command and select the Microphone tab.
At the top of the dialog box is the Microphone Training Wizard
button. Click this button to automatically set up your microphone.
When you're ready to move on, click on one on the virtual worlds
under the Portals menu option to move to another location.
- To speak to people, hold down your space bar while talking.
Be sure to be polite and let others speak in turn. Proper etiquette
is a must in these worlds.
- The buttons along the top of the window help you locate other
people in this world and in the other communities. Figure 22.3
shows an image of Utopia.
Figure 22.2: Selecting an avatar using OnLive's Traveler.
Figure 22.3: Using OnLive's Traveler program to visit the Utlpia 3D chat world.
CyberPassage
The examples in this book have used version 2 of CyberPassage,
so you should already be familiar with its interface. With the
move to VRML 2.0, Sony dropped the support for their proprietary
format. At the time this chapter was written, you needed to have
two copies of CyberPassage: Version 1 for Sony's chat and version
2 for testing examples. The move to the VRML 2.0-based worlds
should be complete by October 1996, and you will probably need
only one browser-version 2.
CyberPassage takes a different view of the world from most of
the other browsers. You may choose from only two Avatars. When
you're wandering around in the world, it becomes difficult to
spot who you're talking to because everybody looks the same.
Participating in Sony's worlds is similar to the Onlive method:
- First, choose your avatar by going to the Avatar menu and
selecting the View Avatar option. You need to be online to do
this.
- Type in the URL in the Open dialog box.
- To see the conversation, select View | Chat. You can type
in your speech in the bottom of the chat window.
BlackSun's CyberGate
This is probably the most popular of all the multiuser VRML browsers,
and the one I spend too much time in. The browser is based on
the principles outlined in the book Snow Crash. You can
define personal and business cards for yourself, introducing what
you do for a living, as well as your interests, hobbies, and so
on, which can then be exchanged with other participants. (See
Figure 22.4.) It also enables you to completely control how much
information you want to reveal to others.
Figure 22.4: A snapshot of PointWorld, the entry world for BlackSun users.
CyberGate is a bit different from the other browsers because all
the areas for chatting and information are contained in one window.
- All communications are text-based in the chat windows at the
bottom of the screen. There are three separate classifications
for the chats: public, groups, and private (known as 1:1). This
enables full control of how many people you want to hear your
mutterings.
- The right side of the window contains the controls for the
world. A tabbed section on the bottom provides access to almost
all of the common functions. Here you can find out about others
in the world, other popular worlds, group chat sessions, and your
collection of cards from other people.
- The Avatar window is the one you're likely to use the most.
At the top is the list of this world's current participants. By
clicking on the character name, you can get a slightly more detailed
look. They may have a real-life name, interests, and a defined
URL, which will show up in the corresponding windows.
Below this list is a collection of buttons. After selecting
a person, you can engage in a one-on-one chat by clicking the
Chat button. If somebody asks you for a chat, then click the Accept
button, shown on the lower-left side of the window. One of the
best features is the ability to ignore obnoxious characters. Once
you click the Ignore button, you never hear from them again for
that session. Sadly, most of the other browsers do not have this
feature.
Card exchanges can be done in a similar manner; select the
person and then click the Exchange button. If you already have
a card for that person, you can look at it by clicking the Show
Card button.
- The Worlds tab gives you a window that displays the list of
the 10 most popular worlds at the moment. You can select one of
them, then travel straight to it by clicking the Open World button.
- If you want to have a group conversation, use the Group tab
to get a list of the currently active groups. Select one of the
groups, and the Description and Group Members fields are filled
with the corresponding details. If you want to join a group, then
select the one you want and click the Join button. To leave, click
the Quit button in the left-hand chat window.
- The last commonly used window is the Cards tab, which lists
the current card collection. There are three card types-public,
business, and personal. The public card is the one displayed when
you select a person in the Avatar window discussed in Step 2.
Like most of the other browsers, you can use either a pre-built
avatar or construct your own. Many people just go with the default
avatars, but some regular users eventually create their own. You
see some quite interesting ones out there. (Some of the interesting
ones that I've seen recently include the U.S.S. Enterprise 1701-D,
a toilet, a camera, and a pod of dolphins.) BlackSun avatars are
any legal VRML 1.0 file, so whatever you create you can use-but
it does have to follow the normal rules outlined later in this
chapter.
Worlds Inc.
Our final browser comes from Worlds Inc. The Worlds Chat environment
was one of the first. At their Web site (http://www.worlds.net/),
you'll find a demo of Worlds Chat, but a Gold version is also
available that offers a lot more features. The demo version is
a chopped down version of the commercial version, but you can
still go online and chat with others.
Using the demo, your selection of pre-built avatars is limited
to 15 and you can't assign your own name or custom avatar. The
interface is nice to use, but the limitations of a 28.8K modem
soon start showing in a busy world. The avatars are different
as well-they are made of a series of images that change depending
on the viewpoint. Figure 22.5 shows the avatar gallery, where
you choose your persona.
Figure 22.5: They entry of the space station of Worlds Chat.
Once you have an avatar, you can proceed to Worlds Chat by clicking
on the Go To Worlds Chat. You appear in the Lobby along with several
other somewhat lost-looking avatars. Your chat box shows the conversations.
By clicking on the colored spheres in the lower-right corner (see
Figure 22.6), you can port to different worlds.
Figure 22.6: The Worlds Chat environment.
One of the fun ways to roam about cyberspace is as an avatar you've
created yourself. The problem is that what you create depends
on which browser you're intending to use. At the middle of 1996,
all the multiuser browsers were still VRML 1.0, which meant that
what you used was completely dependent on the browser. Some used
just a collection of pictures from different angles (like the
creatures in DOOM), and others took any VRML 1.0 file you created.
With the arrival of 2.0-based browsers, it's expected that all
browsers will start using a VRML file for the body.
Many browsers offer a collection of basic avatars to choose from,
as discussed in the preceding sections. Some worlds, like OnLive,
let you make simple modifications like changing the avatar's dimensions
or colors. It's even more interesting when the worlds support
custom-built avatars.
When you create an avatar, there are a few rules of thumb to follow:
- Most of the worlds are made in human-size proportions, so
your avatar should be no taller than about 2 units and a unit
or so wide.
- Don't make it too complex. A complex avatar doesn't slow your
world down, but does slow things down for everyone else (making
them inclined to leave).
- BE CREATIVE. Remember, many people see you for the avatar
you really are. A distinctive one leads to people instantly recognizing
you whenever you enter-even when you're traveling through different
worlds.
- Currently, most avatars are built using standard VRML modeling
tools, which usually include lights by default. If you're creating
an avatar this way, then make sure there are no lights at all
in the avatar file.
One of the more interesting uses of VRML is to combine VRML with
other Web technologies. When the specification was being written,
the writers realized that VRML won't always be deployed the way
you think it will. The parameters field in the Anchor node was
the result of this realization. Besides using just the URL of
the link, you may also want to communicate other values.
No doubt one of the most common ways of using VRML will be to
use multiframe documents, with VRML in one frame and HTML in the
others.
Remember the texture-mapped columns from Chapter 15,
"Sprucing Up Models with Textures and Materials"? This
example puts those plain VRML primitives representing the VRML
logo in the middle of the room. Each one of them is linked to
a different thing:
- Begin with four frames. The left side one is the largest and
contains the VRML world in the top and the HTML document in the
bottom. The right side contains an index at the top and just a
little logo at the bottom. This is aimed at frames-capable browsers,
so an alternative non-frames version isn't provided.
The frames declaration to produce a mixed VRML/HTML page is
given in Listing 22.1.
Listing 22.1. The basic frames layout of the page.
<HTML>
<HEAD>
<TITLE>An example HTML and VRML World</TITLE>
</HEAD>
<!--
An example of combining VRML and HTML together to provide
interesting content for your world.
-->
<FRAMESET COLS="*, 120">
<FRAMESET ROWS="75%, 25%">
<FRAME SRC="column_world.wrl" NAME="vrmlFrame">
<FRAME SRC="blank.html" NAME="docFrame">
</FRAMESET>
<FRAMESET ROWS="*, 120">
<FRAME SRC="index_file.html" NAME="indexFrame">
<FRAME SRC="vrml2.jpg">
</FRAMESET>
</FRAMESET>
</HTML>
- Once you have the basic frame layout, you can fill it in with
other details, like what to put in each of the frames. The index
frame is used like a tour guide to the world, showing points of
interest. Named anchor tags, introduced in Chapter 16,
are used to select the viewpoints from this frame.
- The bottom frame is used as a place to put the documents from
which you've been linked in the VRML worlds. A number of objects
in the world itself contain links. You should be able to find
the VRML logo in the center of the plaza. Each of the primitives
points to a different HTML document. Appropriately, these are
linked to the VRML Architecture Group's site for the latest version
of the VRML specification, the CosmoPlayer site, and finally to
a short document created by the authors.
- Creating a mixed technology page is very simple. Just follow
the normal steps for an HTML page, and substitute the VRML world
where you want. You should be able to use the parameters field
of the Anchor node to feed input to a window running JavaScript.
To tell the browser that you want to put something in another
frame, you put the string target=<frame
name> into the parameter field.
This is a good example of how combining different Web technologies
can add more functionality to your Web page. The preceding example
is shown in Figure 22.7.
Figure 22.7: Combining frames and VRML can add another dimesnsion to your VRML worlds.
Where do you go from here? With the ability to put in programmable
behaviors, one of the most obvious uses for VRML is in front-ends
for pre-existing games. There has been a DOOM WAD-to-VRML file
converter around for some time, and without a doubt there will
be a Quake front-end.
VRML is designed to create platform-independent content, so it
will never run as fast or as smoothly as a custom-built game.
VRML games are more likely to be of the not-so-high performance
types, like mysteries and adventure games. However, some time
in the not-too-distant future, there will be Internet games based
on VRML worlds. Like all new technologies, this one is waiting
to be explored.
A good preview of what's possible can be found at Keith and Margo's
Murder Mystery, found at www.murdermystery.com.
This mystery is composed of several VRML rooms that you explore
to find clues. By solving the mystery, you qualify to win trips
and prizes. This site, shown in Figure 22.8, is a good example
of how VRML and frames can work well together.
Figure 22.8: A scene from Keith and Margo's Murder Mystery VRML site.
Although VRML is and will be behind the gaming scene for a while,
the gaming world isn't waiting around. The entire gaming industry
is moving toward multiplayer games across the Internet.
The way to get around the bandwidth problems is for each player
to have a copy of the game stored locally on their machine. That
way, only the game updates, such as the positions of other players,
need to be transmitted. Several hosting sites have begun to appear
that enable you to play commercial games over the Web. One such
site is the Total Entertainment Network, or TEN for short. At
TEN you can play Duke Nukem 3D and Terminal Velocity, and they
aren't stopping there.
Another good example is Internet Monopoly by Virgin games, and
Looking Glass Software is planning to make multiplayer Internet
games a regular feature on all their future games.
You have almost reached the end. The tour of VRML has nearly ended,
and you should be confident enough now to start making your own
worlds. In the last VRML chapter, the finishing touches are added
to your world, creating the full multimedia VR experience. In
the following chapter, the world developed in Chapter 17,
"Real-Life Examples: The VRML Art Gallery: A VRML World by
Hand," has everything you learned in this part of the book
put into practice. Hold on-it's one heck of a ride!
Q&A
Q: | Will we ever see Gibson's matrix happening in the future? Is the Internet the start of it?
|
A: | Tricky question. Certainly VRML has the makings to be the foundation of the matrix, but there other competing technologies out there. At the moment, VRML has the backing of just about every major computer company except Microsoft, which has decided to do its own thing. Whether Microsoft can steal the march from VRML remains to be seen.
Before users can go all out with immersive VR systems, a lot of work needs to be done. Remember that there are no defined multiuser protocols, and the current head-mounted displays are still cumbersome for extended periods of time. Besides, they aren't a common item you pick up at your local computer discount store. Bandwidth on the Internet is the other major problem. Cable modems and other solutions will be the start of developing the required high-capacity links.
|
Q: | Can I incorporate other technologies, like Shockwave Director and RealAudio, into my worlds?
|
A: | Currently, there's no real way to integrate Shockwave in a VRML world, but some sites use Shockwave as a front-end for a VRML world (the two technologies exist as separate elements on the HTML page).
|
Q: | Where can I find out more about creating my own VRML avatar?
|
A: | There are several sources on the Web, but take a look at Gerry Paquette's Avatar guide at http://www.magmacom.com/~gerryp/howtoav.html. This guide takes you through the process of building your own avatar by using Pioneer. Gerry is well known for his avatars in the CyberGate community and in several worlds he has built, one of which features a pool with sharks and a bartender you can order drinks from.
RealAudio is a real mystery. The definition of the sound system is examined in the next chapter, but for the moment, RealAudio inclusion will probably happen fairly quickly
|