Hi,

I have used OpenSceneGraph 2.2.x for quite some time and have now
upgraded to 2.8.2.

I found that picking shape Drawables has become very very unprecise.
This can be reproduced with the osgpick-example. The drawable is still
picked even if the mouse is miles away. This error did not occur with
the 2.2.x series, if that helps to find out where this behaviour might
come from.

I attach a sample osg-file that can be used with the 2.8.2. osgpick
example to reproduce the bug. It is a very long and thin cylinder, maybe
this strange shape makes the bug appear whereas more normal shaped
cylinders are picked correctly.

Regards,

Andreas
Group {
  name "TheGroup"
  nodeMask 0xffffffff
  cullingActive TRUE
  num_children 3
  Group {
    UniqueID Group_0
    name "P"
    nodeMask 0xffffffff
    cullingActive TRUE
    StateSet {
      UniqueID StateSet_1
      rendering_hint OPAQUE_BIN
      renderBinMode USE
      binNumber 0
      binName RenderBin
      GL_ALPHA_TEST ON
      GL_BLEND ON
      AlphaFunc {
        comparisonFunc GREATER
        referenceValue 0
      }
      ShadeModel {
        mode SMOOTH
      }
      LightModel {
        ambientIntensity 0.2 0.2 0.2 1
        colorControl SINGLE_COLOR
        localViewer FALSE
        twoSided TRUE
      }
    }
    num_children 3
    Geode {
      nodeMask 0xffffffff
      cullingActive TRUE
      num_drawables 1
      osgText::Text {
        UniqueID Text_2
        StateSet {
          UniqueID StateSet_3
          rendering_hint TRANSPARENT_BIN
          renderBinMode USE
          binNumber 10
          binName DepthSortedBin
        }
        supportsDisplayList FALSE
        useDisplayList FALSE
        useVertexBufferObjects FALSE
        fontResolution 80 80
        characterSize 0.6 1
        characterSizeMode OBJECT_COORDS
        alignment LEFT_BASE_LINE
        autoRotateToScreen TRUE
        layout LEFT_TO_RIGHT
        position 2.17262 -3.21246 5.21694
        drawMode 1
        text "P"
        font arial.ttf
        color 1 1 1 1
        backdropType OUTLINE
        backdropHorizontalOffset 0.07
        backdropVerticalOffset 0.07
        backdropColor 0 0 0 1
        backdropImplementation DEPTH_RANGE
        colorGradientMode SOLID
        colorGradientTopLeft 1 0 0 1
        colorGradientBottomLeft 0 1 0 1
        colorGradientBottomRight 0 0 1 1
        colorGradientTopRight 1 1 1 1
      }
    }
    Geode {
      UniqueID Geode_4
      nodeMask 0x0
      cullingActive TRUE
      num_drawables 1
      Geometry {
        UniqueID Geometry_5
        StateSet {
          rendering_hint DEFAULT_BIN
          renderBinMode INHERIT
          GL_LINE_STIPPLE ON
          LineStipple {
            factor 1
            pattern 0xf
          }
        }
        useDisplayList TRUE
        useVertexBufferObjects FALSE
        PrimitiveSets 1
        {
          DrawArrays LINES 0 2
        }
        VertexArray UniqueID Vec3Array_6 Vec3Array 2
        {
          2.17262 -3.21246 5.21694
          1.97262 -3.41246 5.01694
        }
        NormalBinding OVERALL
        NormalArray Vec3Array 1
        {
          0 -1 0
        }
        ColorBinding OVERALL
        ColorArray Vec4Array 1
        {
          0 0 0 1
        }
      }
    }
    Geode {
      UniqueID Geode_7
      nodeMask 0xffffffff
      cullingActive TRUE
      num_drawables 1
      ShapeDrawable {
        UniqueID ShapeDrawable_8
        Box {
          UniqueID Box_9
          Center 1.97262 -3.41246 5.01694
          HalfLengths 0.15 0.15 0.15
          Rotation 0 0 0 1
        }
        useDisplayList TRUE
        useVertexBufferObjects FALSE
        color 1 0 0 1
        TessellationHints {
          detailRatio 0.5
          createFaces TRUE FALSE
          createNormals TRUE
          createTextureCoords FALSE
          createParts TRUE TRUE TRUE
        }
      }
    }
  }
  Group {
    UniqueID Group_10
    name "P2"
    nodeMask 0xffffffff
    cullingActive TRUE
    StateSet {
      UniqueID StateSet_11
      rendering_hint OPAQUE_BIN
      renderBinMode USE
      binNumber 0
      binName RenderBin
      GL_ALPHA_TEST ON
      GL_BLEND ON
      AlphaFunc {
        comparisonFunc GREATER
        referenceValue 0
      }
      ShadeModel {
        mode SMOOTH
      }
      LightModel {
        ambientIntensity 0.2 0.2 0.2 1
        colorControl SINGLE_COLOR
        localViewer FALSE
        twoSided TRUE
      }
    }
    num_children 3
    Geode {
      nodeMask 0xffffffff
      cullingActive TRUE
      num_drawables 1
      osgText::Text {
        UniqueID Text_12
        Use StateSet_3
        supportsDisplayList FALSE
        useDisplayList FALSE
        useVertexBufferObjects FALSE
        fontResolution 80 80
        characterSize 0.6 1
        characterSizeMode OBJECT_COORDS
        alignment LEFT_BASE_LINE
        autoRotateToScreen TRUE
        layout LEFT_TO_RIGHT
        position -1.83053 1.468 2.07904
        drawMode 1
        text "P2"
        font arial.ttf
        color 1 1 1 1
        backdropType OUTLINE
        backdropHorizontalOffset 0.07
        backdropVerticalOffset 0.07
        backdropColor 0 0 0 1
        backdropImplementation DEPTH_RANGE
        colorGradientMode SOLID
        colorGradientTopLeft 1 0 0 1
        colorGradientBottomLeft 0 1 0 1
        colorGradientBottomRight 0 0 1 1
        colorGradientTopRight 1 1 1 1
      }
    }
    Geode {
      UniqueID Geode_13
      nodeMask 0x0
      cullingActive TRUE
      num_drawables 1
      Geometry {
        UniqueID Geometry_14
        StateSet {
          rendering_hint DEFAULT_BIN
          renderBinMode INHERIT
          GL_LINE_STIPPLE ON
          LineStipple {
            factor 1
            pattern 0xf
          }
        }
        useDisplayList TRUE
        useVertexBufferObjects FALSE
        PrimitiveSets 1
        {
          DrawArrays LINES 0 2
        }
        VertexArray UniqueID Vec3Array_15 Vec3Array 2
        {
          -1.83053 1.468 2.07904
          -2.03053 1.268 1.87904
        }
        NormalBinding OVERALL
        NormalArray Vec3Array 1
        {
          0 -1 0
        }
        ColorBinding OVERALL
        ColorArray Vec4Array 1
        {
          0 0 0 1
        }
      }
    }
    Geode {
      UniqueID Geode_16
      nodeMask 0xffffffff
      cullingActive TRUE
      num_drawables 1
      ShapeDrawable {
        UniqueID ShapeDrawable_17
        Box {
          UniqueID Box_18
          Center -2.03053 1.268 1.87904
          HalfLengths 0.15 0.15 0.15
          Rotation 0 0 0 1
        }
        useDisplayList TRUE
        useVertexBufferObjects FALSE
        color 1 0 0 1
        TessellationHints {
          detailRatio 0.5
          createFaces TRUE FALSE
          createNormals TRUE
          createTextureCoords FALSE
          createParts TRUE TRUE TRUE
        }
      }
    }
  }
  Group {
    UniqueID Group_19
    name "g"
    nodeMask 0xffffffff
    cullingActive TRUE
    StateSet {
      UniqueID StateSet_20
      rendering_hint OPAQUE_BIN
      renderBinMode USE
      binNumber 0
      binName RenderBin
      GL_CULL_FACE ON
      GL_ALPHA_TEST ON
      GL_BLEND ON
      AlphaFunc {
        comparisonFunc GREATER
        referenceValue 0
      }
      CullFace {
        mode BACK
      }
      ShadeModel {
        mode SMOOTH
      }
      LightModel {
        ambientIntensity 0.2 0.2 0.2 1
        colorControl SINGLE_COLOR
        localViewer FALSE
        twoSided TRUE
      }
    }
    num_children 3
    Geode {
      UniqueID Geode_21
      nodeMask 0xffffffff
      cullingActive TRUE
      StateSet {
        UniqueID StateSet_22
        rendering_hint DEFAULT_BIN
        renderBinMode INHERIT
        Material {
          UniqueID Material_23
          ColorMode OFF
          ambientColor 0.8 0.8 0.8 1
          diffuseColor 0.8 0.8 0.8 1
          specularColor 0.8 0.8 0.8 1
          emissionColor 0 0 0 1
          shininess 120
        }
      }
      num_drawables 1
      ShapeDrawable {
        UniqueID ShapeDrawable_24
        Cylinder {
          UniqueID Cylinder_25
          Center -0.0289545 -1.07223 3.44799
          Radius 0.05
          Height 100
          Rotation -0.64796 -0.554194 0 0.52251
        }
        useDisplayList TRUE
        useVertexBufferObjects FALSE
        color 0.8 0.8 0.8 1
        TessellationHints {
          detailRatio 1
          createFaces TRUE FALSE
          createNormals TRUE
          createTextureCoords FALSE
          createParts TRUE TRUE TRUE
        }
      }
    }
    Geode {
      nodeMask 0xffffffff
      cullingActive TRUE
      num_drawables 1
      osgText::Text {
        UniqueID Text_26
        Use StateSet_3
        supportsDisplayList FALSE
        useDisplayList FALSE
        useVertexBufferObjects FALSE
        fontResolution 80 80
        characterSize 0.6 1
        characterSizeMode OBJECT_COORDS
        alignment LEFT_BASE_LINE
        autoRotateToScreen TRUE
        layout LEFT_TO_RIGHT
        position -0.303567 -1.14052 3.24331
        drawMode 1
        text ""
        font arial.ttf
        color 1 1 1 1
        backdropType OUTLINE
        backdropHorizontalOffset 0.07
        backdropVerticalOffset 0.07
        backdropColor 0 0 0 1
        backdropImplementation DEPTH_RANGE
        colorGradientMode SOLID
        colorGradientTopLeft 1 0 0 1
        colorGradientBottomLeft 0 1 0 1
        colorGradientBottomRight 0 0 1 1
        colorGradientTopRight 1 1 1 1
      }
    }
    Geode {
      UniqueID Geode_27
      nodeMask 0x0
      cullingActive TRUE
      num_drawables 1
      Geometry {
        UniqueID Geometry_28
        StateSet {
          rendering_hint DEFAULT_BIN
          renderBinMode INHERIT
          GL_LINE_STIPPLE ON
          LineStipple {
            factor 1
            pattern 0xf
          }
        }
        useDisplayList TRUE
        useVertexBufferObjects FALSE
        PrimitiveSets 1
        {
          DrawArrays LINES 0 2
        }
        VertexArray UniqueID Vec3Array_29 Vec3Array 2
        {
          -0.303567 -1.14052 3.24331
          -0.140218 -0.933016 3.34459
        }
        NormalBinding OVERALL
        NormalArray Vec3Array 1
        {
          0 -1 0
        }
        ColorBinding OVERALL
        ColorArray Vec4Array 1
        {
          0 0 0 1
        }
      }
    }
  }
}
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to