A bug with masking the interactive area.

  • Dear comrades,

    I face a strange problem. It might be a bug, but I would prefer it to be just my mistake to be solved.

    I put the interactive area on the scene. This is a kitchen furniture, and I need to open the door of the fridge. So I made another photo with the open door, and now set it as a hotspot named "fridge" in the code. I played with distortion but still could not set it exactly as on the scene. The edges do not perfectly fit the original picture. So desided to make a mask, that will repeat the shape of the door and cut the unnessessary space around. And it actually works great for this case.

    BUT, when I move the scene left to the hlookat under 20, the mask desappears and the cut area appears back onto the screen. When I rotate the scene to the right side the mask shows up again and does its job.

    Here is the link:
    http://wheretogoin.eu/tours/fairs/estonia/interjoor/2010/firmad/Arens/</a>

    Once the scene is loaded, click onto the (!) hotspot and it opens the door. Then slightly move the scene to the left and you will see the area around the door turns dark. It means that the white mask, that surrounds the door disappeared.

    Is that the mistake in the code or is it a bug? Do you know any quicksolution?

    Thanks

  • Hi,

    this is a kind of flashplayer limitation with masks:

    when using mask the flashplayer will convert the element which uses the mask and the mask to internal bitmaps, and these bitmaps are limited to 2880x2880 pixels,

    but the problem here - size calculation for the bitmaps doesn't respect the screen clipping, so due the perspective distortion the size of the hotspot becomes larger then 2880 pixel, and so the flashplayer stops using the mask,

    you should also notice a heavy slow down when the mask will be applied,

    a better solution (in kind of rendering performance and working) would be to use image with integrated alpha channel (e.g. a png),

    I'm also working on an internal solution where I do the screen clipping manually, but then there will be still the slow down because of the flashplayer internal bitmap conversion every frame,

    best regards,
    Klaus

  • Thanks for an answer. I also thought about using PNG. But the size of the picture becomes 200+ kb with 128 colors only (instead of 100 kb jpeg with 45% quality).

    Anyway it seems that I will need to come up with this solution then. Hope it will not slow down the viewer that bad as mask did, will it?

  • Hi,

    a other solution - why not composting the fringe image with the cube face (copying the 'background' from the front cube-face image to fringe image)?

    then no mask is needed and saving it as jpeg it also possible, and from the rendering performance side this will be the best solution at all!

    e.g. see here I have modded your fringe.jpg in that way:

    best regards,
    Klaus

  • Thanks a lot, Klaus.

    It looks much better, than mine. But still I gave up tilting and adjusting the cropped image to the original scene. Even with this solution there are still some mismarching edges. That is why I tried to solve this with masking the edges. I updated the file, you can check the same link.

    By the way, what if I reduce the size of the mask image to 50% and put the scale="2". Will this cheet the flash player?

  • Hi,

    the mismatching edges are because of the incorrect position,

    see this thread for a how to for exact positioning:
    Example/Tutorial - interactive area in the pano (aligned distorted hotspot)

    e.g. try this:

    Quote

    By the way, what if I reduce the size of the mask image to 50% and put the scale="2". Will this cheet the flash player?

    no, the displayed size counts,

    best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!