RGB Depth Map with Multires Panorama Problem

  • Hello,

    I recently encountered problems using RGB depth maps with multi-res panos. The depth map loads but when tracking the cursor using the example measure code, it doesn't map well to surfaces and is sometimes hidden when it shouldn't. The depth map works as expected when used with a spherical version of the pano; I've worked worked around the issue by quietly switch to a spherical pano for measurements. This works but isn't a great solution so I'm revisiting.

    I created a simple tour with two buttons - one to load multi-res and one to load sphere version of the same pano, both using the same depth map.

    If I load multires first, I see depthmap anomalies. If I load spherical (first or second), the depthmap behaviour is as expected. If I load multires after the spherical, the depthmap is working!

    On discovering that the multires works as expected following the sphere image load, I added a third button to load the sphere pano and immediately load multires as a loaddone action - that doesn't work either.

    The test code is:

    <layer name="multires" keep="true" style="button" align="bottom" x="-110" y="60" width="100" html="Multi-Res" onclick="loadmultires();"/>
    <layer name="spherethenmultires" keep="true" style="button" align="bottom" x="0" y="60" width="100" html="Sphere->MR" onclick="loadspherethenmultires();"/>
    <layer name="sphere" keep="true" style="button" align="bottom" x="110" y="60" width="100" html="Sphere" onclick="loadsphere();"/>

    <display depthrange="0.1,500000" />

    <scene name="multires" title="PANONAME">
    <preview type="CUBESTRIP" url="PANONAME/preview.jpg" striporder="LFRBUD" />
    <image prealign="0|57.8|0" ox="39281.2" oy="-6241.2" oz="5001.7">
    <cube url="PANONAME/%s/l%0l/%00v/%00h.jpg" multires="512,768,1280,2560,5120" />
    <depthmap url="PANONAME/depthMap.png" hittest="true" mapmode="1" offset="0" scale="10" encoding="rgb24" />
    </image>
    <view tx="39281.2" ty="-6241.2" tz="5001.7" />
    </scene>

    <scene name="sphere" title="PANONAME">
    <preview type="CUBESTRIP" url="PANONAME/preview.jpg" striporder="LFRBUD" />
    <image prealign="0|57.8|0" ox="39281.2" oy="-6241.2" oz="5001.7">
    <sphere url="PANONAME/pano.jpg" />
    <depthmap url="PANONAME/depthMap.png" hittest="true" mapmode="1" offset="0" scale="10" encoding="rgb24" />
    </image>
    <view tx="39281.2" ty="-6241.2" tz="5001.7" />
    </scene>

    <action name="loadmultires">
    loadscene(multires,null,MERGE,ZOOMBLEND(1,2,easeInOutSine));
    depthmap_measure3d_start(1);
    </action>

    <action name="loadspherethenmultires">
    loadscene(sphere,null,MERGE,ZOOMBLEND(1,2,easeInOutSine),loadscene(multires,null,MERGE,ZOOMBLEND(1,2,easeInOutSine)));
    depthmap_measure3d_start(1);
    </action>

    <action name="loadsphere">
    loadscene(sphere,null,MERGE,ZOOMBLEND(1,2,easeInOutSine));
    depthmap_measure3d_start(1);
    </action>

    Any suggestions?

  • Enabling wireframe just shows the pano cube/sphere depending on which image is shown. Should I see the depth map here?

    I can't share the example I'm working on but will find a test case that I can share.

  • We can continue to use sphere for measuring and double up on the images. The multi-res is slightly higher resolution so better for seeing detail.

    I'm going to try toggling the depthmap to see if that fixes it.

Participate now!

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