internet.com
Staff
Magazines

webreference.com

Java Boutique

Search Engine Watch

PC Webopedia

The Web Developer's Virtual Library

Library

Web Developer®'s Tips:
Beginning VRML

By Web Developer® Staff
  1. What is VRML and where did it come from?

  2. What do I need to visit VRML worlds and Web sites? Where can I find these products on the Web?

  3. I've got what I need to see VRML in action. Now where do I go to see some cool sites?

  4. I see the VRML scenes, now how do I move around in them?

  5. What authoring tools are available to create my own VRML worlds?

  6. What are some of the basic components of the VRML language? How about an example?

  7. How do I incorporate VRML in my HTML files?

  8. The VRML files I created are huge! Is there any way to compress them?

  9. I created a VRML file and uploaded it on my server, but when I link to it all I see is text. What's the problem?

  10. What is "Moving Worlds"? How is it different from VRML 1.0?

  11. Sources and Resources for further VRML exploration.


What is VRML and where did it come from?
VRML, pronounced either "V-R-M-L" or "vermil", is an acronym for Virtual Reality Modeling Language. As its name suggests, VRML is analogous to HTML, or Hypertext Markup Language (in fact, VRML was originally coined as Virtual Reality Markup Language). Like HTML, VRML describes exactly how text, graphics and links all fit together to form a page on the World Wide Web. Where HTML defines the layout of a two-dimensional page, however, VRML is a markup language that can be used to create three-dimensional (3-D) spaces, often referred to as "virtual worlds."

VRML first took shape in the spring of 1994, at the First International Conference on the World Wide Web in Geneva. Although a number of individuals played and continue to play a big part in VRML's development, the three most prominent shapers of the language include Mark Pesce (Labyrinth Group), who conceptualized VRML, Anthony Parisi (Intervista Software), and Gavin Bell (Silicon Graphics), who wrote the specification for the VRML 1.0 standard.

More specifically, VRML is referred to as a "scene description language," because it tells a VRML viewer, or browser, how to construct a 3-D environment. VRML differs from HTML in that it gives the browser instructions about where objects go and what color they are and then basically lets the browser "connect the dots." HTML, on the other hand, simply pieces together text and a number of different, pre-existing image files to form a 2-D page.

Back to top of page


What do I need to visit VRML worlds and Web sites? Where can I find these products on the Web?
The short answer is: patience! VRML files can be quite large, so a 2-3 minute wait (with a 28.8 Kbps modem) is not uncommon. More specifically, you need a special VRML viewer, or browser. These browsers are available as stand-alone programs from many different vendors on the Web (see below). Alternatively, if you are using Netscape Navigator or Microsoft's Internet Explorer as your Web browser, you can use a VRML plug-in or add-in that operates within these popular browsers. You can download most of these products at no cost from the vendors' Web sites. VRML viewing is also very taxing on your computer's resources, so a fast computer (e.g., 486/66 minimum) with more RAM (8 MB minimum) and a fast video card (16-bit or better) will greatly improve your virtual experience.

Both stand-alone and plug-in versions of VRML players should come with instructions for setting up the browser, although some vendors make this information available on their sites. Once you download the browser and configure it, you should be able to visit any VRML-enriched site on the Web. Note, however, that some vendors have added proprietary non-standard extensions to the standard VRML language. This may make some VRML worlds designed for specific browsers incompatible with the viewer you are using.

To aid you in your search for the best VRML browser, Web Developer® has compiled this listing of some of the most popular viewers and plug-ins:

VRML Browsers/Plug-ins

Browser Company Platform/OS Check It Out Get It!
Cosmo Player Silicon Graphics Windows 95, NT, Irix Features Download Cosmo
CyberGate Black Sun Interactive Windows 95, NT Features Download CyberGate
Community Place Sony Windows 95, NT Features Download Community Place
Microsoft VRML Add-In Microsoft Windows 95 Features Download MS Add-In
Voyager Virtus Corporation Mac, Power Mac, Windows 95 Features Download Voyager
V-Realm Integrated Data Systems Windows 95, NT Features Download VRealm
VR Scout Chaco Communications Windows 95, NT, 3.1 Features Download VR Scout

Of course, the number of VRML viewers and plug-ins continues to grow at a rapid pace. For a regularly updated and fairly comprehensive list of VRML browsers, see The VRML Repository's Software/Browser section. Netscape also maintains a collection of most of the VRML plug-ins available for Navigator. Finally, version 3.0 of both Netscape's Navigator and Microsoft's Internet Explorer are equipped with built-in VRML support.

