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, 10. August 2014, 15:38

flat pano - rotate along Z axis

Hello,

Is it possible to rotate PoV in flat panorama along Z axis? I have some high resolution macro images, where user would benefit in being able to rotate point of view along Z axis freely. Can it be done?

2

Sonntag, 10. August 2014, 19:52

Can it be done?

you mean area rotation??
definitely not ...

it could be done in flash but ... see also this

use hotspot-popups which could be dynamicaly rotate.

greetz
mil

3

Sonntag, 10. August 2014, 21:07

I meant changing orientation of an image - just like rotating a map. Simplest things are trickiest to explain so here is visual aid:)

Canvas rotation would work just as good as point of view (camera) rotation I guess. To be honest I was certain this would be pretty simple. I did not understand much from the link provided - is it really not possible without resorting to flash programing?

Beiträge: 1 850

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

4

Sonntag, 10. August 2014, 23:55

set(image.prealign,'0|0|60');

updateobject(true,true);

set(image.prealign,'0|0|<ROTATION VALUE IN DEGREES>');
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

5

Donnerstag, 14. August 2014, 07:54

Or camera rotation
http://krpano.com/docu/xml/#view.camroll
view Z rotation
prealign is works just for first load of image and you can't change this attribute at runtime just on load image.

Andrey *thumbup*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

6

Donnerstag, 14. August 2014, 10:35

Hi,

just as note - changing the prealign setting dynamically is also possible, but a bit more complicated - tween any variable and use the 'update' callback to build and update the prealign setting - additionally the updateobject() and updatescreen() action need to be called for updating the results.

e.g. to rotate once around the z axis:

Quellcode

1
2
set(rz, 0);
tween(rz, 360, 10.0, linear, null, txtadd(image.prealign, '0|0|', get(rz)); updateobject(true); updatescreen(); );


Here as online example:
http://krpano.com/krpano.html?pano=panos…datescreen(););

Best regards,
Klaus

7

Freitag, 15. August 2014, 18:29

HI!
Wow! didn't knew, nice to know, thanks!!

Andrey
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Sudarchikov Andrey« (16. März 2016, 03:31)


8

Sonntag, 31. August 2014, 19:50

Hello gyus,

Thank you for the tips, it is helping a lot. After some test I realized that actually rotating camera and rotating canvas is not the same. In my case I need to implement camera rotation. Canvas rotation is not working properly, as when image is zoomed in, it is not rotating along point of interest, but along the very center of image. So it seems that I should use camroll attribute. But I still have a problem with proper implementation. I would like have a button that will slowly rotate camera when it is pushed.
ondown="set(view.camroll,+1);" is not working that way. What am I doing wrong? I am not very fluent in krpano syntax yet, so probably I am making some silly mistake. I will appreciate any suggestions.

Adam.

9

Sonntag, 31. August 2014, 21:30

Hi
ondown="tween(view.camroll,720,distance(720,3),linear);" - start rotation
onup="stoptween(view.camroll);" - stop rotation

Something like that

Andrey
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

10

Montag, 1. September 2014, 12:26

Hi,

another note - when changing the view.camroll setting, consider also setting the control.camrollreset setting to false to avoid that it will be set back to 0 on user panning.

Best regards,
Klaus

11

Montag, 1. September 2014, 20:16

@Andrey
Thank you, works like charm.
@Klaus
Yes, I was scratching my head about this behavior:) Thanks!

Just one more thing. Is there any simple way to rotate dragging cursor frame of reference together with camera rotation? When I rotate camera 90 degrees, dragging image left-right moves it up-down. This is not very intuitive way of navigation for user:)

I guess it wouldn't happen if I used image.prealign, but in this case there would be a problem with center of rotation, which is fixed to the center of the image instead of point of interest.

Adam.

12

Montag, 1. September 2014, 22:54

I'm not sure what you are trying to achieve, but implementing a custom flat rotation control mode can be very complex of course, you might need to remap the viewing rotation values to other coordinate systems, do the calculations there and then remap them back...

Maybe have a look at this plugin and the rotatevector() function there to get an idea about that:
http://krpano.com/plugins/userplugins/fi…ath/#attributes

Best regards,
Klaus

13

Montag, 1. September 2014, 23:23

Looking at the example it seems it is able to do exactly what I need - after rotating image upside down with bottom slider, panning still works as it should - left is left, right is right. I'm afraid It might be too difficult to implement for newbie like me, but I will dig into documentation and try to make it work. More questions might be coming soon:)

14

Mittwoch, 3. September 2014, 22:10

Well, that was quick. Another question is coming. I am looking at the code of vectormath example. If I understand correctly, part of code responsible for remapping rotation values is inside "update_faces" action, correct?

<action name="update_faces">
plugin[vectormath].rotatevector(hotspot[pano_r].ath, hotspot[pano_r].atv, hotspot[pano_r].rotate,
get(hotspot[pano_f].ath), get(hotspot[pano_f].atv), get(hotspot[pano_f].rotate), 90,0,0);
....
....

I can see that cube faces are described with <hotspot> element instead of <image>. What is the reason for that? Another difficulty is due to fact that I need to translate this code to use it with multires flat pano instead of simple cubefaces. In online example it looks simple - recalling one of six faces, like hotspot[pano_r]. In multires pano I have only multiple <level> elements.

Could you try to clarify that a little bit for me?

Tuur

Erleuchteter

Beiträge: 3 019

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

15

Mittwoch, 3. September 2014, 23:11

Hi,
Yes that is correct.( i think)

It is called hotspot element because that is what they are.

I think this is never going to work with multires.
To complicated and with the six cubefaces already quite heavy on the machine.
Look here for an old example.
http://www.virtualtuur.com/krpano/vector/3/
Not sure if it still live.. On ipad now..
Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur