appear fadein/fadeout POV driven

  • Hi klaus,

    is there possible you 'll implement one day a new function/attribute for hotspot :

    on_pov=appear
    on_pov=disappear
    on_pov=nothing (defaut)

    so invisible hotspot may appear with fade in and disappear with fade out at time they pass on center screen (point of view of visitor) while pano pan.
    or in contrary dissapear so doesn't disturb the view (example of image hotspot)

    i think is do-able with conditionnals : if pano.pan is equal to hotspot pan then hotspot visible... with a range of 20° for fadein/out off the position...

    to illustrate this, see this cool plugin for FPP by duncan :
    http://www.redshift-blueshift.com/panofiles/zoetrope/Zoetrope.html

    it will be cool if it come as buil-in function *g*

    see u

  • Hi,

    that could be very easy done via plugin:
    loop through all hotspots,
    check the distance between the hotspot ath/atv and the view hlookat/vlookat,
    and change the alhpa of the hotspot accordingly,

    but it would be also possible just with krpano actions,
    e.g.

    here a online demo of it:
    https://krpano.com/examples/108b8…otspot-pov.html

    in this demo the hotspots are not completely hidden to allow finding them
    see this code part:

    Code
    if(hotspot[%1].alpha LT 0.2, set(hotspot[%1].alpha,0.2) );

    best regards,
    Klaus

  • wow ! was fast !

    then we don't need buil-in functions ?

    Klaus you rocks ! *thumbsup*

    Quote

    that could be very easy done via plugin:
    loop through all hotspots,
    check the distance between the hotspot ath/atv and the view hlookat/vlookat,
    and change the alhpa of the hotspot accordingly,


    with summer i'm becoming lazy for programming *whistling*

    i will try with krpano actions first *wink*

    thanks

  • it seems you must call updatescreen() after changing parameters of poly-spots in order to get the desired effect

    no, this shouldn't be necessary...

    Is there a way of making this work with poly hotspots?


    the ath/atv values are not set(used) for polygonal hotspots, but when you set them manually (e.g. to the middle of the polygonal hotspot) it should work...

    best regards,
    Klaus

  • if I add ath/atv values to a poly hotspot it overrides the over coordinates and only works on the hotspot graphic, which isn't much use.

    I can get it working by adding a child hotspot but this is quite labour intensive. I want to use poly hotspots by an large, however flash something up when the pov is near and remove it afterwards, as this technique allows me to do.

    Is there a way of doing this using only one hotspot?

  • if I add ath/atv values to a poly hotspot it overrides the over coordinates and only works on the hotspot graphic, which isn't much use.

    Hi, can you describe that a bit more?
    how have you added the ath/atv?

    it should work when added in this way:

    Code
    <hotspot ... ath=".." atv="..">
      <point ... /> 
      <point ... /> 
      ...
    </hotspot>

    best regards,
    Klaus

  • Here's my hotspot -


    This only works on the graphic, the points are ignored.

    If I want it to work I have to do this -


    Which means every hotspot has to be doubled which is a bit labour intensive.

  • Hi,

    doing it in that way doesn't work? (ath/atv in the polygonal hotspot)

  • thanks zadda for this topics *thumbsup* .. and thank you to Klaus for the master code.... *thumbsup* *thumbup* *w00t* *thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup* *thumbsup*

    haha.. i do success implement this special effect...

    just want to ask klaus for the sphere to cube setting... which is what kind of seeting for making cube directly form sphere.. i mean the divided angle for each side? .... or i have to resetting during stiching to make sphere first?...

    this problems do occur during convert sphere to cube, and those angle already slice up my image hotspot...

    cheers..

    please do visit http://www.maya360.com/maya_exorage.html CLICK AT EXP button...

    ps... i do import .png images although it is big in size...

    for sample download at http://www.maya360.com/download/sample png hotspot.zip

    Edited once, last by bulp (September 1, 2009 at 5:49 PM).

  • haha... sorry for my bad grammar...

    the angle for transform sphere into cube... for each side... sometimes the cutting for each cube side separate my potential hotspot for this topics code...


    and are this code potentially use with multires pano?

    *thumbsup*

  • doing it in that way doesn't work? (ath/atv in the polygonal hotspot)

    Klaus,

    I can add ath/atv to a polygonal hotspot, however if I add a graphic the mouseover events for the polygonal hotspot are ignored and only work for the graphic.

    I want the graphic to show when the hotspot comes into view, but when the user rolls over the polygonal hotspot something else happens. However the rollover effect only works on the graphic.

    Do you get what I mean?

    i.e.

    Code

    EDIT: Actually what I want is a textfield that fades in/out and is located by the ath/atv of the hotspot, and there could be multiple hotspots in the view. Can you help me adjust your code to do something like that?

    Edited once, last by viewinz (September 16, 2009 at 10:51 AM).

  • EDIT: Actually what I want is a textfield that fades in/out and is located by the ath/atv of the hotspot, and there could be multiple hotspots in the view. Can you help me adjust your code to do something like that?

    Hi,

    you can disable the textfield (enabled="false"),
    then it will not react on mouse events anymore and only the hotspot itself will react,

    best regards,
    Klaus

  • Sorry Klaus,

    I got sidetracked.

    Further back in this conversation the main thing I wanted was to add a graphic to a polygonal hotspot and keep the polygonal hotspot characteristics etc. If I add the graphic the mouse over etc effects only work on the graphic and ignore the polygonal hotspot area.

    A work around is to have a child hotspot with a graphic.

    Is there another way of doing this?

  • A work around is to have a child hotspot with a graphic.

    Is there another way of doing this?

    Hi,

    no, just have 2 hotspots at the same position:
    - the image hotspot in background (by using a lower "zorder") and disabled (enabled="false")
    - the polygonal hotspot in foreground (by using a higher "zorder")

    like here in this example:
    Example/Tutorial - interactive area in the pano (aligned distorted hotspot)

    best regards,
    Klaus

  • This works really well clockwise, and fades out smoothly as it's supposed to.. However counter-clockwise it disappears abruptly.

    Is there something wrong with my code?:

    Code
    set(i,0);loop_hotspots(0);
    test_hotspot_in_range(get(hotspot[%1].name));inc(i);if (i LT hotspot.count, loop_hotspots( get(i) ) );
    sub(hdistance, view.hlookat, hotspot[%1].ath);mod(hdistance,hdistance,360);sub(vdistance, view.vlookat, hotspot[%1].atv);mod(vdistance,vdistance,360);if(hdistance LT 0, mul(hdistance,hdistance,-1));if(vdistance LT 0, mul(vdistance,vdistance,-1));if(hdistance GT 100, set(hdistance,80) );if(vdistance GT 100, set(vdistance,80) );div(hdistance,hdistance,80);div(vdistance,vdistance,80);add(distance2,hdistance,vdistance);sub(hotspot[%1].alpha,1.0,distance2);if(hotspot[%1].alpha LT 0.2, set(hotspot[%1].alpha,0.0) );


    p.s. I'm using this in conjunction with the other thing I'm working on it this post? Is there a conflict when using the variable i for both?

Participate now!

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