You are not logged in.

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

81

Thursday, November 7th 2013, 6:02pm

I thing people are confused by your italian/english mix. Can't follow.

82

Friday, November 15th 2013, 9:22pm

http://beenseen.ru/wp-content/uploads/tours/temp/tour.html

Please help!

xml code:

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
<krpano>
<image type="CUBE" multires="true" tilesize="512" progressive="false">
			<level tiledimagewidth="3183" tiledimageheight="3183">
				<cube url="panos/IMG_9644_Panorama.tiles/l3_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="1536" tiledimageheight="1536">
				<cube url="panos/IMG_9644_Panorama.tiles/l2_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="768" tiledimageheight="768">
				<cube url="panos/IMG_9644_Panorama.tiles/l1_%s_%v_%h.jpg" />
			</level>
			<mobile>
				<cube url="panos/IMG_9644_Panorama.tiles/mobile_%s.jpg" />
			</mobile>
		</image>
<view hlookat="90" vlookat="15" fov="100"/>
<!-- water hotspot hfov = 150 (values from PTGUI/Hugin) yaw = -90 pitch = -4 roll = -30 -->
<hotspot name="water" url="2.jpg" distorted="true" onloaded="calc_pos_from_hfov_yaw_pitch_roll(49, -170, 0, 0); animation()" enabled="false" alpha="0.0" animation="sub(newalpha,1,alpha); tween(alpha,get(newalpha), 3.0, easeInSine, animation());"/>
<!-- lower resolution images for HTML5 and mobile devices -->
<hotspot name="water" url="pool_extract_html5desktop.jpg" devices="html5+desktop"/>
<hotspot name="water" url="pool_extract_html5mobile.jpg" devices="mobile|tablet"/>
<action name="calc_pos_from_hfov_yaw_pitch_roll">
 div(hfov,%1,57.295779); div(yaw,%2,-57.295779); div(pitch,%3,57.295779); div(roll,%4,-57.295779); 
<!-- calc width -->
 mul(hfov,0.5); Math.tan(hfov); mul(width,hfov,1000); set(height,'prop'); 
<!-- calc ath,atv,rotate -->
 Math.cos(ch,yaw); Math.sin(sh,yaw); Math.cos(ca,pitch); Math.sin(sa,pitch); Math.cos(cb,roll); Math.sin(sb,roll); mul(m0,ca,ch); mul(tmp,cb,sa); mul(tmp,ch); mul(tmp2,sb,sh); add(m3,tmp,tmp2); mul(m4,cb,ca); mul(tmp,cb,sa); mul(tmp,sh); mul(tmp2,sb,ch); sub(m5n,tmp,tmp2); mul(m5n,-1); mul(tmp,sb,sa); mul(tmp,ch); mul(tmp2,cb,sh); sub(m6n,tmp,tmp2); mul(m6n,-1); Math.atan2(yaw,m6n,m0); Math.atan2(roll,m5n,m4); Math.asin(pitch,m3); mul(ath,yaw,57.295779); mul(atv,pitch,57.295779); mul(rotate,roll,57.295779); 
</action>
</krpano>


Its the same as described, alignment is ok, but its dynamic! why is it changing?
how can i use this example in make vtour multires?

Alexey Tkachenko

Professional

Posts: 770

Location: Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

83

Monday, September 7th 2015, 12:40pm

Can't get aligned spot working...

Hi guys!

I've always made distorted aligned spots without any problems. But now I can't get it working properly *blink* *confused* Either I'm missing some point or maybe there's some tricky thing in PT Gui...

Here's the link:

http://vt.most-inform.com/bugs/distorted/

The aligned spot supposed to be the ice cream refrigerator (should open doors when hovered). But the spot appears above the intended location. I traced hfov, yaw, pitch and roll values and they are passed to the calc_pos_from_hfov_yaw_pitch_roll(); action properly. But for some awkward reason the spot is placed inadequately.


Panoramas are aligned OK (I added the second pano to check it with KEEPVIEW). My code seems to be OK also:

http://vt.most-inform.com/bugs/distorted/tour.xml

Maybe thee's some change in Krpano behaviour or just some stupid tricky thing which I can't see ;-)
Regards,

Alexey

Alexey Tkachenko

Professional

Posts: 770

Location: Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

84

Monday, September 7th 2015, 1:24pm

Hehe) I moved the values from the style into the hotspot itself and now it works properly. Hmmm.... However those values were traced properly from the action...


(5 Minutes later)

*tongue* got it working. It turns out that using

Source code

1
hfov="40" yaw="110.394" pitch="-14.4036" roll="18.1743"
inside the hotspot style made the hfov, yaw, pitch, roll inside the action owervritten. I replaced them in the style with

Source code

1
hs_hfov="40" hs_yaw="110.394" hs_pitch="-14.4036" hs_roll="18.1743"
and now it works
;-)


Maybe this brainstorming might be helpful for some of you...
Regards,

Alexey

85

Tuesday, November 3rd 2015, 1:58pm

Here a small tool tha can help to create the xml for animations

http://tools.view3.com/krpano_motion/

