Robert,

Thank you for your answer. I've checked what you pointed. But my exported model:
- Has no coulour array (just a material)
- Has 196 vertex and 196 normals (so probably no missing normals)
- And has no transparency

I really don't understand. Any idea?

Note that I load the model using the cache (ReaderWriter::Options::CACHE_ALL) 
and that I duplicate it (in order to modify it without affecting the cached 
object) by using:
  myGroup = new osg::Group(*loadedCachedModel, osg::CopyOp::DEEP_COPY_OBJECTS | 
osg::CopyOp::DEEP_COPY_NODES);
I also tried DEEP_COPY_AL but that has no effect. Anyway, I'm not sure it is 
related to my problem...

I seen that on top of the geodes, there are MatrixTransforms with a stange 
"StateSet { 0xba1 ON }" line (Exactly the same in each MatrixTransform), but 
removing it didn't change anything.


If you want, the geode data looks like:
Geode {
  UniqueID "Corps_geode"
  DataVariance DYNAMIC
  name "Corps_geode"
  cullingActive TRUE
  num_drawables 1
  Geometry {
    StateSet {
      UniqueID Corps_stateset
      DataVariance STATIC
      rendering_hint OPAQUE_BIN
      GL_BLEND OFF
      Material {
        DataVariance STATIC
        ColorMode OFF
        diffuseColor 0.300000011921 0.5 0.0 1.0
        specularColor 1.0 1.0 1.0 1
        emissionColor 0.111620302463 0.186033830047 0.0 1
        shininess 24.5960784314
      }
    }
    VertexArray 196 {...}
    NormalBinding PER_VERTEX
    NormalArray 196 {...}
    PrimitiveSets 2 {...}
  }
}


-- 
Sukender


Le Thu, 06 Nov 2008 10:26:49 +0100, Robert Osfield <[EMAIL PROTECTED]> a écrit:

> Hi Sukender,
>
> My guess is that the problem is not related to the bin management,
> rather missing vertex colour or vertex normals on some of the
> geometry.  If it's not this then perhaps you have transparency issues.
>
> Robert.
>
> On Thu, Nov 6, 2008 at 12:34 AM, Sukender <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I found a strange behavior, and I would like someone to explain, if possible.
>> In an ".osg" model (exported from Blender) the "rendering_hint OPAQUE_BIN" 
>> line in some StateSets causes my model to be lit in a funky way. It is 
>> sometimes correctly lit, sometimes not (looks like diffuse got away). In my 
>> app, I have:
>> - a pStateset->setRenderBinDetails(11,"RenderBin") used to render HUD 
>> components,
>> - and a pStateset->setRenderBinDetails(-1, "RenderBin") elsewhere for my sky 
>> sphere.
>>
>> But if I change "OPAQUE_BIN" to "DEFAULT_BIN", then my model is correctly 
>> lit...
>> Can someone explains what happened?
>> Thanks.
>>
>> Sincerely,
>>
>> --
>> Sukender

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to