Back to top of page


I've got what I need to see VRML in action. Now where do I go to see some cool sites?
The Web's VRML worlds are many and varied, ranging from entertainment sites to real world applications. What better way to start your VRML tour than with a test drive? If your interested, might as well go in style on Cybertown's
BMW Freeway (you'll need Macromedia's Shockwave as well). While your visiting Cybertown, step into The NetGate, which will transport you to random VRML sites across the 'Net. Continue your tour by visiting virtual cities such as Amsterdam, San Francisco and Tuscany.

Of course, VRML isn't just about flying around in cool virtual worlds. It is also being applied in the arts and sciences to create some fun and useful learning tools. To get a taste of how VRML is being used in the arts, for instance, check out the Net in Arcadia VRML Wing. Or see how biomedicine is utilizing VRML in this 3-D model of the human heart. The list goes on and on! Still want to see more? See The VRML Repository's Example Applications section.

Finally, for one of the most complete collections of VRML worlds on the Web, be sure to visit Weblynx's Ultimate Virtual Worlds Library. Netscape's Cool Worlds, Aereal's BOOM: 1000 VRML Worlds and Protein Man's Top Ten VRML Sites are also great places to jump into your virtual Web experience.

Back to top of page


I see the cool sites, now how do I move around in them?
Exactly how you can navigate VRML worlds is dependent upon which VRML browser you are using. However, most of the available viewers use related methods to move around virtual scenes, including navigation toolbars, mouse input, keyboard strokes, or a combination of all of these. Since Netscape's Live3D plug-in is one of the most popular VRML viewers, let's take a quick look at its means of navigation as an example. Again, your particular browser should either come with specific instructions for navigation or provide online help on the company's Web site.