igor.socha

Intermediate

Posts: 200

Occupation: Photographer

  • Send private message

86

Wednesday, November 4th 2015, 11:26am

Here a small tool tha can help to create the xml for animations

http://tools.view3.com/krpano_motion/

*thumbup*
Best regards,
Igor Socha

87

Saturday, November 7th 2015, 7:37pm

Good day!
I have a problem with animation (





I am doing everything according to the instructions here: Example/Tutorial - Extract a Distorted Hotspot from any kind of Pano Image (with perfect pixel alignment)

but animated picture stands in its place. and not a little bit but right in another place ((


In what may be my fault?





thank you in advance for help....
alexbar has attached the following image:
  • 11111.jpg

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

88

Saturday, November 7th 2015, 8:33pm

Error is somewhere in your code for sure. Share link with community and someone could explore and give you a hint. Without the code, we can't help you.

89

Wednesday, May 11th 2016, 1:34pm

Is there anyway to get the proper coordinates from panoramic 3d rendered image?

I already tried to align with scale, ath and atv, but getting it perfect is pretty difficult.

Timescale

Trainee

Posts: 120

Location: Netherlands

Occupation: Archaeologist, Timescale R&D

  • Send private message

90

Wednesday, May 11th 2016, 2:58pm

Is there anyway to get the proper coordinates from panoramic 3d rendered image?

I already tried to align with scale, ath and atv, but getting it perfect is pretty difficult.
There are several ways you can go about this. Perhaps something that you could take a look at is this : http://krpano.com/examples/usage/#dragable-hotspots. This example lets you move hotspots with your mouse and gives you the ath and atv.

Another option would be build an action that outputs the position of the cursor translated to the pano to a textfield.

Posts: 18

Location: Glasgow

Occupation: Virtual Tours, Photography, PHP & mySQL

  • Send private message

91

Sunday, October 9th 2016, 10:07pm

Hello,
I have a couple of distorted hotspots in this tour.
http://vintagevwcampers.imageweavers.co.uk/tour/tour.html

They work fine in chrome, but on firefox, safari or Android device they are not aligned or to scale.

Can anyone point me in the right direction?

Many thanks,
Claire

This post has been edited 1 times, last edit by "claire_france" (Oct 9th 2016, 11:28pm)


Posts: 18

Location: Glasgow

Occupation: Virtual Tours, Photography, PHP & mySQL

  • Send private message

92

Monday, October 10th 2016, 2:51pm

Update: This working now fine. I Installed latest KR Pano version 1.19r8, which may be a red herring, but I am not aware of changing anything else. Was previously using 1.19r4.

Many thanks,
C

93

Friday, October 28th 2016, 12:53pm

click toggle livepano doesn't work proper

hi klaus,
i follow your example,make a fridge door open-close effect,xml code like this:

Source code

1
2
3
4
5
6
<hotspot name="fridge-open"			url.normal="fridge-open.jpg"			distorted="true"			onloaded="calc_pos_from_hfov_yaw_pitch_roll(122, 0, 0, 0);" 									visible="false"									/>
			<action name="calc_pos_from_hfov_yaw_pitch_roll">				calc(deg2rad, Math.PI / 180.0);
				<!-- 计算热点尺寸 -->				calc(hfov, 0.5 * (%1) * deg2rad);				Math.tan(hfov);				set(width, calc(hfov * 1000));				set(height, 'prop');
				<!-- 计算球面坐标系和旋转设置 -->				calc(yaw, -(%2) * deg2rad);				calc(pitch, (%3) * deg2rad);				calc(roll, -(%4) * deg2rad);				Math.cos(ch, yaw);				Math.sin(sh, yaw);				Math.cos(ca, pitch);				Math.sin(sa, pitch);				Math.cos(cb, roll);				Math.sin(sb, roll);				Math.atan2(yaw,  calc(cb*sh - sb*sa*ch), calc(ca*ch));				Math.atan2(roll, calc(sb*ch - cb*sa*sh), calc(cb*ca));				Math.asin(pitch, calc(cb*sa*ch + sb*sh));				calc(ath, yaw / deg2rad);				calc(atv, pitch / deg2rad);				calc(rotate, roll / deg2rad);			</action>			
			<hotspot name="hs1" alpha="0" 				depth="1000"				polyline="false"				scaleflying="true"				tx="0"				ty="0"				tz="0"				onclick="abc();"				>				<point ath="-19.853476" atv="-3.9391" />				<point ath="-19.326172" atv="35.578593" />				<point ath="20.01022" atv="34.117677" />				<point ath="19.731663" atv="-4.047307" />			</hotspot>
			<action name="abc">				if(hotspot[fridge-open].visible == true,set(hotspot[fridge-open].visible,false),set(hotspot[fridge-open].visible,true));							</action>


bug:after first time click polygon area,i must remove cursor out of polygon area,onclick action can work. after that,all the thing works well,can you help me?

chris

Beginner

Posts: 24

Location: Köln

Occupation: Panoramafotograf

  • Send private message

94

Thursday, December 29th 2016, 11:59pm

hotspot image offset with WebVR

Hi there,


I was successful and very happy with Klaus' action "calc_pos_from_hfov_yaw_pitch_roll" on desktop and iOS inserting an image hotspot accurately. But switching to WebVR I recognized a slight horizontal offset of some pixel of that hotspot image. Is this a known issue? Any workaround?


Best regards,
Chris

95

Friday, December 30th 2016, 10:14am

But switching to WebVR I recognized a slight horizontal offset of some pixel of that hotspot image. Is this a known issue? Any workaround?
Add depth="off" to the <hotspot>.

chris

Beginner

Posts: 24

Location: Köln

Occupation: Panoramafotograf

  • Send private message

96

Friday, December 30th 2016, 10:52am

Add depth="off" to the .
Great! Thank you, Klaus. Works.
All the best for 2017!
Chris

ChrisR

Beginner

Posts: 11

Location: Brooklyn

  • Send private message

97

Sunday, January 8th 2017, 4:18am

Hi,

I am having some difficulty with the depth="off" method for hotspots. I am using the latest release (1.19 pr8) with all the default settings based on the MAKE VTOUR (NORMAL) droplet and I am not getting it to work.
I have searched the forum and found that for most people it appears to work OOTB. *confused*
Any pointers on what I am doing wrong or missing are greatly appreciated.
Thank you
Christian

Here is a brief outline of the process I am using:

1) Create a tour using the normal droplet based on a pano image.
2) Default cubeface size is 2048x2048 for desktop views and 1024x1024 for mobile devices.
3) Add a crop of the background image and place it as a hotspot in the scene, aligned with the background, desaturated to see the location.
4) In the first scene, I set the depth of the hotspot to "2048" and it is perfectly aligned in the 360 view, but it shifts slightly in VR.
5) In the second scene, I set the depth to "off" as described in the documentation and on the forum to render the hotspot at an infinite distance, but it appears that the depth resorts to the default "1000". The actual value returned when doing a trace is NaN.

