Create object movies

From PanoTools.org Wiki
Revision as of 03:56, 7 November 2005 by Add360.com (Talk)

Jump to: navigation, search

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.

The workflow is pretty straightforward:

Capture images Crop and cleanup the images Create the image strip Create the HTML file Upload them

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.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
</head>
<body>
<p align="center">
<APPLET archive=ptviewer.jar code=ptviewer.class width=341 height=500 name=ptviewer>
<PARAM name=applet0 value="{code=ptobject.class}{file=jivestrip0.jpg}{nhor=8}{nver=1}">
<PARAM name=inits value=ptviewer:startApplet(0)>
oops - need java
</APPLET>
</p>
</body>
</html>

The only part we need to look at is the code between the APPLET tags.

<APPLET archive=ptviewer.jar  code=ptviewer.class width=341 height=500 name=ptviewer>

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!

<PARAM name=applet0 value="{code=ptobject.class}{file=jivestrip0.jpg}{nhor=8}{nver=1}">

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 never is the number of vertical images (never=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 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!

<APPLET archive=ptviewer.jar code=ptviewer.class width=341 height=500 name=ptviewer>
<PARAM name=applet0 value="{code=ptobject.class}{file=jivestrip0.jpg}{nhor=8}{nver=1}">
<PARAM name=inits value=ptviewer:startApplet(0)>
oops - need java
</APPLET>

--Add360.com 17:59, 6 Nov 2005 (EST)

Comment on work flow / automation: If you make your script generic, say naming the image objectstrip0.jpg. Keep the file size, number of images, etc. the same. Then create different folders / directories for each object. Name the file default.htm (or index.htm if that�s what your server uses) and copy this same htm file to each directory. Then place each unique strip image in each directory. You only need to link to the directory! --Add360.com 20:56, 6 Nov 2005 (EST)

Personal tools
Namespaces

Variants
Actions
Navigation
tools
Tools