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.

andrew22222

Intermediate

  • "andrew22222" started this thread

Posts: 341

Location: Australia

  • Send private message

1

Monday, September 23rd 2013, 8:54am

How to set view without using hlookat & vlookat

Hi,

I have a scene loading but need to rotate the view 180 degrees and leave it there. Regular method would be to just set the hlookat="0" vlookat="0" but I'm using the SWFAddress plugin and it doesn't like any of them filled in.

Is there any code I can add to what's shown below to make this happen please?

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<scene name="scene_13" title="Entrance" onstart="" thumburl="panos/13.tiles/thumb.jpg" lat="" lng="" heading="">
<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="80" limitview="auto" />
<preview url="panos/13.tiles/preview.jpg" />
<image>
<cube url="panos/13.tiles/p_%s.jpg" />
<mobile>
<cube url="panos/13.tiles/m_%s.jpg" />
</mobile>
</image>

<hotspot name="spot1" style="skin_hotspotstyle" ath="-86.635" atv="13.637" linkedscene="scene_11" />
<hotspot name="spot2" style="skin_hotspotstyle" ath="-0.470" atv="24.709" linkedscene="scene_01" />

</scene>


I did try this below, the the image loaded .... rotated 180 then reloaded back in the opposite direction *sad*

Source code

1
2
3
4
5
	<action name="startup">
		if(startscene === null, copy(startscene,scene[0].name));
		loadscene(get(startscene), null, MERGE);
		delayedcall(0.1, add_scenes_to_swfaddress()); lookto(180,0,80, smooth(45,45,60), false);
	</action>


Other than adding code I'd have to restitch it in PTGUI from scratch as I no longer have the template and then set the view there.

Forgot to mention, I'd need it to work on the iPad also

Many thanks,

Andrew

This post has been edited 1 times, last edit by "andrew22222" (Sep 23rd 2013, 9:09am)


Umalo

Professional

Posts: 1,048

Location: Osijek, Croatia, EU

  • Send private message

2

Monday, September 23rd 2013, 4:39pm

http://krpano.com/docu/xml/#image.prealign
But as prealign is not supported on HTML5 than I can suggest you to use photoshop and via Offset filter you can wrap your sphere image as you want. Now you can ask your self how to know how much to offset.
In my case I had to normalize all sphere images to have correct positions for some plugin of my own and than I put one hotspot at ath=0 and second one made dragable to determine where North should be. Read ath and calculate the angle between. This is to be traslated to px (based on sphere size. 360 degree is your full sphere image. each degree is your 360th part of it. ) and did perfect offset via Photoshop.
Regards
Umalo

This post has been edited 1 times, last edit by "Umalo" (Sep 29th 2016, 11:01pm)


andrew22222

Intermediate

  • "andrew22222" started this thread

Posts: 341

Location: Australia

  • Send private message

3

Tuesday, September 24th 2013, 12:57am

What an excellent rely *thumbsup*

I only have Photoshop CS4 but the offset worked great and took me 10 seconds with not a seam in sight. Is there anything photoshop can't do ??

I have 4 more images that were not as important as the one in my request but I can now fix those easily and still keep SWFAddress & HTML5 happy.

Cheers Umalo.