MouseOver to reveal changes in Panorama (opening door, etc)  

Share your tips and tricks here or get help with any Panotour 2.0+ problem!
No bug reports (of any kind) in this forum!
no avatar
dreamspy
Member
 
Topic author
Posts: 57
Likes: 5 posts
Liked in: 1 post
Joined: Sat May 09, 2015 4:02 pm
Info

MouseOver to reveal changes in Panorama (opening door, etc)

by dreamspy » Thu Aug 09, 2018 7:38 pm

Hi there

In this panorama when I hover over the door, it opens:

https://krpano.com/tours/weingut/

I'm wondering, is this possible using Autopano? I've found some instructions for PTGUI would prefer to stick to Autopano :)

Regards
Frímann

no avatar
benji33
Kolor Team
 
Posts: 5848
Likes: 92 posts
Liked in: 199 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: MouseOver to reveal changes in Panorama (opening door, e

by benji33 » Fri Aug 17, 2018 12:15 pm

Have a look on the Open Doors free plugin on this website : https://shop.compunics.com.ni/
Here is how to install tird parties plugins : http://www.kolor.com/wiki-en/action/vie ... ll_plugins
Benjamin

dreamspy likes this post.

no avatar
dreamspy
Member
 
Topic author
Posts: 57
Likes: 5 posts
Liked in: 1 post
Joined: Sat May 09, 2015 4:02 pm
Info

Re: MouseOver to reveal changes in Panorama (opening door, e

by dreamspy » Wed Aug 29, 2018 11:07 pm

I've done a quick test where I'm opening the door of a cabinet. There is a strange flicker at the beginning when I'm opening the door. It's like the overlayed image is preloaded at a much larger scale, stays on the screen for a few milliseconds, and then pops into place. It's visible 80% of the time, and it has happened that the image never pops into place, meaning that it is viewed zoomed in and highly out of place.

The panorama can be seen here:

http://360.pan.is/cabinet/

Here are screenshots of the problem that I' describing:

Cabinet before opening:

Image

Cabinet right after clicking hotspot, the image is overlayed and zoomed in for a few milliseconds:

Image

Final view with cabinet open:

Image

And finally here is a youtube video of the whole thing:

https://www.youtube.com/watch?v=l1Hr-usUL8w

no avatar
dreamspy
Member
 
Topic author
Posts: 57
Likes: 5 posts
Liked in: 1 post
Joined: Sat May 09, 2015 4:02 pm
Info

Re: MouseOver to reveal changes in Panorama (opening door, e

by dreamspy » Thu Aug 30, 2018 1:00 am

Also on another note. If this is a bug that's hard to overcome, would it be possible to create the tour in Panotour, and add the overlays and hotspots manually afterwards, somehow similar to the process shown here:

https://krpano.com/forum/wbb/index.php? ... eadID=7272

I've done just the first steps of creating a hotspot like described in the above link, and this is the resulting panorama:

http://360.pan.is/cabinetKrpano/

No flickering here. But the problem is that I need to have something more visible for people to know what to click and what not to click. :)

So my two questions are at the moment:

1. Can I fix the flickering in the OpenDoors Panotour plugin?
2. If not, then can I use XML code directly as in the above example, and create a hotspot dot, something that catches the eye, to activate the cabinet overlay?

no avatar
benji33
Kolor Team
 
Posts: 5848
Likes: 92 posts
Liked in: 199 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: MouseOver to reveal changes in Panorama (opening door, e

by benji33 » Thu Aug 30, 2018 9:04 am

Have you asked Michael (plugin creator) about that ?
ID on the forum is 360-compunics-com-ni
Benjamin

no avatar
dreamspy
Member
 
Topic author
Posts: 57
Likes: 5 posts
Liked in: 1 post
Joined: Sat May 09, 2015 4:02 pm
Info

Re: MouseOver to reveal changes in Panorama (opening door, e

by dreamspy » Fri Aug 31, 2018 1:52 am

benji33 wrote:Have you asked Michael (plugin creator) about that ?
ID on the forum is 360-compunics-com-ni


Yeah sent him a message. Hopefully he sees it :)

no avatar
dreamspy
Member
 
Topic author
Posts: 57
Likes: 5 posts
Liked in: 1 post
Joined: Sat May 09, 2015 4:02 pm
Info

Re: MouseOver to reveal changes in Panorama (opening door, e

by dreamspy » Thu Sep 13, 2018 1:34 pm

Unfortunately Michael is not available for debugging this plugin, so I´m trying to sort it out myself :)

The main code is located in OpenDoors.tmpl, the whole file can be seen here: https://gist.github.com/dreamspy/acab49 ... 3523566e37

But I suspect that the problem is in this function:

Code: Select all
<action name="show{{p.id}}">
   getmessage(imgid, %1);
   preload(imgid);
   {% for picture in p.pictures.elements %}
   {% if picture.file %}
                if( imgid == {{forloop.counter0}},
         set(MyIMG,"{{dataDirectory}}/{{pluginDirectory}}/{{picture.file.fileName}}");
         txtadd(tmpMyHFOV, {{p.id}}MyHFOV, get(imgid) );
         getmessage(MyHFOV, get(tmpMyHFOV));
         txtadd(tmpMyYAW, {{p.id}}MyYAW, get(imgid) );
         getmessage(MyYAW,get(tmpMyYAW));
         txtadd(tmpMyPITCH, {{p.id}}MyPITCH, get(imgid) );
         getmessage(MyPITCH,get(tmpMyPITCH));
         txtadd(tmpMyROLL, {{p.id}}MyROLL, get(imgid) );
         getmessage(MyROLL,get(tmpMyROLL));
         txtadd(MySPOT,'spot',get(imgid) );

         addhotspot(get(MySPOT));
         set(hotspot[get(MySPOT)].url,get(MyIMG));
         set(hotspot[get(MySPOT)].keep, false);
         set(hotspot[get(MySPOT)].preload, true);
         set(hotspot[get(MySPOT)].distorted, true);
         set(hotspot[get(MySPOT)].enabled, false);
         set(hotspot[get(MySPOT)].zorder, 1);
         set(hotspot[get(MySPOT)].alpha, 0);
         set(hotspot[get(MySPOT)].onloaded, "calc_pos(get(MyHFOV), get(MyYAW), get(MyPITCH), get(MyROLL));" );
         tween(hotspot[get(MySPOT)].alpha,1);
      );
   {% endif %}
   {% endfor %}
</action>


Now it seems to me that the image is displayed before the calc_pos function is called. Which might not be that weird since the calc_pos function is called when the image has been loaded (if I understand correctly).

I've also tried to play around with the properties zorder and visible, setting the image only visible at the bottom of the function. Also tried to call calc_pos an the events onhover and ondown. (Some stuff that I found at the krpano XML reference: https://krpano.com/docu/xml/ )

The solution probably involves calling calc_pos before the alpha fades in. Is there anyone here that might have a clue on how I would achieve that goal? :)

Regards
Frímann

no avatar
benji33
Kolor Team
 
Posts: 5848
Likes: 92 posts
Liked in: 199 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: MouseOver to reveal changes in Panorama (opening door, e

by benji33 » Fri Sep 14, 2018 7:55 am

Perhaps wait for the "on load complete" event of each image prior to any position or alpha will be better, so the image will have all it's data (size, width, height, ...). It's not the case before the complete load status with the onloaded hotspot event.
Have a look here : https://krpano.com/docu/xml/#hotspot.onloaded
Benjamin

no avatar
dreamspy
Member
 
Topic author
Posts: 57
Likes: 5 posts
Liked in: 1 post
Joined: Sat May 09, 2015 4:02 pm
Info

Re: MouseOver to reveal changes in Panorama (opening door, e

by dreamspy » Fri Sep 14, 2018 8:44 am

It was actually just a matter of moving the tween function (responsible for fading in the alpha) into the calc_pos function. I've sent the developer the debugged file. Hope he updateds the Plugin. Í didn't want to post my changes here since it's not my Plugin, but feel free to contact me if anyone has the same problems.


Who is online

Users browsing this forum: No registered users and 7 guests