Using the masks for videohotspot

  • Hi, Klaus!

    at first I encountered the problem of performance degradation in videoplayer krpano version 1.16 krpano 1.16
    after replacing the swf and js with files older versions (1.0.15) the situation was corrected
    However, in the new and old versions when applying mask for videohotspot Flash player slows considerably, at certain angles of view the mask do not mask videohotspot (see screenshots)

    I decide the problem temporarily with the aid of hotspots cut from pano, and placing them over the videhotspot
    Why using option mask="hotspot [maskspot]" strongly inhibits video player?

    Thanks for answers
    Serge

  • Hi,

    there should be normally no difference between 1.0.8.15 and 1.16 here...
    The hotspot and masking code is still the same...


    Why using option mask="hotspot [maskspot]" strongly inhibits video player?

    This is related to the Flashplayer - using mask on constantly changing elements is extremely inefficient.
    The mask setting itself is only a thin-layer to the Flashplayer natives mask setting.

    The Flashplayer works internally roughly this way when mask was used:

    1. both involved objects will be rastered to bitmaps

      • this can be very cpu-intensive when the objects are large
      • distorted hotspots can be get very large at certain viewing angle - there is no screen-clipping involved here
      • the size of these resulting bitmaps is limited (the exact size depends on the Flash version), when the size would be too large no masking operation will be applied
    2. after then both objects will be mixed together using the mask
    3. then the result will be shown


    And this process is just slow - recreating bitmaps every frame, full rastering and the mixing...

    When looking for performance I would recommend not use mask at all (btw - not to confuse the maskchildren - the newer maskchildren setting is much more efficient here, but limited to rectangle masking of layer/plugin elements).

    Preprocessing the video and mixing it there with pano-background would be the much more efficient solution (and would work for html5 too).

    Best regards,
    Klaus

  • Thanks for your response Klaus.

    there should be normally no difference between 1.0.8.15 and 1.16 here...

    Yes, I know about it, but nevertheless my example works only in the old version - everything is solved by simply replacing the file player *unsure*


    using of video in the panorama is impossible without a mask, it is necessary to impose a separate PNG-hotspot - result is OK


    Best regards
    Serge

Participate now!

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