Home | Spelletjes | Uitvindingen | Gps | Scouting | Meteo | Computers |
||
Ict / Viewing Panoramas In Pm Wiki | Menu | |
IntroductionIt was quite a puzzle to set up panorama viewing in PmWiki, so here a simple tutorial of how I did it. The core is the Java-applet PTViewer, written bij Walter Dersch. In this article it is explained how to set up the server side. For the user is is left to make Java run in the browser on the client side. In almost all OS-es this is standard, so it will run without problems. Use this at your own risk. Comments are welcome ExamplesYou might first want to see the result InstallFirst of course, you need to set up a PmWiki install on your site. The root directory of your pmwiki install is referred to as Then you need to install from the cookbook:
And you will need for the java-part:
Extract If done correctly, you will have installed the files:
In
And you are ready to go. Setting up a Panorama pageHere is a sample code to include in your page:
In this case the file mypanorama.jpg is viewed in a 500x375 pixel box. The arguments pan, tilt and fov stand for initial horizontal position, initial vertical position, and initial zoom. The values for these are obtained by setting the panorama in the desired start-position by moving the arrow-keys and then press 'v'. The values can then be read in the browsers status bar. The argument auto is the initial rotation speed. 0.1 is a fine value, but it is highly dependent of the speed of the browser. Advanced exampleHot-spots are red balls that come up on a specified position in the panorama when you press the space-bar. To obtain this effect add the following between the brackets in the ptviewer-command.
Places the comment in the status bar when you move over this red ball with your mouse. The x and y-coordinates are obtained using The Gimp. Even more advanced:
Will load the page Limited panoramasIf your panorama is not 360 degrees round, I add:
Or any other value less then 180. The value is not critical. (I usually tend to forget measuring the actual degrees when I make a partly panorama.) This will prevent the viewer to stop panning at the borders. All CombinedThis commands displays your panorama with two hot-spots: (:ptviewer Attach:mypanorama.jpg width="500" height="375" \ pan="-90" tilt="5.0" fov="40" auto="0.1" \ hotspot0="x1500 y900 n'A comment comes here'" \ hotspot1="x700 y1200 n'Some other comment' u'pmwiki.php?n=Pan.Picture2'" \ :) More options can be used, here is a full overview. Notes on creating PanoramasMaking panoramas is very easy. I use a standard digital camera, set in automatic mode, and make about 12 pictures over 360 degrees. The pictures must have some overlap. For stitching I use the tool Hugin, using standard settings. In 90% of the cases this gives me an acceptable panorama. If it is no good, I just go out again to make another set. The latest version of Hugin also supports resizing and exporting the resulting panorama, so further processing with The Gimp is not necessary. More examplesSee my panorama-pictures again, but this time add This article is fully revised after major changes due to PmWiki become compatible with php5.5 |
Departementen |
|
Top | Bekijk | Afdrukken | Zoek Pagina gewijzigd op 03 december 2014 om 21:45 |