Re: [Pipmak-Users] [pipmak-users] hotspot maps
Status: Alpha
Brought to you by:
cwalther
From: Andrea V. <and...@gm...> - 2007-11-21 08:33:45
|
Hi, And before all, Welcome to this forum! Pipmak is still in a development stage, some parts are quite finished, other could be improved. The idea is to create hotspots directly from the Pipmak window, but this feature is in a very initial stage, and you should wait next and next releases. But isn't difficult create hot spot with a graphic application like The Gimp, Paintshop Pro or Photoshop. You have only to create the "equirect image" of your node, this is simple, because is sufficient to add some extra code to your node.lua: ---------------------------- cubic {"front.jpg","left.jpg","back.jpg","right.jpg","top.jpg","bottom.jpg"} onenternode( function() pipmak.saveequirect() end) ---------------------------- When you enter in the node, The onenternode section execute statement pipmak.saveequirect() which reprojects the current (panoramic) node to an equirectangular image and saves it as equirect.bmp inside the node folder. After that you can open "equirect.bmp" with a graphic program which support layers , create a second, empty layer over the image, and color the area which you want to use as an hotspot, different hotspots have different colors taked from palette, Color index 0 means background, color index 1 is the first hotspot, index 2 the second etc, you can found a particularly suitable palette with easily distinguishable colors in the source distribution of Pipmak in "hotspot-palette.gif" located in the "extras" folder, or you can use palette taken from the hotspot maps in the demo. Now you can save the second layer created as a PNG 24 bits and use it as hotspot map. Another way (only programmatic, i.e.: you don't need any extra program) is to use "handle" instead "hotspots". With "handles" you can specify rectangular regions (using elevation and azimuth) in your panoramic node: handle { az = 90, el = 45, w = 90, h = 90, onmouseup = function(self) pipmak.dissolve(2) pipmak.gotonode(next_node) end, cursor = pipmak.hand_forward } Where az,el,w,h are expressed in degrees and next_node is you target node. You can create every handles you need, the limitation respect hotspots is which handle can be only rectangular, instead hotspot could have every shape. I hope that this could be useful for you. Bye. |