Publishing VRML97 panoramas

VRML97 (also known as VRML 2.0) is a file format for storing 3D graphics information and transmitting it across the network. In addition to 3D geometry, animation, interaction, sound, and movies, it supports cubic panoramas, specified as a 'Background' object in the VRML .wrl file that refers to six images that make up the cubic background panorama. This document describes how to prepare a panorama to be published on the Web as a VRML file.

Step 1: Save As... VRML

The first step is to save your panorama in the VRML format. Open your panorama in SkyPaint, and then choose 'File->Save As...' and select either VRML, JPEG or VRML, PNG.

JPEG is a compressed file format that sacrifices some image quality for smaller file sizes. PNG is a high-quality "loss-less" image format; it can also compress image files, but it does not compress them as much as JPEG and compresses them in such a way that no image quality is lost.

If you want precise control over the compression of your panorama images, you can do the following:

Using a specialized JPEG compression program (like JPEG Optimizer) can result in higher-quality, lower-bandwidth panorama images. Note: images and .ivr files created in the Live Picture Background format are compatible with VRML97. If your image processing tools do not support the PNG image format, save as Live Picture Background, BMP, work with the BMP files, and just change the suffix of the .ivr file from .ivr to .wrl.

Step 2: Upload files

Upload the .wrl file and the six .jpg files (which will be named something_FR.jpg, something_BK.jpg, etc.) to your web site. Be sure to put them all in the same directory.

Step 3: Test

Enter the URL for the .wrl file directly into your Web browser using it's "Open File" or "Open Location" function. For example: http://www.skypaint.com/Examples/simple_clouds.wrl

If you have a VRML97-capable Web browser, you should see your panorama and be able to rotate around to look at it. If you do not have a VRML97-capable Web browser, we recommend either Blaxxun Contact or Parallel Graphics Cortona, both of which are distributed free of charge.

See the Troubleshooting section of this document if you have problems.

Step 4: Integrate with the rest of your web site

Once you can directly type in the URL of the panorama, the next step is to integrate it into the rest of your web pages. This is discussed in detail in the next two documents in this tutorial series, "Embedding Panoramas into HTML Pages" and "Opening Panormas in a Separate Window".

Troubleshooting:

VRML .wrl files appear as text, or bring up a "Save As" dialog
If this only happens for VRML files on your web site, then the problem is that your web server is not setup to serve VRML files. Ask your Web administrator to add support for the standard "model/vrml" MIME type for ".wrl" files.
If this happens for VRML files from ANY web site, then your Web browser is not properly recognizing the "model/vrml" MIME type. Installing (or re-installing) a VRML plugin should fix this.
Poor panorama quality
Older VRML implementations did not correctly implement the Background panorama functionality. Be sure you are running the latest version of your VRML browser (VRML plugins distributed with new computers or 3D graphics hardware are often out-of-date).
Some 3D graphics hardware restricts the size of images that can be manipulated in 3D (a maximum size of 256x256 pixels is not uncommon), so you may find that on some systems, with some VRML browsers, your high-resolution panoramas are automatically turned into low-resolution panoramas.
Be sure that your system's display settings are setup for high-color or true-color; panoramas usually look pretty bad in 256-color mode.
And finally, displaying low-resolution panorama (e.g. panormas with 256x256 images) on large, high-resolution displays (like a 21" 1280x1024 pixel monitor) will look a lot worse if the panorama fills the entire display than if it is displayed in a smaller window.
Poor performance downloading or displaying panormas
Older VRML implementations did not optimize the display of Background panoramas; be sure you are running the latest version of your VRML browser. Keep in mind that most 3D graphics hardware is better at handling images with dimensions that are a power of 2 (like 128x128, 256x256, or 512x512). And also remember that smaller images are more likely to be hardware accelerated and will download faster.
Difficult navigation
VRML viewers default to a 'walk' interface that is suitable for exploring a 3D world, but is not a suitable for exploring panoramas. There are three things you can do to improve the user interface:
  1. Add a NavigationInfo node to the .wrl file. Open the .wrl file in any text editor (such as NotePad or WordPad), and add the following line to the end of the file:
    NavigationInfo { type "EXAMINE" }
  2. Ask the VRML plugin producers to support a new type of navigation (the VRML specification allows new NavigationInfo types to be added).
  3. Advanced: VRML allows you to take complete control of the navigation, by specifying a NavigationInfo type of "NONE" and writing Scripts to control the Viewpoint. You can use this feature to give the user a virtual tour of the panorama, although doing this requires a thorough knowledge of VRML.
Wrong field-of-view
The field-of-view (how much the view is zoomed in or zoomed out) is controlled in VRML using the Viewpoint node. You will get a 45° field of view by default, meaning that the user will be able to see about 1/8'th of the full 360° panorama. You can increase or decrease the field of view by adding a Viewpoint node to the end of the VRML file:
Viewpoint { fieldOfView 0.79 }
The fieldOfView parameter is express in radians, not degrees; to convert from radians to degrees, multiply the number of degrees by pi/180 (or about 0.017). For example, a very zoomed-in field-of-view of 30° is 0.52 radians, the default 45° is 0.79 radians, and a wide-angle 90° is about 1.6 radians. The widest possible field-of-view is 180°, or 3.14 radians.

Hints

The VRML files produced by SkyPaint are the minimum possible to display panoramas in VRML. Use them as a starting point. A VRML file can contain several Background panoramas, but only one can be active at any time. You can use Scripts inside the VRML world to switch between different Background panoramas.

A VRML file can also contain Sound nodes that are triggered either by a user's actions (as defined by Sensor nodes and Script nodes) or can play continuously. Adding a continuously playing Sound node to a VRML file is easy:
Sound { source AudioClip { loop TRUE url "http://..." }}
The url can refer to audio files in either MIDI or WAV formats.

There are a lot of good resources for VRML on the Web. Some great starting points:


| Forward to embedding panoramas | Up to the tutorial index | Back to Live Picture Java applet |


| SkyPaint | Purchase | Gallery | Demos | Tutorials | Support |
©2005 All rights reserved.      webmaster@skypaint.com