Using mobile/tablet images with multiresolution

  • The default multiresolution config file generates also mobile images.
    But how can you use them.

    I really want to be able to limit iPad to use the mobile images but I can not find a way.

    Klaus told me back in nov that I could use this.
    ----------------------------------

    e.g. to avoid multires on iOS, you can filter-out the <level> tags and provide normal <mobile> tags this way:

    Source code

    <image ...>
    <level ... devices="!ios">
    ...
    </level>
    ...
    <mobile devices="ios">
    <cube ... />
    </mobile>
    </image>
    -----------------------------------

    But that just makes ipad use the preview image.

    I want to easy be able to make a small iPad version just by deleting the tiles and force it to use the mobile images.
    A tour with sound and multiresolution can easy end up at 600mb download .

    Do I really need to make a special version with 1.16 for this.

  • Hi,

    the 1.17 supports multires - that means when multires is enabled in the <image> element, then the viewer is looking for multires <levels> elements.

    To use the <mobile> images on iOS in this case, the multires setting would need to be disabled - this can be done by setting it to false AFTER the first <image> declaration and using a devices="iOS" setting.

    e.g.

    Code
    <!-- the normal image element -->
    <image ... multires="true">
      ...
    </image>
    
    
    <!-- here overwrite the multires setting from above, but only for iOS -->
    <image multires="false" devices="ios" />

    Best regards,
    Klaus

  • Ok thanks. I already tried that but if I understand you right you have to also use the devices="!ios"> settings.

    What about the standard devices="iPad" and devices="desktop"
    Should they not work there same way. I tried that together with the multires="false" but it did not work.

    I will give it all anew trial to see if I done something wrong.

    Hans

  • Hi,

    no, the usage of devices="!iOS" would be not necessary in this case.

    The parsing of the xml settings into the real internal values works from top to down in the xml file. That means when a setting was first set in the xml somewhere on the top, and then a few lines set again, the later setting will overwrite the first one and only the value of the later setting will reach the viewer.

    In this case, first the 'image.multires' setting will be set to true, and then later, and only for iOS, to 'false'. So the final setting will be 'false' for iOS. And when multires is false, the viewer will first look for image.tablet or image.mobile images.

    Best regards,
    Klaus

  • Klaus,

    I am seeing the same thing happening here:

    http://exophrenic.com/vr/action/Wild…e_Backburn.html


    Only the preview image is being used on iPhone here. If I use devices="iOS" then also the tablet is only seeing/using a preview image. Also that preview image is as big as the desktop image and zoomable but just very fuzzy. Using mobile+!tablet so that only phones should use the <mobile> image is not working (same with any device setting here)...

    ALSO is seems that using progressive="false" on tablet causes some tiles not to resolve after zooming in and then out a bit.

    How can we use a <mobile> image in 1.17 ??????


    <image type="CUBE" multires="true" tilesize="512" progressive="true" >
    <level tiledimagewidth="5169" tiledimageheight="5169">
    <cube url="Millard_GourdCircle_Backburn.tiles/mres_%s/l4/%v/l4_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="2560" tiledimageheight="2560">
    <cube url="Millard_GourdCircle_Backburn.tiles/mres_%s/l3/%v/l3_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="1280" tiledimageheight="1280">
    <cube url="Millard_GourdCircle_Backburn.tiles/mres_%s/l2/%v/l2_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="640" tiledimageheight="640">
    <cube url="Millard_GourdCircle_Backburn.tiles/mres_%s/l1/%v/l1_%s_%v_%h.jpg" />
    </level>
    </image>

    <image type="CUBE" multires="false" progressive="false" devices="mobile+!tablet" >
    <mobile>
    <cube url="Millard_GourdCircle_Backburn.tiles/mobile_%s.jpg" />
    </mobile>
    </image>


    thanks,
    John

  • Hi,

    when <level> elements are defined inside the <image>, the viewer thinks it's a multires pano.

    To make it right and avoid mixing settings, add separate devices settings to both <image> elements to clearly define settings for each device - first use - devices="tablet|desktop" - to provide the multires pano for tablet and desktop devices, and then use - devices="mobile" - to provide the single mobile images for mobile devices:

    (the multires=false and the <mobile> setting don't need to be used in this case).

    Best regards,
    Klaus

  • Dear Klaus,

    I appreciate the response and it makes sense but is still not working for me. Should 1.17 be working this way on iOS6 as well?
    I put in exactly as you said, and what happens is that the preview image is still used, but only flashes and goes black. The mobile cube sources are available and reuploaded just in case, but the preview image is still being used. Actually, the preview image flashes and stage goes black, and only on click does the preview image show up again. Then screen goes black. Restarted iPhone to test. Same behavior. I can't find any code solution that will force iPhone 4, iOS6 to use mobile image. My friend tested on his iPhone 5/iOS7.1 and it's fuzzy, just using the preview image.

    Also tried with multires=false and with removing preview from iPhone via device tag and tried with and without <mobile> tag and tried with and without cube type.

    Also, according to what you wrote above for Hans, the <image> element should be built top down anyways and multires="false" should have set image.multires = false and should have done the trick and prevent viewer from looking for <level> tags, but now you say we need device setting on first <image> element -- so if that is so, then why is this still not working for me please?

    Do we need a separate <image> element for non iOS7 viewers like iOS6?

    Could anything in the <view> or other nodes be interfering? (Just in case it was still a black tiles problem I set the hlookat to 1 so it is non-90º and took decimal off to vlookatmaxes). I've literally tested 20 different versions of this and can't find a solution.


    <view hlookat="0" vlookat="0" fovtype="MFOV" fov="95" maxpixelzoom="1.0" fovmax="125" vlookatmin="-31.4" vlookatmax="31.5" limitview="range" devices="desktop" />
    <view hlookat="1" vlookat="1" fovtype="MFOV" fov="95" maxpixelzoom="1.0" fovmax="115" vlookatmin="-31.4" vlookatmax="31.4" limitview="range" devices="tablet" />
    <view hlookat="1" vlookat="1" fovtype="MFOV" fov="95" maxpixelzoom="0.7" fovmax="105" vlookatmin="-31" vlookatmax="31" limitview="range" devices="mobile" />

    <preview url="Millard_GourdCircle_Backburn.tiles/preview.jpg" />

    <image type="CUBE" multires="true" tilesize="512" progressive="true" devices="tablet|desktop">
    <level tiledimagewidth="5169" tiledimageheight="5169">
    <cube url="Millard_GourdCircle_Backburn.tiles/mres_%s/l4/%v/l4_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="2560" tiledimageheight="2560">
    <cube url="Millard_GourdCircle_Backburn.tiles/mres_%s/l3/%v/l3_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="1280" tiledimageheight="1280">
    <cube url="Millard_GourdCircle_Backburn.tiles/mres_%s/l2/%v/l2_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="640" tiledimageheight="640">
    <cube url="Millard_GourdCircle_Backburn.tiles/mres_%s/l1/%v/l1_%s_%v_%h.jpg" />
    </level>
    </image>

    <image devices="mobile">
    <cube url="Millard_GourdCircle_Backburn.tiles/mobile_%s.jpg" />
    </image>


    Original does not flash to black but still uses preview:
    http://exophrenic.com/vr/action/Wild…e_Backburn.html

    New version uses preview and flashes to black and behaves oddly:
    http://exophrenic.com/vr/action/Wild…_Backburn2.html


    Could there be any other issue you can think of?

    thanks for your help,
    John

  • Hi,

    Should 1.17 be working this way on iOS6 as well?

    Yes, the iOS version doesn't matter!


    The reason why your example isn't working, are these invalid settings from your xml here (marked red):

    Both settings are invalid!

    The hardwarelimit="" will be parsed as integer value, which results in - hardwarelimit=0 - and so the maximum possible size for a cubeside will be set to 0 pixel, which doesn't makes sense and results in the 'black' pano.

    Just remove these wrong settings and everything will work.

    Best regards,
    Klaus

  • Klaus,

    Thank you so much! Sorry I didn't think of this. I have seen a lot of programmers leave some settings blank with ="" and I thought they were treated as place holders and didn't know they resolved. A nasty habit to pick up.

    usedesktopimages=""
    hardwarelimit=""

    Other readers, don't make the same mistakes!!

    thanks,
    John

Participate now!

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