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.

1

Thursday, May 14th 2020, 5:49pm

Extracted distorted hotspots not aligning in subsequent views

Hi there!

Lately I have been making rendered tours for a client who wants to show customization possibilities in the apartments he sells.

Sometimes when an item is small on screen and does not affect the general lighting of the scene I render just a region wich will be overlayed in the panorama using distorted hotspots. So far so good as it saves me a lot of 3D setup and render time.

Then i showed him the everpano plugin and hotspotless navigation, he went nuts and approved right on ;)

Problem: extracted distorted hotspots align perfectly on the first scene, but not in the others.
See by yourself: enter #this link# an go to the bathrom to the right.

Diagnostic: I think it has to do with the styles applied to the image tag in each scene, specifically the prealign, ox, oy, oz attributres, wich are all 0 in the first scene:


Source code

1
2
3
4
<style name="everpano3d_0" panoname="ap1_0_r0_cam1" prealign="0|0|0" ox="0.000" oy="0" oz="0.000" linkedscene="scene0" />
<style name="everpano3d_1" panoname="ap1_0_r0_cam2" prealign="0|-1.169|0" ox="229.300" oy="0" oz="1.373" linkedscene="scene1" />
<style name="everpano3d_2" panoname="ap1_0_r0_cam3" prealign="0|-2.723|0" ox="357.964" oy="0" oz="9.891" linkedscene="scene2" />
<style name="everpano3d_3" panoname="ap1_0_r0_cam4" prealign="0|-2.167|0" ox="249.469" oy="0" oz="111.947" linkedscene="scene3" />


Here is my scene2 (bathroom) code:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!-- ap1_0_r0_cam3 -->
<scene name="scene2" title="ap1_0_r0_cam3" alt="150" thumburl="panos\ap1_%$kit%_3_%$opcao-piso%_%$piso-estar%.tiles\snapshot.jpg"  >
  <view hlookat="0" vlookat="0" fov="124.65"  fovtype="MFOV" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
  <preview url="panos\ap1_%$kit%_3_%$opcao-piso%_%$piso-estar%.tiles\preview.jpg" />
  <image style="everpano3D_2" >
      <cube url="panos\ap1_%$kit%_3_%$opcao-piso%_%$piso-estar%.tiles\%s\l%l\%v\l%l_%s_%v_%h.jpg" multires="512,768,1600" />
      <depthmap  url="data:text/depth;base64, --OMITTED-- "enabled="true" scale="1.0" />
  </image>
  <hotspot name="spot_bnct" prealign="true" 
        url="/personalizacao/projetos/pqartes/hotspots/ap1_kit0_ban1_bnct0001.jpg"
         distorted="true" enabled="false" rx="0" ry="0.0" rz="0" 
        onloaded="calc_pos_from_hfov_yaw_pitch_roll(72, -165, -13, 5);" 
    />
</scene>


As you can see I already tried to set prealign="true" in the hotspot, with no luck. Also tried to use the ox, oy, oz values in the hotspots' rx, ry and rz attributes, still no dice.

So I finally ask, is it possible to align distorded hotspots in scenes with applied prealign, ox, oy, oz attributes?

Thanks in advance,

Djodi

2

Tuesday, May 19th 2020, 3:56pm

Quoted

is it possible to align distorded hotspots in scenes with applied prealign, ox, oy, oz attributes?

Yes. The scene I wanted to add distorted hotspots had prealign="0|-2.723|0" ox="357.964" oy="0" oz="9.891" attributes on the image tag.

The only thing I had to do was to pass this values to the right attributes of my hotspot.

It ended up like this:


<hotspot name="spot_bnct"
prealign="true" tx="357.964" ty="0.0" tz="9.891"
url="hotspots/ap1_kit0_ban1_bnct0001.jpg"
distorted="true" enabled="false" tx="357.964" ty="0.0" tz="9.891"
onloaded="calc_pos_from_hfov_yaw_pitch_roll(72, 175, -13, 5);"
/>

I´ll post the finished result later in the showcase when I´m done with the UI and logic.


jordi

Intermediate

Posts: 507

Location: Barcelona

Occupation: creating ideas & coding them

  • Send private message

3

Wednesday, May 20th 2020, 4:02pm

<hotspot name="spot_bnct"
prealign="true" tx="357.964" ty="0.0" tz="9.891"


Yes that's right you need to apply the values like this, and also make sure hotpsot is set to toorigin = world which is the default value
everpano.com step beyond 360