You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, July 19th 2009, 12:26pm

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/panofi…e/Zoetrope.html

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

see u

2

Sunday, July 19th 2009, 3:27pm

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.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<events onviewchange="show_hotspots_in_range()"
        />

<action name="show_hotspots_in_range">
    set(i,0);
    loop_hotspots(0);
</action>

<action name="loop_hotspots">
    test_hotspot_in_range(get(hotspot[%1].name));
    inc(i);
    if (i LT hotspot.count, loop_hotspots( get(i) ) );
</action>

<action name="test_hotspot_in_range">
    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 25, set(hdistance,25) );
    if(vdistance GT 25, set(vdistance,25) );
    div(hdistance,hdistance,25);
    div(vdistance,vdistance,25);
    add(distance2,hdistance,vdistance);
    sub(hotspot[%1].alpha,1.0,distance2);
    if(hotspot[%1].alpha LT 0.2, set(hotspot[%1].alpha,0.2) );
</action>


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

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

Source code

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


best regards,
Klaus

3

Sunday, July 19th 2009, 11:20pm

wow ! was fast !

then we don't need buil-in functions ?

Klaus you rocks ! *thumbsup*

Quoted

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 ;-)

thanks

4

Monday, July 20th 2009, 12:35pm

Excellent Klaus ..! ! ! ! *thumbsup* *g*

viewinz

Intermediate

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

5

Thursday, August 6th 2009, 12:25am

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

I've tried changing the alpha for fillalpha and it's not having much of an effect.

6

Thursday, August 6th 2009, 10:47pm

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

7

Wednesday, August 12th 2009, 12:08pm

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

8

Thursday, August 13th 2009, 11:40am

Hi, Klaus

Possible to do a action automatic when the hotspot is on alpha 1

e.i when the hotspot "info" is on alpha 1 open the plugin image" info" or make a sound

will be great *thumbsup*

viewinz

Intermediate

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

9

Saturday, August 15th 2009, 2:47am

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?

10

Wednesday, August 19th 2009, 11:01pm

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:

Source code

1
2
3
4
5
<hotspot ... ath=".." atv="..">
  <point ... /> 
  <point ... /> 
  ...
</hotspot>


best regards,
Klaus

viewinz

Intermediate

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

11

Thursday, August 20th 2009, 11:24pm

Here's my hotspot -

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<hotspot name="pier2beach"         
keep="false"         
visible="true" 
enabled="true" 
handcursor="true" 
capture="true" 
children="true"          
zorder="0"         
fillcolor     ="0xffffff" 
fillalpha     ="0.00" borderwidth     ="0.0" bordercolor     ="0xffffff" borderalpha     ="0.00"         fillcolorhover="0xffffff" fillalphahover="0.30" borderwidthhover="0.0" bordercolorhover="0xffffff" borderalphahover="0.00" 
        onover="hs_text()"
url="%SWFPATH%/hs.png"
scale="0.3"
ath="-266"
atv="-1"         
onhover=""         
onout=""         
ondown="hs(beach,beach2ferry)"         
onup=""         
onclick=""         
flying="0">
<point ath=" 85.3296" atv=" -3.1666" /><point ath="111.7186" atv=" -3.1227" /><point ath="111.7009" atv="  0.7309" /><point ath="104.4062" atv="  1.7199" /><point ath="106.9587" atv="  3.3946" /><point ath="104.0284" atv="  4.0171" /><point ath=" 79.6806" atv="  4.2831" /><point ath=" 84.9391" atv="  0.9845" />
</hotspot>



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

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

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<hotspot name="pier2ferry"         
keep="false"         
visible="true" enabled="true" handcursor="true" capture="true" children="true"	
zorder="0"         
fillcolor     ="0xffffff" fillalpha     ="0.00" borderwidth     ="0.0" bordercolor     ="0xffffff" borderalpha     ="0.00"         fillcolorhover="0xffffff" fillalphahover="0.30" borderwidthhover="0.0" bordercolorhover="0xffffff" borderalphahover="0.00"         
onover="hs_text()"         
onhover=""         
onout=""         
ondown="hs(ferry,ferry2pier)"         
onup=""         
onclick=""         
flying="0">
<point ath="178.2174" atv=" -1.4540" /><point ath="-125.5751" atv="  0.1901" /><point ath="-126.1102" atv=" 11.4175" /><point ath="-151.2046" atv=" 21.4357" /><point ath="177.8108" atv="  2.4959" /><point ath="173.8779" atv="  1.6940" /><point ath="174.0857" atv=" -0.0742" /><point ath="177.6207" atv="  0.1228" />
</hotspot>
<hotspot name="pier2ferry_button"         
keep="false"         visible="true" enabled="false" handcursor="true" capture="true" children="true"          
url="%SWFPATH%/hs.png" 
scale="0.4"  
zoom="true" 
zorder="0" 
ath="-150" 
atv="0">
</hotspot>



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

12

Tuesday, August 25th 2009, 1:56pm

Hi,

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

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<hotspot name="pier2ferry" 
         ath="-150" 
         atv="0"
         keep="false" 
         visible="true" enabled="true" handcursor="true" capture="true" children="true"
         zorder="0" 
         fillcolor ="0xffffff" fillalpha ="0.00" borderwidth ="0.0" bordercolor ="0xffffff" borderalpha ="0.00" 
         fillcolorhover="0xffffff" fillalphahover="0.30" borderwidthhover="0.0" bordercolorhover="0xffffff" borderalphahover="0.00" 
         onover="hs_text()" 
         onhover="" 
         onout="" 
         ondown="hs(ferry,ferry2pier)" 
         onup="" 
         onclick="" 
         flying="0">
<point ath="178.2174" atv=" -1.4540" /><point ath="-125.5751" atv=" 0.1901" /><point ath="-126.1102" atv=" 11.4175" /><point ath="-151.2046" atv=" 21.4357" /><point ath="177.8108" atv=" 2.4959" /><point ath="173.8779" atv=" 1.6940" /><point ath="174.0857" atv=" -0.0742" /><point ath="177.6207" atv=" 0.1228" />
</hotspot>

bulp

Intermediate

Posts: 389

Location: Malaysia

  • Send private message

13

Tuesday, September 1st 2009, 5:10pm

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

This post has been edited 1 times, last edit by "bulp" (Sep 1st 2009, 5:49pm)


14

Wednesday, September 2nd 2009, 1:15pm

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?...
Hi, sorry, I don't know what you mean?

bulp

Intermediate

Posts: 389

Location: Malaysia

  • Send private message

15

Wednesday, September 2nd 2009, 3:44pm

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*

viewinz

Intermediate

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

16

Wednesday, September 16th 2009, 9:21am

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.

Source code

1

				


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?

This post has been edited 1 times, last edit by "viewinz" (Sep 16th 2009, 10:51am)


17

Friday, September 18th 2009, 10:59am

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

viewinz

Intermediate

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

18

Saturday, September 19th 2009, 3:09am

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?

19

Thursday, September 24th 2009, 10:31am

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

viewinz

Intermediate

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

20

Friday, September 25th 2009, 6:44am

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?:

Source code

1
2
3
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 itthis post? Is there a conflict when using the variable i for both?

Similar threads