is it possible to use a 3d model only for hotspot coordinates but with a cube projection for navigation?

  • Hello!

    I am a bit new to krpano, coming from other softwares and really enjoying the possibilities so far.

    I have a question that might be a bit basic, I've created an xml with some panoramas and I've also created a .stl 3d models (with cam projections for each pano view using the awesome panocamadder plugin).

    The 3d model will need some work to get something clean and detailed for a dollhouse with baked textures, that'll come later, but for now I would like to use the simple layout 3d model for more accurate hotspot positioning.

    Reason being. I have a lot of hotspots and I want to keep position consistency between scenes so I would prefer to use xyz coordinates over atv, ath but navigate using the cube projection.

    If this is possible? how would I need to change this:

    Code
    <hotspot name="HS_test_angle" keep="true" style="style"
        distorted="true" depth="0" depthbuffer="true" rotationorder="xzy" enabled="true" capture="false"
        tx="-56.67" ty="-10.0" tz="-944.13"
        rx="-90.0" ry="-0.0" rz="-0.0"
        alpha="1.0"
        onclick="loadscene(testscene);"
        />
    Code
    <image style="test_style">
                <cube url="panos/testspace.tiles/%s/l%l/%v/l%l_%s_%v_%h.jpg" multires="512,640,1280,2624" />
                <depthmap url="models/testspace_DEPTH.stl" enabled="true" rendermode="3dmodel" scale="100"/>
    </image>

    would the example below work to have the model for hotspot 3d coordinates but scene viewing and navigation with cube projection?:

    Code
    <image style="test_style">
    			<cube url="panos/testspace.tiles/%s/l%l/%v/l%l_%s_%v_%h.jpg" multires="512,640,1280,2624" enabled="true"/>
     <depthmap url="models/testspace_DEPTH.stl" enabled="false" rendermode="3dmodel" scale="100"/>
    </image>>

    EDIT: seems that when I set depthmap enabled="false", rendermode="3dmodel" the hotspots are in the right position in 3d space and the cube projection renders instead of the 3dmodel as I want to. (only need the model for hotspot positions atm not for navigation)

    but when I click a hotspot with onclick="loadscene(testscene_angle2);"/> the scene opens in 3dmodel view instead of cube projection although it is set to depthmap enabled "false" but rendermode="3dmodel" as the previous scene.

    Let me know if you have any thoughts about this please.

    thanks

    Edited 4 times, last by mmarchena (April 2, 2024 at 11:34 PM).

  • hello Klaus,

    Thanks for your answer, yes I found out while doing tests but forgot to update this thread. I got the cube projection working with hotspots positioned in tx/ty/tz space using depthmap "false". I thought they were dependent on the 3d model originally.

  • I have an additional question if you don't mind. I am generating the xml dynamically from a cms I am building and every time I create a new hotspot the xml for the tour reloads automatically and it is a bit annoying visually with the cms panel windows on top. Is it possible to stop the xml to automatically reload at least while I am creating given set of hotspots and update xml on browser reload or a reload button with js?

  • no I meant depthmap false but good to know about depthbuffer as well, thanks.

    Basically I positioned some hotspots in 3d space using panocamadder and brought the coords tx/ty/tz and the stl to krpano. I didnt know the hotspot positions in 3d space were independent from the 3d model or pano if they were already generated in 3d with panocamadder.

    so I have example:

    But if I am using only cube projection for the time being I could just remove <depthmap all together from the scene given that the coords are already in tx,ty,tz for the hotspot correct? I tried removing depthmap for test and hotspots were still in place in cube proj, so I think I understand a bit better. If I need depthmap or 3d model I can just add it back to the scene.

  • you can add hotspots dinamically

    addhotspot[name] i recall

    you do not need to change all the xml all the time.

    just ad a js action to invoke some webservice of yours, parse and call some krpano action with atv, ath etc parameters

    I have an additional question if you don't mind. I am generating the xml dynamically from a cms I am building and every time I create a new hotspot the xml for the tour reloads automatically and it is a bit annoying visually with the cms panel windows on top. Is it possible to stop the xml to automatically reload at least while I am creating given set of hotspots and update xml on browser reload or a reload button with js?

  • Thanks, sorry I didn't answer before! I am adding hotspots through a cms I am building for a project and the cms was reloading the tour page for every hotspot submit to db. Thought it was krpano doing so. I did change a setting in the js to not reload the page automatically (because adding many hotspots I got a jump on the window reloading panos etc everytime I created a hotspot and was a bit annoying) but now it works I can refresh if I need to only.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!