When you enter a VRML world with Netscape's Live3D viewer, Navigator's background turns black and a navigation toolbar appears at the bottom left of the browsing window. Unless the scene has a very small file size, the toolbar will appear long before the world is downloaded completely. Wait until the status bar at the bottom of the browser reads "Document: Done", then the scene is ready for you to navigate. You now have several options to move around: you can use your mouse to move the cursor over the VRML scene, click and hold left mouse button and go (note: you'll move as if you were using a joystick: up=forward, down=backward, etc.). Or you can use the direction arrows on your keyboard to accomplish the same thing (note: use the arrows while holding down the control or shift key for added movement options). Finally, you can use a joystick with some VRML viewers, although it will have to be calibrated to work correctly.

Once you've learned the basics of navigating VRML scenes, you can now select various options to customize your experience. Using the navigation toolbar, you can simply click on the different options to change how you move (Walk, Spin, Look or Slide) and turn your "headlights" (Lamp) on or off. For even more options, however, move the cursor over the scene and click the right mouse button. This activates a pop-up menu, from which you can fine tune your navigation (Fly instead of walking!), change the look and amount of detail in the site (in the Lights and Detail menus) and even save your settings once they are customized (in the Options menu).

Back to top of page


What authoring tools are available to create my own VRML worlds?
As with VRML browsers, the list of VRML authoring tools is expanding rapidly as VRML's popularity contiues to grow. If you just want to "experiment" with the creation of VRML scenes, there are a couple of Web-interactive sites that allow you to build simple 3-D objects remotely. At Aereal's
Instant VRML Home World, for instance, you can input text and have it generated in 3-D. Your creation is then stored on Aereal's server, and you can link to it from from your home page/Web site.

For those ready to get fully immersed in VRML world creation, we've constructed a list of some of the best VRML authoring environments on the Web. Most VRML editors are WYSIWYG tools that generate code automatically, so you don't necessarily have to learn VRML to create 3-D worlds.

VRML Authoring Tools

Tool Company Platform/OS Price Check It Out
Ez3d Series Radiance Software SGI, Sun, Windows 95, NT Pricing, Demo Features
Pioneer Caligari Windows 95, NT, 3.1 Pricing, Demo Features
WalkThrough Pro Virtus Windows 3.1, Mac Pricing, Demo Features
WebSpaceAuthor Silicon Graphics SGI/Irix Pricing, Demo Features
Virtual Home Space Builder ParaGraph Windows 95, NT, 3.1 Pricing, Demo Features
V-Realm Builder Integrated Data Systems Windows 95, NT Pricing?, Demo Features

Want a more in-depth comparison of these tools? Check out Web Developer®'s VRML Authoring Tools review. For more programs, see The VRML Repository's Software/Modelers section or Yahoo's Authoring Index.

Back to top of page


What are some of the basic components of the VRML language? How about an example?
All VRML file must begin with a simple file header string, which in the case of VRML 1.0 is:

#VRML V1.0 ascii

This identifies the file to the VRML browser, so it knows to interpret, or parse, the contents of the file. The basic components, or objects, of VRML are called Nodes. There are three types of nodes: Shape nodes, which describe an object's geometry; Property nodes, which modify the way an object is drawn; and Grouping nodes, which group objects together as a single object. Different nodes are grouped hierarchically into Scene Graphs, which compose VRML worlds, or scenes.

  • Shape nodes: VRML supports four pre-defined, or primitive shape nodes: Cube, Cone, Cylinder and Sphere.
  • Property nodes: one of the most important property nodes is the Material node, which determines an object's color and appearance. Colors are defined using Red/Green/Blue (RGB) values expressed as fractions of 1.
  • Grouping nodes: the most important grouping node is the Separator node, which allows the other nodes within it to be treated as a single object.

Using these few components, then, an example of a red sphere would look like this:


#VRML V1.0 ascii



Separator {



  Separator {

    Material {

      emissiveColor  1 0 0

    }

    Sphere {}

  }

}

View the example in 3-D.

Of course, this is a very simple example of VRML code. The VRML specification contains 36 different nodes, each with its own set of arguments. For a more complete look at the VRML 1.0 specification, see The VRML Repository's Language Specification section.

Back to top of page


I created a VRML file and uploaded it on my server, but when I link to it all I see is text. What's the problem?
VRML files are treated as basic MIME (Multipurpose Internet Mail Extension) types. More than likely, the problem is that your server, or your Internet Service Provider's (ISP) server, has not been configured to handle the VRML MIME type. You should configure your server for the MIME type x-world/x-vrml and filename extension .wrl, or ask your ISP to do the same.

Back to top of page


How do I incorporate VRML in my HTML files?
There are two basic ways to add your VRML scenes to a Web page. The first is to create a simple hyperlink using the VRML file's URL, such as:

<A HREF="http://www.webdeveloper.com/wdworld.wrl">Web Developer's VRML World</A>.

This option best serves external VRML browsers (as opposed to plug-ins) and "full-immersion" VRML worlds.

If you want to incorporate smaller scale VRML scenes as images on a Web page, however, one of the best methods is to use the <EMBED> tag. As with the <IMAGE> tag, you can control the height, width and alignment of the scene, so that a common embed tag line would be:

<EMBED SRC="http://www.webdeveloper.com/wdworld.wrl" HEIGHT=100 WIDTH=100 ALIGN=RIGHT>.

Back to top of page


The VRML files I created are huge! Is there any way to compress them?
One of the most common methods used to compress VRML files is "gzip" compression, developed by the Free Software Foundation's Project Gnu. The compression utility is freely downloadable from the
gzip home page.

Back to top of page


What is "Moving Worlds"? How is it different from VRML 1.0?
Moving Worlds is the name of a Silicon Graphics' proposal that was chosen as the specification for VRML 2.0. The
final draft of the VRML 2.0 spec was released in August, 1996. The difference between 1.0 and Moving Worlds is analogous to the development of Web pages: 1.0 enables the creation of static virtual scenes, whereas 2.0 effectively adds multimedia and animation capabilities to VRML. With 2.0, VRML authors can now add music or sound files in the background, animate objects, drop in realistic backgrounds and terrains, and even attach behaviors to elements in a scene.

The VRML Architecture Group, which detailed the 2.0 spec, has a full list of 2.0's features and its primary changes< /A> from 1.0, as well as a collection of tips for designing Moving Worlds scenes.

Back to top of page


Sources and Resources for Further VRML Exploration

Back to top of page


Web Developer® Site Feedback
Web Developer®
Copyright © 1999-2001 internet.com Corp.

http://www.internet.com/
Web Developer® Home Over a dozen topics in detail Live Chat Downloads Book and Product Reviews Threaded Discussions How-To/Articles/Links Developer Daily News Subscribe Search Corporate Information Advertise Events Publications internet.com Home