I'll add to this tutorial later, but for now I'll cover a basic virtual object that can be rotated left or right. PTools does offer the ability to add various views, so that with enough images you can actually view the object from any angle. PTools handles objects in a different manner than other programs, and you have to play with the HTML code. But it�s pretty easy, and you have the added advantage of using the free PTools. The first step is obvious � you need to capture your images. Four images are a suggested minimum, eight is better, and so on. The more images you have, the more detail you have, and the smoother the movement. More images=more views. But, more images equals a larger file size. That�s because you need to assemble all the images into a strip containing all your images.

PTviewer has several helper add-ons. One of these is PTobject. You don�t have to bother looking for it � it�s already supplied in the ptviewer.jar file (a .jar file is actually an archive, like .zip file, that can contain numerous files.) It�s automatically extracted and downloaded by the browser. PTobject is what makes the viewer display object files. Basically, the viewer loads the object helper, and the helper displays the image strip. It�s so easy that you only need to put three files on your server � the image strip, the ptviewer.jar file, and the .HTM file.

The most confusing part is creating the .HTM file, so let�s look at a sample page:
(you can see it here: [1])

Here's a note for the sample page - the image seems to rotate in the opposite direction that you drag. I did this to illustrate a point - the images need to be in the correct order. The last image should be the first in the strip! In this sample, the first image is the first.

This is the line that specifies the display size of the applet. It�s directly related to the size of your final image strip. Say you have eight images, each 500 high and 341 wide. Your strip would be 500 pixels high and pixels 2728 wide. The width and height parameters must match the size of your images. If the height is too small, you�ll wind up cropping your image � too tall, and you�ll have empty space. If the width is incorrect, the thing will be a total mess!

This line tells the viewer to load the helper file with a variable named applet0, and contains the name of your strip image, in this case jivestrip0.jpg. The nhor tells the helper how many images you have in the strip (nhor=8, or 8 images). The nver is the number of vertical images (nver=1, or 1 image.)

<PARAM name=inits value=ptviewer:startApplet(0)>

This tells the viewer to load applet(0) created above.

oops - need java

Any text you place just before the close APPLET tag is displayed by browsers that don�t have java installed or running. It�s usually a warning message and/or a download link, and totally optional.

</APPLET>

Want to make a quick object? Copy this code, and change the following four variables: Width, height, jpg file name, and nhor value. Make sure the ptviewer.jar is in the same directory. You�ll have an object in no time!

Note: For the single strip example I have here, you do not need a number in the image file name. Numbering is only required when using multiple strips for multiple angles. I just number mine out of habit.

Comment on work flow / automation: Make your script generic, and always name the image the same, for example objectstrip0.jpg. Also keep the file size, number of images, etc. the same. Then create different folders / directories for each object. Name the folder using the topic. Folder 1 would be called "statue," folder 2 "fishie" and so on. Rename the file that contains your code to default.htm (or index.htm if that�s what your server uses.) Copy this same htm file to each directory. Then place each unique strip image in the corresponding directory. Each directory would have three files: the .jar file, your image file, and the .htm file. Now you only need to link to the directory! Web servers automatically load either default.htm or index.htm as the default web page.
--Add360.com 05:34, 9 Nov 2005 (EST)