Here is a link to the tour:

http://christianrietzke.de/vr/depth/tour.html

And here is the code - everything else is left at the default.

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
	<action name="trace_depth">
		showlog();
		trace('hs_depth %1 = ','get(hotspot[hs_depth_01].depth)' );
	</action>
	
	<scene name="scene_pano_01" title="Scene 01: Depth 2048" onstart="trace_depth(Scene 01);" thumburl="panos/pano.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/pano.tiles/preview.jpg" />

		<image>
			<cube url="panos/pano.tiles/pano_%s.jpg" />

			<cube url="panos/pano.tiles/mobile/pano_%s.jpg" devices="mobile" />
		</image>

		<!-- place your scene hotspots here -->
		<hotspot name="hs_depth_01"
			url="skin/hs_depth.jpg"
			distorted="true"
			enabled="false"
			depth="2048"
		/>
	</scene>
	
	<scene name="scene_pano_02" title="Scene 02: Depth Off" onstart="trace_depth(Scene 02);" thumburl="panos/pano.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/pano.tiles/preview.jpg" />

		<image>
			<cube url="panos/pano.tiles/pano_%s.jpg" />

			<cube url="panos/pano.tiles/mobile/pano_%s.jpg" devices="mobile" />
		</image>

		<!-- place your scene hotspots here -->
		<hotspot name="hs_depth_01"
			url="skin/hs_depth.jpg"
			distorted="true"
			enabled="false"
			depth="off"
		/>
	</scene>

98

Wednesday, January 11th 2017, 10:01pm

Hi,

the rendering itself is correct, but the alignment/scaling of your hotspot is not.

You have adjusted the scale for depth=2048, but it would need to be scaled for depth=off.

Please see the first post of this thread for creating pixel-perfect hotspot images (for stereo usage they need to be defined with depth=off in the xml).

Best regards,
Klaus

ChrisR

Beginner

Posts: 11

Location: Brooklyn

  • Send private message

99

Wednesday, January 11th 2017, 10:35pm

Update to my previous post

Thank you, Klaus. Was just writing an update to my previous post when I saw your response. Will certainly take a closer look at the first post in this thread and try the method described there.

In the meantime, I did achieve my goal of perfect alignment of a hotspot with the background image for regular and vr mode - after a lot of trial and error. *smile*
To get the alignment to work, I set the worldscale variable in the webvr.xml settings to "10.0".
Here's the code:

Source code

1
2
3
4
5
	<plugin name="WebVR" devices="html5" keep="true"
	    	url="webvr.js"
			worldscale="10.0"
        	...
	    	/>

And here is the updated example:
http://christianrietzke.de/vr/depth/tour.html

Like I said - got this through trial and error and it might be a bit of a hack/ bandaid, especially as it has a global effect on the tour and might cause other yet unforeseen issues.
But it works in this case across Android and iOS platforms, which makes for happy clients. *g*

ChrisR

Beginner

Posts: 11

Location: Brooklyn

  • Send private message

100

Wednesday, January 11th 2017, 11:08pm

Thanks again, Klaus, for nudging me back to first post. Just ran through it slowly and it all worked out perfectly!
*smile*