Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Sonntag, 19. Juli 2009, 12:26

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

Sonntag, 19. Juli 2009, 15:27

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.

Quellcode

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:

Quellcode

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


best regards,
Klaus

3

Sonntag, 19. Juli 2009, 23:20

wow ! was fast !

then we don't need buil-in functions ?

Klaus you rocks ! *thumbsup*

Zitat

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

viewinz

Fortgeschrittener

Beiträge: 145

Wohnort: Wellington, New Zealand

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

  • Nachricht senden

5

Donnerstag, 6. August 2009, 00:25

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

Donnerstag, 6. August 2009, 22:47

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

7

Mittwoch, 12. August 2009, 12:08

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

Donnerstag, 13. August 2009, 11:40

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

Fortgeschrittener

Beiträge: 145

Wohnort: Wellington, New Zealand

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

  • Nachricht senden

9

Samstag, 15. August 2009, 02:47

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

Mittwoch, 19. August 2009, 23:01

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:

Quellcode

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


best regards,
Klaus

viewinz

Fortgeschrittener

Beiträge: 145

Wohnort: Wellington, New Zealand

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

  • Nachricht senden

11

Donnerstag, 20. August 2009, 23:24

Here's my hotspot -

Quellcode

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 -

Quellcode

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

Dienstag, 25. August 2009, 13:56

Hi,

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

Quellcode

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

Fortgeschrittener

Beiträge: 390

Wohnort: Malaysia

  • Nachricht senden

13

Dienstag, 1. September 2009, 17:10

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

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »bulp« (1. September 2009, 17:49)


14

Mittwoch, 2. September 2009, 13:15

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

Fortgeschrittener

Beiträge: 390

Wohnort: Malaysia

  • Nachricht senden

15

Mittwoch, 2. September 2009, 15:44

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

Fortgeschrittener

Beiträge: 145

Wohnort: Wellington, New Zealand

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

  • Nachricht senden

16

Mittwoch, 16. September 2009, 09:21

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.

Quellcode

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?

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »viewinz« (16. September 2009, 10:51)


17

Freitag, 18. September 2009, 10:59

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

Fortgeschrittener

Beiträge: 145

Wohnort: Wellington, New Zealand

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

  • Nachricht senden

18

Samstag, 19. September 2009, 03:09

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

Donnerstag, 24. September 2009, 10:31

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

Fortgeschrittener

Beiträge: 145

Wohnort: Wellington, New Zealand

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

  • Nachricht senden

20

Freitag, 25. September 2009, 06:44

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

Quellcode

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?