deph map render mode

  • trying the new deph map render mode ;)
    while dephmap mode is sharp, oblique surface are wavy (sorry for my french..)
    no problem with wave in 3dmodel rendering mode, but image is much softer...

    here is an exemple

    is the problem with dephmap mode because my 3dmodel is not accurate enough ?
    thx !

  • When you are using

    Code
    <display depthmaprendermode="3dmodel" />


    Then only the parts that has geometry get painted

    But you can solve that by adding

    Code
    <depthmap background="pano"


    Kind regards


    Thanx for the tip !
    But that was not the point of my question, in dephmap mode image is much sharper but some surfaces are wavy & in 3dmodel model there is no waves but image is much softer.

  • Hi,

    that's normal, but it's possible to fine-tune both cases.

    Both modes have their pro and cons and both are mainly caused a limitations of the currently available browser APIs.

    I will try to explain how both modes are working:

    rendermode=3dmodel

    • When using rendermode=3dmodel the pano image (single-res and multires) will be internally loaded into a 'cubemap' texture.
    • That's technically a single-texture that represents all 6 cube-images.
    • Using such texture is necessary to effectively being able to texture the 3d-model.
    • The problem: creating large cubemap texures is slow in the browsers. For 'security-reasons' the browser is fully clearing the memory of textures before using them and the larger the texture, the longer that can take. E.g. creating a 6x4096x4049 cubemap texture can take up to 500ms on slower devices. During that time the browser is fully blocked. And that blocking can be very disruptive when smooth transitions between panos should be used.
    • Therefore the size/resolution of cubemap texture is limited by default.
    • That limit can be set by the image.cubemapsize setting (where I currently see that I unfortunately forgot to add that setting to the documentation, sorry, no intention, will be added with the next release).
    • For a higher limit try adding cubemapsize="4096" to the <image> element of the pano (or directly use the max size of your pano image) e.g.
      Code
      <image ... cubemapsize="4096">
    • Due browser limitations any other solution would require a more complex pre-processing of the 3d-model. The model would need to get split/clipped into smaller parts, one part for each source image/tile. Such processing is slow and can take up to a few seconds and therefore can't be done during viewing and would need to be pre-processed by some tools. Such will be provided maybe in future versions.

    rendermode=depthmap

    • Here the 3d-model is used to generate an internal depthmap-image.
    • Using a depthmap-image is more flexible because when having smaller tiles it is easily possible to know where to get the depth information for that tile (for a 3d-model a pre-processing as explained above would necessary)
    • Therefore using rendermode=depthmap allows using normal multires-tiles and doesn't have any size limits.
    • Using small multires-tiles allows also to use mipmapping for avoiding aliasing artifacts.
    • But an image (the depthmap-image) can't be as accurate as a 3d-mode, values between pixels need to be interpolated, and that can introduce artifacts like the waves in your image.
    • Currently the resolution of the internal depthmap is hardcoded, but it might be adjustable in future versions. But too high resolutions for the depthmap would introduce the same problems with the blocked browser for the texture creation as in rendermode=depthmap mode.
    • A setting to fine-tune the rendering anyway would be the display.surfacesubdiv setting, but it depends if the depthmap-resolution or the currently used subdivision is causing the artifacts.


    In short:

    3dmodel mode
    + more accurate
    - limited pano resolution

    depthmap mode
    + no pano resolution limit
    + mipmapping
    - less accurate

    Best regards,
    Klaus

  • It depends on the usage and aims - when you have a tour with many transitions (especially when moving during the transitions/blending) and these should be as smooth as possible, I would recommend using the defaults.

    Otherwise you can try increasing the cubemapsize as high until the device crashes ;-).
    But on many mobile devices the size would be limited to 4096 anyway (the max. supported texture size).

Participate now!

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