Posts by jmulder

• How does kmakemultires determine cubical or spherical output exactly?

Thanks Klaus for the quick reply.

Does that mean the 'converttocubelimit' option actually indicates the width and height ratio? Not the minimum dimensions? In other words, a value of 360x120 would imply a maximum of 3:1 for the image to be converted to a cube. Is this correct?

• How does kmakemultires determine cubical or spherical output exactly?

We tested some images yesterday and figured that the boundary is at 4:1. From 2:1 to 4:1 kmakemultires outputs cubical images. From >4:1 we'll get images for spherical projection.

What's the point of this? Surely 4:1 is quite an arbitrary number?

• How does kmakemultires determine cubical or spherical output exactly?

We're using kmakemultires (part of release 1.0.8.11) to automatically convert uploaded images from our customers to a multi-resolution set. Depending on the dimensions of the input image we assume a certain output. It has always been to my understanding that with an exact width/height ratio of 2:1 that we can safely assume images for cubical projection can and will be outputted. If it's anything above 2:1 (say 3:1) than we have to assume we're dealing with a partial (vertical wise) panorama and output images for spherical projection.

However, in our testing we see this logic is not completely followed by kmakemultires. It almost seems as if kmakemultires has a margin of error in determining for how long it will still try to output cubical images.

We assumed:
- 2000x1000 (2:1) --> cubical
- 2001x1000 (>2:1) --> spherical
- 3000x1000 (>2:1) --> spherical

However, the following seems true:
- 2000x1000 --> cubical
- 3768x1880 (>2:1) --> cubical (real world example)

We have not yet determined the boundary, as I'm kind of hoping someone can share the algorithm so we can explain it to our customers and make adjustments accordingly.

• Krpano not automatically detecting view settings

michel, thanks for the quick reply, but I just solved it in 10 seconds.

Very embarassed to admit it was caused by a cached version of the input image. Google Chrome caches anything loaded through Flash ruthless and never seemed to pick up on the changed JPG. Moving on.

Edit: This does make me realize we'll have to seriously look at implementing proper expiration headers for the input images as well. Already doing this with the XML though.

• Krpano not automatically detecting view settings

It has always been to my understanding --and some of my old prototypes seem to show this behaviour as well-- that Krpano is perfectly capable of determing view settings itself. In particular the properties 'fov', 'fovmax', 'vlookatmax' and 'vlookatmin'.

My input image is a simple JPG of 1837x313 px. In those old prototypes Krpano is perfectly capable of initializing and limiting the view in such a way that one cannot look beyond the top or bottom edges of the image.

Unfortunately, now I cannot for the life of me get it to work anymore. Here's me hoping some of the Krpano veterans can shed some light on the possible causes. We're using version 1.0.8.11 in both the implementation and the prototypes.

The used XML is the following:

Even when using the following barebones version it won't work. As such, I can't believe it's caused by anything in the global.xml or editor.xml files.

XML
``````<?xml version="1.0" encoding="UTF-8" ?>
<krpano version="1.0.8">
<!-- Image Settings -->
<image type="sphere">
<sphere url="/_temp/360fotos/panoramas/temp/pano.jpg" />
</image>
</krpano>``````

The documentation as well as my prototype leads me to believe this should work. The default settings of view.hfov equals 360 which is correct for the input image. Since view.vfov is empty, this should be calculated based on the view.hfov and the input image's dimensions. Finally, automatic limiting for vlookatmin and vlookatmax should kick in.

I tried a lot of settings related to limitrange and whatnot, but to no avail. If anyone could give some ideas what could possibly cause Krpano not to figure it out on its own, it'd be much appreciated. I am completely clueless right now.

Unfortunately, I cannot provide much more code as we have a lot of code doing lots of things, nor can I give an online location as it is not released yet.

• read/update attributes plugin AS3

This is the basic template I use and holds all the required event bindings and such:

- registerEvent() is the one that's called when your plugin is registered and ready for use in the Krpano viewer. From this point on the global variable 'p' holds a reference to the plugin instance. Through this you can read or write its data.

- updateEvent() called whenever the data changes (either through your own Flash plugin or through an action in the XML)

- resizeEvent() called when the size changes

• read/update attributes plugin AS3

I'm not exactly sure what you're trying to accomplish with your code examples, but you can read/write plugin attributes just fine using the standard interface.

If you look at: http://www.krpano.com/docu/plugins/#register

You'll see a standard method to get a reference to the plugin's instance.

• available fonts

I'd presume Krpano uses device fonts. As such, on your machine, any font installed there is usable in Krpano as well. However, any non-system fonts may not be available on someone else's system.

Unless you have complete control over the installed fonts on the machine that views the Krpano viewer, I would recommend sticking to system fonts only similar to the font restrictions in regular websites. That or find a way to embed your non-system font in a Flash file and use it like that, but that's a completely different scenario.

• Accessing progress variable from plugin

If all you need to know is when it's done, I think this should work.

Code
``````function registerEvent (e:DataEvent):void {
}

function onLoadComplete ():void {
// ...
}``````

I wouldn't know the required arguments for the method, but I'm guessing no arguments.

• Mouse event bubbling between plugins with 'enable' and 'capture' and hotspots

