Putting Panoramas and Object movies in a web page
Once you have created some panoramas by far the easiest way to publish them is for someone else to do all the work for you - once you are registered and logged-in to panoguide, you can upload panoramic images and this website will do the hard work for you. If you have your own website, this page gives you an overview of the process of adding your panoramic images to your pages.
Choosing a "viewer" to use in the web page
It is important to realise that the software you use to create your panoramas or object movies with will not necessarily create the web page for you. Also you will need a different piece of software - a "viewer" to display the panorama in the web page. This "viewer" need not be from the same company as the software you used to create your pictures and movies
All viewers need two things: (a) the image itself, and (b) metadata information about the image, such as whether it is 360 degrees wide or less than that, whether the image file is cylindrical or spherical projection, etc.
Special file formats such as QuickTime VR (.mov) and ImmerVision's Open Panorama format (.ivp) contain all the image data and the metadata in one file. The advantage of a special file format is that the web page code is generally simpler. Also QuickTime VR movies can also be opened in QuickTime Player (no web page required) so can be emailed to friends or colleagues, and put onto CD or DVD.
Viewers that do not use special file formats require you to supply the metadata in the HTML page where you add the code to make the viewer appear. (Some viewers make it also possible to put the metadata into a separate text file.)
If you are not confident creating or editing web pages, you may want to start by using QuickTime or ImmerVision's Open Panorama format. Most image stitching software supports QuickTime VR (although not necessarily all the advanced features of QuickTime). The OpenPanorama format is open source but the easiest way to create IVP files is using ImmerVision's inexpensive PURE Starter Toolkit, which creates panoramas ready for ImmerVision's PURE Player.
Otherwise, the main thing that should influence your choice of viewer is what you want it to look like. For both objects and panoramas you will probably want to think about the functionality you want: do you want to create hotspots to link panoramas and objects together into a virtual tour? Do you want to include music or sound effects? Do you want those sound effects to be directional?
Do I need to buy any special additional software?
You don't have to. If you want to use QuickTime VR and your stitching software doesn't support it, or maybe doesn't include all the features you want, then you might want to buy additional software for this. You may decide you like ImmerVision's PURE Player and to make your work easier you may decide to purchase the PURE Starter Toolkit. But no, you don't have to buy anything extra. It depends on what you want to do. All the viewers themselves are free - but it is up to you to decide whether additional software will make creating the panoramas or web pages easier.
Note you can convert a panoramic image to QuickTime VR using a variety of tools including GoCubic.
Complicated HTML: Plugins, ActiveX Controls and Java applets
Before we dive into some code examples, we need to briefly explain what is meant by plugins, ActiveX controls and Java applets, and why we have so many ways of including rich content in web pages.
Netscape created the idea of a web browser plugin or helper application back in the 1990s - an additional piece of software that you install which adds functionality to the web browser. Microsoft decided to add a different way of doing the same thing: the ActiveX Control. Plugins are generally not self-installing, whereas an ActiveX control will attempt to automatically install itself, so the end user doesn't have to do anything except say 'yes' to get the additional software.
However, ActiveX controls only work in Microsoft's Internet Explorer for Windows. Also starting in Internet Explorer version 5.5 SP2 for Windows, plugins are no longer supported, only ActiveX controls. The HTML tag used for plugins is <EMBED> and the HTML tag for an ActiveX control is <OBJECT>. Fortunately by putting the <EMBED> tag inside the <OBJECT> tags, you can create a web page that works on both Netscape and Internet Explorer browsers.
So what about Java? Not all web browsers have built-in Java applet support. The version of Internet Explorer supplied with the first version of Windows XP did not include Java (but subsequent versions do). Mozilla and other web browsers require you to install a Java Runtime Environment (JRE for short) of your own, such as from java.sun.com.
Example: QuickTime VR in a web page
This example is based on the example from Apple's Developer connection article. Let's assume you want to publish a QuickTime VR movie in a file called frontroom.mov:
In Netscape web browsers this only works if QuickTime is installed. If it is not, a grey box or an empty box with a broken plugin symbol is displayed. Some web browsers will prompt the user immediately to download the plugin, but generally this will not happen unless the user clicks on the empty space where the QuickTime movie should appear.
For more information about QuickTime on Web sites, see: QuickTime for the Web, published by Morgan Kaufmann Publishers (see http://developer.apple.com/techpubs/quicktime/qtdevdocs/
You can also publish a QuickTime VR movie using PTViewer (java), Flash or DevalVR.
Although everyone using an Apple Mac will have QuickTime installed, not everyone on a Windows PC will. If, for example, you publish your panoramas using the QuickTime viewer, you risk alienating some people who do not have QuickTime and perhaps they do not know how to, cannot or choose not, to install the additional software. (There are many reasons why someone might not be able to install it, such as being on a corporate network and not having administrator privileges to be able to install software.)
This is where Java applets come in. Well, more-or-less. As mentioned above, not everyone will have a Java Runtime Environment installed on their computers - many people do, but not everyone. For those people that are Java enabled, the Java viewer you use will be automatically downloaded to their computers and executed to display the panoramic image.
Strictly speaking the <applet> is deprecated but Sun recommend to still use the deprecated <applet> tag because the specification for the object tag is vague and the way different web browsers implement the tag is inconsistent. For more information see Sun Java plugin: using tags. Also I found that when using the <object> tag, I cannot use percentage width and height. I am of course talking about setting the width and height to "100%" - I have found this works with an <applet> tag in all web browsers but not with an <object> tag.
There is one more problem with using Java. Some browsers (notably Netscape/Mozilla) have memory limits which prevent large images being used. Various viewers use work arounds to allow high resolution panoramas to be displayed beyond the limit, but you should watch out for 'OutOfMemory' errors whenever you publish very large images. ImmerVision's PURE Player, used on this website, uses particularly good memory management and can display large images quickly. PTViewer can also avoid the problem by similarly splitting the image into smaller sections.
Making sure it works for everyone
Note that this works quite well for panoramas with a fairly narrow vertical field-of-view but wider angle panoramas will look a little strange as the curves in the equirectangular image are not perspective corrected when displayed like this.