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?
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?
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
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?
set(image.prealign,'0|0|60');
updateobject(true,true);
set(image.prealign,'0|0|<ROTATION VALUE IN DEGREES>');
Or camera rotation
https://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
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:
set(rz, 0);
tween(rz, 360, 10.0, linear, null, txtadd(image.prealign, '0|0|', get(rz)); updateobject(true); updatescreen(); );
Here as online example:
https://krpano.com/krpano.html?pa…datescreen(););
Best regards,
Klaus
HI!
Wow! didn't knew, nice to know, thanks!!
Andrey
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.
Hi
ondown="tween(view.camroll,720,distance(720,3),linear);" - start rotation
onup="stoptween(view.camroll);" - stop rotation
Something like that
Andrey
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
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.
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:
https://krpano.com/plugins/userpl…ath/#attributes
Best regards,
Klaus
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:)
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?
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
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!