Just a small update for future reference, I managed to more or less solve the problem but only specifically for my case. In my situation I needed a plugin overlaying the complete viewer, but the only interactive part was positioned as a small button in the top right corner.

Note: This is just a big workaround and does not actually solve the problem related to mouse event bubbling.

The implemented workaround is as follows:

plugin[fsborder] with enabled=false, capture=false
This effectively just makes it decorative and allows all other hotspots to work just fine as if nothing else is there. The plugin itself uses the resizeEvent to calculate the dimensions and resizes the plugin accordingly. This plugin has all the Actionscript for the hover and click functionality

plugin[fsbutton]
The aforementioned plugin dynamically adds this plugin, so we can store a reference to the event handlers in the plugin's properties:

Edit: The methods onRollOverEvent and such are within the same Flash plugin. Their signature require to expect no arguments, unlike conventional event handlers assigned through Actionscript itself.

Truly love how internally it all are just variables and all plugins can reference eachother through Krpano.

Hiding/showing the plugin using Javascript
Finally, the Javascript applies a simple hover behaviour on the SWF element, which calls the Krpano interface and tells it to hide or show the plugin.

• Voting - should krpano be Flashplayer 10 only? (removing the Flashplayer 9 compatibility)

I'm one of the UX designers (and responsible for part of our front-end development) at a large Dutch website (350.000 daily uniques, 11 million daily page views) and our statistics show that Flash 9 is used by 3.2% of our visitors over the past month (4.6% in the past 6 months). In our back office system exclusively used by users in a small to medium business environment (users who often do not have the system privileges to upgrade their own software) the figures are 5.1% in the past month and 7.2% in the past 6.

I just wanted to show support for dropping Flash 9 compatibility, as I completely understand the benefits of dropping backwards-compatibility at certain key points in development of your product. Our aforementioned figures have been steadily declining and even though only a small percentage will still represent a large number, we'd be willing to go with it if the compatibility wasn't dropped in the next six months. I'm more or less confident the numbers will be neglible within the next six (or let's just say I really hope so :-)). As such, releasing 1.0.8 with Flash 9 compatibility would be our preference.

• Mouse event bubbling between plugins with 'enable' and 'capture' and hotspots

Searching the forum regarding the correct use of the 'enable' and 'capture' properties for plugins didn't give me much, so I decided to create a new thread. I seem to be having problems with using the aforementioned properties and having mouse events bubble through to any hotspots that are underneath it.

The documentation mentions:

Quote

.. when "enabled=true" and "capture=false" then the mouse events are sent to the plugin and also to all underlying objects ...

From searching the forum Klaus mentioned that with "underlying objects" he meant hotspots and the krpano object itself. Taking this explanation I would have assumed the following works, but it doesn't seem to.

My situation is as follows (unfortunately I cannot provide working examples):

Plugin
I want to have an action executed whenever someone 'onmouseover' the entire Krpano viewer. To do this I created the following plugin:

Hotspots
Naturally I want hotspots in the viewer as well. As such, mouse events on the 'fshover' plugin needs to bubble through to all underlying objects. I would have assumed the above settings for the 'capture' and 'enabled' properties would work, but it does not.

Any help would be greatly appreciated! If you need more (or just a better) explanation, then let me know.

• Multi-resolution cubical using Flash variables

Allow me to answer my own question for the people that are interested, I suppose I 'guessed' the correct syntax.

Code
``````// Level 1

Also looks like SWFObject 1.5 does not encode the values properly, so I had to urlencode the placeholders in the URLs myself. Still not working perfectly, but tiles are loading and the rest might have something to do with my tiling mechanism instead.

• Multi-resolution cubical using Flash variables

I just remember the syntax for plugins and tried to apply that.

Code
``````so.addVariable('image[level].tiledimagewidth', '10000');

Got rid of the errors, but it's not working just yet. Would this be the correct syntax though?

• Multi-resolution cubical using Flash variables

Hi,

I can't seem to get multi-res cubical panoramas working when the viewer is initialized using Flash variables. The documentation uses the following XML as an example:

I assumed I could translate this to the following Flash variables:

Unfortunately, the viewer returns an "unknown attribute/path" for the 'tiledimagewidth' and 'tiledimageheight' properties, as well as 'unknown node/path' for the 'image.level.back.url' property (which I would guess is a result of the former error).

Any help would be greatly appreciated.

• 1.0.8 beta 9 - fovtype setting

Opening the krpano.swf directly did the trick, even after clearing the cache multiple times. Such a noob error -- nice. Move along now. Nothing to see here

I am getting unexpected results when adding maxpixelzoom as well. Strange.

• 1.0.8 beta 9 - fovtype setting

Am I correct in saying that both view.fovtype and view.maxpixelzoom are not yet available to be used through Flash variables? I don't seem to be seeing a difference for view.fovtype and view.maxpixelzoom seems to be unrecognized/unknown, according to the player.

Quote

INFO: krpano 1.0.7
INFO: Flashplayer WIN 10,0,2,54 PlugIn (debug)
ERROR: unknown attriubate/path - view.maxpixelzoom

Which is odd considering the version number it reports. I am 100% sure it's loading the krpano.swf as supplied in the aforementioned ZIP package.

Relevant Flash variables set through SWFObject using:

Code
``````so.addVariable('view.fovtype', 'VFOV');