thanks Klaus, now it works!
Posts by Woiferl
-
-
Hello everyone,
I have a question about maps.
in the “custom skin settings” I have maps=“true”, map_type=“google”, maps_google_api_key=“xxxxxxx”.If I now click on the world icon in the control bar, the Google map and the POI are also displayed. But not the way I want it. I would like to display the map, not the satellite view, and zoom in on the POI in the map. And unfortunately this is not possible.
Can you please help me with this?
Thank you very much!This is how the map should be displayed when you click on the icon:
-
This also works wonderfully with Ptgui (from version 13)
-
Hi Woiferl, thanks for your answer but Canon RP is a full-frame camera that costs $800 USD. I'm looking for a solution with an APS-C sensor camera.
You would need a 4.5 mm lens with a crop camera. You would need a 4.5 mm lens with a crop camera. I hardly think that you find one. Have a look at https://panosociety.com/de/pages/panorama-shot-calculator and you will find what you need to calculate this.
-
-
Hello everyone,
I have a problem with a map that I am displaying in a panorama.
I use krpanomaps and actually everything works fine, except for the...In the skin_Setting I let the icon of the maps fade in. If you click on it, the layer of the box in which the map is located is displayed. If you click a second time on the button, it is hidden again.
The expand button also works perfectly.
However, if the plan is large in the panorama and you click a second time on the Maps button in the skin_settings, it is no longer set to the default value and is hidden.What am I doing wrong? Here is the code as I wrote it, I have to say that I am not a real programmer, I hope you can help me.
So that you can see what I mean, I have uploaded the tour to my server: link
And here is the code:
Code
Display More<action name="skin_showmap"> if(layer[planbox].y == 10, if(caller.expanded == true, (caller.expanded = false; callwith(caller.parentobject, changealign(get(caller.backupalign), get(caller.backupedge)); tween(x|y|width|height, get(caller.backuppos), 0.5, default, caller.parentobject.zorder -= 100; call(skin_hidemap); ); ); ), tween(layer[planbox].y, -300, 0.5, easeInOutQuad) ), tween(layer[planbox].y, 10, 0.5, easeInOutQuad) ); </action> <action name="skin_hidemap"> tween(layer[planbox].y, -300, 0.5, easeInOutQuad); </action> <action name="expand" scope="local"> if(caller.expanded == false, caller.expanded = true; caller.backupalign = caller.parentobject.align; caller.backupedge = caller.parentobject.align; caller.backuppos = join('|',caller.parentobject.x, caller.parentobject.y, caller.parentobject.width, caller.parentobject.height); caller.parentobject.zorder += 100; callwith(caller.parentobject, changealign(center,center); tween(x|y|width|height, 0|0|-150|-150); ); , callwith(caller.parentobject, changealign(get(caller.backupalign),get(caller.backupedge)); tween(x|y|width|height, get(caller.backuppos), 0.5, default, caller.expanded = false; caller.parentobject.zorder -= 100; ); ); ); </action>
-
Thank you!
-
-
Maybe I can help you a little.
Here you will find a demo file that I created for testing.
Code
Display More<krpano> <!-- view settings --> <view fovtype="MFOV" hlookat="75" fov="120.000" vlookat="10" maxpixelzoom="1.0" fovmax="120" fovmin="70" limitview="auto" /> <!-- preview picture --> <preview url="kitchen.tiles/preview.jpg" /> <!-- panorama tiles --> <image> <cube url="kitchen.tiles/pano_%s.jpg" /> </image> <!-- hotspot picture --> <hotspot name="h1" url="img/h1.png" distorted="true" zorder="1" onloaded="calc_pos_from_hfov_yaw_pitch_roll(25.6627, -109.688, -8.52368, -18.7263);;" enabled="false" alpha="0" /> <!-- polygonal hotspot --> <hotspot name="h1_poly" distorted="true" visible="true" zorder="2" fillcolor="0xa32d23" bordercolor="0x1a73e8" enabled="true" capture="false" handcursor="true" alpha="0.5" onclick="open_h1()" > <point ath="103" atv="6.5" /> <point ath="103" atv="24.5" /> <point ath="122.779" atv="25.618" /> <point ath="122.779" atv="6.886" /> </hotspot> <!-- button to show / hide the polygon hotspot --> <plugin name="button_hide_poly" type="text" text="hide / show polygonal hotspot" zorder="1" enabled="true" alpha="1" css="font-family:Arial; font-size:16px; color:#ffffff;" bgcolor="0x1a73e8" bgborder="1" align="centerbottom" y="20" onclick="open_close_poly();" /> <!-- action to show / hide the picture hotspot --> <action name="open_h1" > if(hotspot[h1].alpha === 0, tween(hotspot[h1].alpha,1 ,1),tween(hotspot[h1].alpha,0 ,1)); </action> <!-- action to show / hide the polygonal hotspot --> <action name="open_close_poly" > if(hotspot[h1_poly].alpha === 0, tween(hotspot[h1_poly].alpha,1 ,1),tween(hotspot[h1_poly].alpha,0 ,1)); </action> <!-- calculate --> <action name="calc_pos_from_hfov_yaw_pitch_roll"> calc(deg2rad, Math.PI / 180.0); <!-- calc the hotspot size --> calc(hfov, 0.5 * (%1) * deg2rad); Math.tan(hfov); set(width, calc(hfov * 1000)); set(height, 'prop'); <!-- calc the ath, atv and rotate settings --> 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> </krpano>
-
-
-
Hi Insideplaces,
try this code, just paste it into your XML file.
I used it for a Tour, the music starts with the first interaction in the panorama.
On the Destop as well as on the mobile phone.I hope it works the same way for you.
best regards,
Woiferl
Code<!-- startup action - load the first scene with sound --> <action name="startup" autorun="onstart"> if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); ); loadscene(get(startscene), null, MERGE); if(startactions !== null, startactions() ); playsound(bgsnd, sounds/your_sound.mp3, 0, 0.5); </action>
-
Since the thread is already a bit outdated, I thought I would make a new tutorial for PTGui version 11.xxx (and higher?).
The GUI of the PTgui has changed fundamentally, and the original post simply no longer fits the workspace.
@ Klaus I used the original file, I hope that's ok?
Load the finished panorama on PTGui.
Click on the panorma editor button.
In the panorama editor, click on Projection.
Select "Rectarlinear" from the projection options and set the vertical compression to "0".
By default, a different value is set here!Rotate the view in the desired direction and use the sliders to determine the image section. Copy the number under "Field of view", you will need it later.
Go to "Image Parameters" in the main menu of PTGui. Copy the values for Yaw, Pitch and Roll
Click on the number for Yaw Pitch and Roll in PTGui for all decimal places, copy it.
Go to "create Panorama" in the main menu of PTGui.
Set the "% of optimum size" to 100 and click on "Create Panorama".
A panorama of the selected section is created.Open the created file in Photoshop and edit it.
For the pool example - here the extracted image (already modified - green instead of blue color):
For the pool example - here the extracted values:
hfov = 139.854
yaw =-90.779
pitch = -0.625974
roll = -38.270710. Load that hotspot image into krpano:
Code
Display MoreCODE: <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); mul(hfov,0.5);Math.tan(hfov);mul(width,hfov,1000);set(height,'prop'); 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>
That calc_pos_from_hfov_yaw_pitch_roll(hfov, yaw, pitch, rol) action can now be called in the onloaded Event from the hotspot. The action has the hfov, yaw, pitch and roll values from PTGUI as parameters.
The final xml code will look like this:
Code<hotspot name="spotNNN" url="pool_extract.jpg" distorted="true" onloaded="calc_pos_from_hfov_yaw_pitch_roll(150, -90, -4, -30);" ... />
The complete XML file:
Code
Display More<krpano> <preview url="pool.tiles/preview.jpg" /> <image> <cube url.normal="pool.tiles/pano_%s.jpg" url.mobile="pool.tiles/mobile_%s.jpg" /> </image> <view hlookat="90" vlookat="15" fov="100" /> <!-- water hotspot hfov = 139.854 (values from PTGUI) yaw = -90.779 pitch = -0.625974 roll = -38.2707 --> <hotspot name="water" url.normal="pool_extract.jpg" url.mobile="pool_extract_mobile.jpg" distorted="true" onloaded="calc_pos_from_hfov_yaw_pitch_roll(139.854, -90.779, -0.625974, -38.2707); animation();" enabled="false" alpha="0.0" animation="tween(alpha, calc(1.0 - alpha), 3.0, linear, animation());" /> <action name="calc_pos_from_hfov_yaw_pitch_roll"> calc(deg2rad, Math.PI / 180.0); <!-- calc the hotspot size --> calc(hfov, 0.5 * (%1) * deg2rad); Math.tan(hfov); set(width, calc(hfov * 1000)); set(height, 'prop'); <!-- calc the ath, atv and rotate settings --> 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> </krpano>
I hope I was able to help you a little with the small update for PTGui.
Edit: Attention!, the "," in KRPano must be converted into a "." for the special values!
I use a German keyboard, so PTgui writes a comma in the values.
Thanks to mtness for the hint in #142 in this thread
best regards,Woiferl
-
I have now edited the whole file again, starting with the raw data.
Obviously I made a mistake somewhere in the image processing, with the new version I can load both the 16bit and 8 bit version into the KRpanoTools without banding.
Many thanks for the help Klaus, I have learnt a lot again!
I didn't even know about the options in the "flat.config!Now everything looks fine, I'm really happy!
-
Many thanks Klaus,
yes, you're right, that's color banding, unfortunately I said it wrong, sorry.
It's of course a 16bit file, I'll try to see if it works, output the file to 8 bit in Photoshop and only then continue working with the KR Panotools.
Thank you also for the tip about the color profile, if the colors on the internet differ a little, I honestly don't care. I work on a calibrated monitor, but what do I know what the rest of the world has or how they see my photos. The colors are important to me for prints, but for the internet it's not really extremely relevant. (my opinion!)
I find the JPG quality really amazing! Is there actually anything that krpano can't do?
Ich wünsche Dir ein frohes neues, und ich hoffe Du bist gut rüber gerutscht!
(happy new Year!)
-
Hi all,
on my last vacation in Portugal I took a 3 gigapixel panorama
Everything looks wonderful in Photoshop, including the sky.
The image has a size of almost exactly 3 gigapixels, 113,104 x 26,553 pixels. Due to the size, the file also has 27.5 GB and I had to load the image directly from the .psb format with the krpano tools v1.21 using the flat.config.
Now I have very strong compression artifacts in the sky that don't exist in the original Photoshop file. Can I do anything about it? I'm a little at a loss right now.
Here's a link to the file, please look at the sky, it looks very bad.
And here is the XML code if you need it.
Code
Display More<krpano bgcolor="0x000000"> <!-- the skin and the flat pano viewing and controlling setup --> <!--<include url="skin/defaultskin.xml" />--> <include url="skin/flatpano_setup.xml" /> <!-- preview pano image --> <preview url="Ferragudo.tiles/preview.jpg" /> <!-- pano image --> <image hfov="1.00" vfov="0.234766" voffset="0.00"> <flat url="Ferragudo.tiles/l%l/%00v/l%l_%00v_%00h.jpg" multires="512,1792x422,3584x842,7168x1684,14080x3306,28288x6642,56576x13284,113152x26564" /> </image> <!-- link wnlpd.com --> <plugin name="logo" url="logo.png" zorder="0" alpha="0.7" scale="0.5" onover="tween(alpha,1.0 ,0.6);" onout="tween(alpha,0.5 ,1);" onclick="openurl(https://www.wnlpd.com/galerie/tour,_blank);" keep="true" align="rightbottom" x="20" y="30" /> </krpano>
Thank you!
-
Schau Dir mal das ADD Hotspot Plugin an.
Mit diesem Plugin brauchst Du ca. 3 Minuten um so eine Area einzurichten.
Einfach nur toll, was Alexandr da programmiert hat!
-
I was able to solve the problem myself. I simply used popups, and now everything works great!
-
Hello everyone,
i'm currently in the process of designing a tour and, thanks to many helping users here in the forum and plugins, I've been able to implement my ideas. I have two questions about this because my programming skills are at a low level.
1. I am facing a problem that I cannot solve.
It's about the scrollbar which is on the right in the scrollarea. I copied and adapted the script from the examples on the KRpano site. Everything works well, except for the scrollbar whenever I need several scroll areas in a panorama.
The scroll area programmed first works as it should. Unfortunately, the scrollbar doesn't work in the second one.
So that you can better understand what I mean, I have temporarily uploaded the tour to my server.
The second question, I probably need 10-15 such Scrollaeras with text in the tour, is there a more elegant way to design the whole thing? Here is the code as I have written it so far with my knowledge. Please forgive me, I'm still learning...
Lastly, here is the code I wrote:
Code
Display More<krpano version="1.21" title="txtlayer"> <!--Space in top of Logo --> <data name="info_00"><![CDATA[ <br> <br> <br> ]]></data> <!--INFOTEXT SCENE01 Gallery--> <data name="info_01_g"><![CDATA[ mytext ]]></data> <!--info_01_g --> <layer name="infotxt_01_g" type="container" align="center" width="100%" height="100%" alpha="0" autoalpha="true" bgcolor="0x000000" bgalpha="0.9" keep="true" zorder="5" enabled="true" bgcapture="true" > <layer name="box_1.1" type="container" align="center" width.normal="600" width.mobile="80%" height="600" bgcolor="0x000000" bgalpha="1" bgborder="1 0x777777 0.5" bgroundedge="7" bgshadow="0 4 20 0x000000 0.25" > <layer name="scrollarea_01_g" type="scrollarea" width="-4" flowchildren="v" childmargin="10" scrolltype.desktop="smooth" scrolltype.tablet.or.mobile="inertia" direction="v" draggable="true" mwheel="true" capturechildren="true" autoscrollbars="null,vscrollbar_grip,10" onhover_autoscrolling="false" onscroll="" onoverflowchange="" > <!-- Scrolling content: --> <layer name="spacetop_01_g" type="text" align="top" html="get:data[info_00].content" htmlautosize="true" width="100%" bgalpha="0.0" css="color:white; font-size:18px;" alpha="1" /> <layer name="logo_01_g" type="image" url="%SWFPATH%/menu/image/logo.png" y="-10" align="centertop" scale="0.5" /> <layer name="content_01_o1_g" type="text" align="lefttop" html="get:data[info_01_g].content" htmlautosize="true" width="100%" bgalpha="0.0" css="color:white; font-size:18px;" alpha="1" /> </layer> <!-- Non scrolling layers: --> <layer name="vscrollbar_bg_01_g" type="container" align="right" width="16" height="100%"> <layer name="vscrollbar_grip" type="container" align="righttop" width="8" x="4" height="16" bgcolor="0xAAAAAA" bgalpha="0.5" bgroundedge="7" bgcapture="true" /> </layer> </layer> <!--button close--> <layer name="infotxt_close" align="righttop" scale="0.5" x="15" y="15" keep="true" zorder="2" onclick="hide_infotxt_01_g()" url="%SWFPATH%/img/close2.png" /> </layer> <!--INFOTEXT SCENE01 VIDEO--> <!--Space in top of Logo --> <data name="info_01"><![CDATA[ <br> <br> <br> ]]></data> <!--INFOTEXT SCENE01 Video--> <data name="info_01_v"><![CDATA[ mytext ]]></data> <!--info_01_v --> <layer name="infotxt_01_v" type="container" align="center" width="100%" height="100%" alpha="0" autoalpha="true" bgcolor="0x000000" bgalpha="0.9" keep="true" zorder="5" enabled="true" bgcapture="true" > <layer name="box1.2" type="container" align="center" width.normal="600" width.mobile="80%" height="600" bgcolor="0x000000" bgalpha="1" bgborder="1 0x777777 0.5" bgroundedge="7" bgshadow="0 4 20 0x000000 0.25" > <layer name="scrollarea_01_v" type="scrollarea" width="-4" flowchildren="v" childmargin="10" scrolltype.desktop="smooth" scrolltype.tablet.or.mobile="inertia" direction="v" draggable="true" mwheel="true" capturechildren="true" autoscrollbars="null,vscrollbar_grip,10" onhover_autoscrolling="false" onscroll="" onoverflowchange="" > <!-- Scrolling content: --> <layer name="spacetop_01_v" type="text" align="top" html="get:data[info_01].content" htmlautosize="true" width="100%" bgalpha="0.0" css="color:white; font-size:18px;" alpha="1" /> <layer name="logo_01_v" type="image" url="%SWFPATH%/menu/image/logo.png" y="-10" align="centertop" scale="0.5" /> <layer name="content_01_v" type="text" align="lefttop" html="get:data[info_01_v].content" htmlautosize="true" width="100%" bgalpha="0.0" css="color:white; font-size:18px;" alpha="1" /> </layer> <!-- Non scrolling layers: --> <layer name="vscrollbar_bg_01_v" type="container" align="right" width="16" height="100%"> <layer name="vscrollbar_grip_01_v" type="container" align="righttop" width="8" x="4" height="16" bgcolor="0xAAAAAA" bgalpha="0.5" bgroundedge="7" bgcapture="true" /> </layer> </layer> <!--button close--> <layer name="infotxt_close_01_v" align="righttop" scale="0.5" x="15" y="15" keep="true" zorder="2" onclick="hide_infotxt_01_v()" url="%SWFPATH%/img/close2.png" /> </layer> <!--Action Text Scene01 Gallery --> <action name="hide_infotxt_01_g"> tween(layer[infotxt_01_g].alpha, 0); </action> <action name="show_infotxt_01_g"> tween(layer[infotxt_01_g].alpha, 1); </action> <!--Action Text Scene01 Video --> <action name="hide_infotxt_01_v"> tween(layer[infotxt_01_v].alpha, 0); </action> <action name="show_infotxt_01_v"> tween(layer[infotxt_01_v].alpha, 1); </action> </krpano>
I would be happy if you could help me with this.
best regards,
wolfgang
-
Thank you!, you´re great!