Hi Robert,
I probably have removed a bit too much in trying to reduce the size of the osg file. It does not change anything if I add a material to the first (white square) and a color to the green one with ColorMode DIFFUSE. The issue described remains the same. (I attached the osg file with materials on all Geometries)

 Uwe

One of the Geometries doesn't have a colour array or a osg::Material
associated with it so it'll be inheriting its state in an adhoc way
from the other geometries.

The solution is to add a colour array entry to the osg::Geometry or
assign it a material.


Robert.

On 7/17/06, Uwe Woessner <[EMAIL PROTECTED]> wrote:
Hello,

I had a strange issue in my application, some of the Inventor Objects I
was loading disappeared from time to time. I tracked down the issue to a
little osg file which reproduces the issue in osgviewer. (see attached
testAlpha.osg)
The osg file contains three squares, a white one, a red one and a green
one. As soon as you move the geometry up so that the white square leaves
the viewing frustum, the green square disappears.
I don´t have this issue if I don´t turn of AlphaTest on the red square
or if I set ColorMode to AMBIENT_AND_DIFFUSE on the green square.
I tried out different osg versions with not much success.
But then I tried it out on my windows machine and I don´t have this
issue. So I assume this is a driver bug.

OpenGL renderer string: Quadro FX 4500/PCI/SSE2
OpenGL version string: 2.0.2 NVIDIA 87.62

My current workaround is to disable AlphaTest in the global StateSet (I
don´t really need it but it seems to be enabled by default) But I would
like to know whether this is a known issue, whether I can ask NVIDIA to
fix it our whether it could also be an osg bug.
Any thoughts?

  Uwe

--

            \\\|/// *HLRS, High Performance Computing Center Stuttgart*
  _I_       ( o o )                *Visualization/VR*             _I_
([EMAIL 
PROTECTED])--oo0O--(_)--O0oo------------------------------------------([EMAIL 
PROTECTED])
  | |    Uwe Woessner             [EMAIL PROTECTED]                | |
  | |       .ooo0       http://www.hlrs.de/people/woessner/       | |
  |_|       (   )  Oooo. Phone: +49-711-6856-5790 or ...-5970     |_|
([EMAIL PROTECTED])-------\ (---(   
)-----------------------------------------([EMAIL PROTECTED])
   I          \_)   ) /                                            I
                   (_/


Group {
   UniqueID Group_0
   DataVariance DYNAMIC
   name "VR_RENDERER_SCENE_NODE"
   nodeMask 0xffffffff
   cullingActive TRUE
   StateSet {
      Material {
         ambientColor 0.2 0.2 0.2 1
         diffuseColor 1 1 1 1
         specularColor 1 1 1 1
         emissionColor 0 0 0 1
         shininess 16
      }
   }
   num_children 3
   Geode {
      num_drawables 1
      Geometry {
         PrimitiveSets 1
         {
            DrawArrays QUADS 0 4
         }
         VertexArray UniqueID Vec3Array_17 Vec3Array 4
         {
            0 0 100
            50 0 100
            50 0 150
            0 0 150
         }
         NormalBinding OVERALL
         NormalArray UniqueID Vec3Array_18 Vec3Array 1
         {
            0 -1 0
         }
      }
   }
   Geode {
      StateSet {
         UniqueID StateSet_13
         GL_ALPHA_TEST OFF
         Material {
            ambientColor 0.2 0.2 0.2 1
            diffuseColor 1 0 0 1
            specularColor 1 1 1 1
            emissionColor 0 0 0 1
            shininess 16
         }
      }
      num_drawables 1
      Geometry {
         PrimitiveSets 1
         {
            DrawArrays QUADS 0 4
         }
         VertexArray UniqueID Vec3Array_17 Vec3Array 4
         {
            0 0 0
            50 0 0
            50 0 50
            0 0 50
         }
         NormalBinding OVERALL
         NormalArray UniqueID Vec3Array_18 Vec3Array 1
         {
            0 -1 0
         }
      }
   }
   Geode {
      cullingActive TRUE
      num_drawables 1
      Geometry {
         StateSet {
            Material {
               ColorMode DIFFUSE
               ambientColor 0 0 0 1
               diffuseColor 0  1 0 1
               specularColor 0.2 0.2 0.2 1
               emissionColor 0 0 0 1
               shininess 16
            }
         }
         PrimitiveSets 1
         {
            DrawArrays QUADS 0 4
         }
         VertexArray UniqueID Vec3Array_17 Vec3Array 4
         {
            100 0 0
            150 0 0
            150 0 50
            100 0 50
         }
         NormalBinding OVERALL
         NormalArray UniqueID Vec3Array_18 Vec3Array 1
         {
            0 -1 0
         }
      }
   }
}


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



--

           \\\|/// *HLRS, High Performance Computing Center Stuttgart*
 _I_       ( o o )                *Visualization/VR*             _I_
([EMAIL 
PROTECTED])--oo0O--(_)--O0oo------------------------------------------([EMAIL 
PROTECTED])
 | |    Uwe Woessner             [EMAIL PROTECTED]                | |
 | |       .ooo0       http://www.hlrs.de/people/woessner/       | |
 |_|       (   )  Oooo. Phone: +49-711-6856-5790 or ...-5970     |_|
([EMAIL PROTECTED])-------\ (---(   
)-----------------------------------------([EMAIL PROTECTED])
  I          \_)   ) /                                            I
                  (_/
Group {
   UniqueID Group_0
   DataVariance DYNAMIC
   name "VR_RENDERER_SCENE_NODE"
   nodeMask 0xffffffff
   cullingActive TRUE
   StateSet {
      Material {
         ambientColor 0.2 0.2 0.2 1
         diffuseColor 1 1 1 1
         specularColor 1 1 1 1
         emissionColor 0 0 0 1
         shininess 16
      }
   }
   num_children 3
   Geode {
      num_drawables 1
      Geometry {
   StateSet {
      Material {
         ambientColor 0.2 0.2 0.2 1
         diffuseColor 1 1 1 1
         specularColor 1 1 1 1
         emissionColor 0 0 0 1
         shininess 16
      }
   }
         PrimitiveSets 1
         {
            DrawArrays QUADS 0 4
         }
         VertexArray UniqueID Vec3Array_17 Vec3Array 4
         {
            0 0 100
            50 0 100
            50 0 150
            0 0 150
         }
         NormalBinding OVERALL
         NormalArray UniqueID Vec3Array_18 Vec3Array 1
         {
            0 -1 0
         }
      }
   }
   Geode {
      num_drawables 1
      Geometry {
   StateSet {
      GL_ALPHA_TEST OFF
      Material {
         ambientColor 0.2 0.2 0.2 1
         diffuseColor 1 0 0 1
         specularColor 1 0 0 1
         emissionColor 0 0 0 1
         shininess 16
      }
   }
         PrimitiveSets 1
         {
            DrawArrays QUADS 0 4
         }
         VertexArray UniqueID Vec3Array_17 Vec3Array 4
         {
            0 0 0
            50 0 0
            50 0 50
            0 0 50
         }
         NormalBinding OVERALL
         NormalArray UniqueID Vec3Array_18 Vec3Array 1
         {
            0 -1 0
         }
      }
   }
   Geode {
      cullingActive TRUE
      num_drawables 1
      Geometry {
         StateSet {
            Material {
               ColorMode DIFFUSE
               ambientColor 0 0 0 1
               diffuseColor 0  1 0 1
               specularColor 0.2 0.2 0.2 1
               emissionColor 0 0 0 1
               shininess 16
            }
         }
         PrimitiveSets 1
         {
            DrawArrays QUADS 0 4
         }
         VertexArray UniqueID Vec3Array_17 Vec3Array 4
         {
            100 0 0
            150 0 0
            150 0 50
            100 0 50
         }
         NormalBinding OVERALL
         NormalArray UniqueID Vec3Array_18 Vec3Array 1
         {
            0 -1 0
         }
         ColorBinding OVERALL
         ColorArray Vec4Array 1
         {
                  0 1 0 1
         }

      }
   }
}
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to