Panorama Tutorial 

Florin Miu 2001 

    1. Introduction

This panorama tutorial will teach you how to create 3600 cylindrical panoramas using Cult3D. It assumes you have basic understanding of Cult3D technology.

For start let's see what's the idea.

To build a panorama we first need a 3600 photo. This is the most time consuming step. We need to take several photos (a digital camera will be our friend here) around a point. Then load all photos into a picture editor like Adobe Photoshop or Corel PhotoPaint and merge them as a single image. 

The next step is to create a 3d scene with a cylinder onto we map the 3600 image. In the center of the cylinder we place the camera and the scene is ready.

We can export it to Cult3d Designer and create a project with it. The cylinder (or the camera) may be rotated with an arcball and the panorama is finished.

Except the panorama image, all steps for creating the panorama are easy and does not require advanced knowledge of 3d max or cult3d. However there are some problems related to panoramas size and aspect ratio which must be solved in order the final scene to look good.

There are some file size considerations which must be taken into account.

Cult3D requires textures size to be power of 2 values (64x64, 128x1028, 32x256 etc.). 

If the image does not have such size then cult3d will resize it to be so. Because resizing may lead to distortions its better to do yourself the textures to be powers of 2.

The bigger the texture are the bigger the size of the final file (*.CO) will be. You may use high wavelet compression ratios in exporter but details will be lost. You must use a reasonable compression factor so the final image to not lose to many details.

Because the image for a panorama must cover 3600 its width will be much bigger than the height. Also the cult scene aspect ratio (width/height) must be greater than 1 to give the impression of a wide scene - landscape aspect ratio, not portrait.

To accomplish this I used a 2048x256 pixels image for the panorama and a 512x256 pixels cult3d scene size. Using 75%-80% quality in exporter the final cult scene, the CO file, will have 150kb - 180kb depending on the image details.

If I put a 4096x512 pixels image the final was somewhere around 500k.

On slow internet connections even 200k will lead to lengthy downloads. The user will have to wait until the whole scene will be loaded into the cult player and this is not very good.

For this reason it would be nice if we can load the panorama image in small pieces and display them progressive as they are loaded. The user will see portions of the panorama as they are loaded and will not have to wait until the whole image is loaded.

Unfortunately Cult3D does not allow loading external images, even using Java. Fortunately the 5.2 version allows loading worlds, which are also CO files, but reading textures from worlds requires Java.

So I' ve imagined the following solution. 

The main panorama scene contains the cylinder and the camera together with a blind 2048x256 texture (a black rectangle), exported with maximum compression. Also the main scene contains the Java code which is needed to load the panorama image from separate worlds which contain portions of the panorama image. This main scene was compiled as a CO file and may be used without any changes (so no Java knowledge is required). Its size is about 11kb because the texture was compressed with high ratio, so it loads fast. 

The panorama image was broken in 16 pieces, each 128x256 and 16 worlds containing these textures were created. Each world size was about 11-12kb.

You need only to create the panorama image, break it in 16 small images and create the 16 worlds. You will see that creating the worlds is very simple and for breaking the image in 16 pieces I've created a small application. 

In the html page its included the main scene only, without any changes.

So the solution includes:

How it works ? You open panorama.htm page in browser. The cult player will load panorama.co, which is small, and then Java will load the 16 worlds and display the panorama image as portions of it are loaded from the worlds.

Bonus. The Java class contains code from zooming in/out and moving up/down the camera. As a result, besides the cylinder rotation arcball you may go closer to the panorama and move around. 

 

Next Topic - Creating the Panorama Project>>