Hello Alexandra,
Alexandra Wolyniec wrote:
> Hello!
> Here are the screenshots expressing my problem.
> I hope that helps now.
yes, the images are very helpful, thank you.
>> An alpha of 0.0 means fully translucent, so if you apply that to
>> everything, I'd expect your whole scene to disappear.
>
> Alpha of 0.0 means normaly that the scene is not at all translucent.
> At 1.0 it disappears and in my case, really everything disappears, so
> there's no problem with this value.
>
>> Do you mean they disappear independent of what alpha value you use for
>> the graph op or only when using alpha = 0.0 ?
>
> Yes, exactly.
hm, strange. The MakeTransparentGraphOp does two unusual things when it
encounters a SimpleMaterial: it adds a chunk to enable back face culling
and turns off glColorMaterial.
Can you check what type your materials have, e.g. running this function
over the whole scene should print all the material types (untested though):
Action::ResultE traventer(NodePtr& node)
{
NodeCorePtr core = node->getCore();
MaterialDrawablePtr matDraw = MaterialDrawablePtr::dcast(core);
if(matDraw != NullFC)
{
std::cout << "MaterialDrawable with Material: " <<
matDraw->getMaterial()->getType().getCName() << "\n";
}
MaterialGroupPtr matGrp = MaterialGroupPtr::dcast(core);
if(matGrp != NullFC)
{
std::cout << "MaterialGroup with Material: " <<
matGrp->getMaterial()->getType().getCName() << "\n";
}
return Action::Continue;
}
traverse(root,
osgTypedFunctionFunctor1CPtrRef<
Action::ResultE,
NodePtr >(traventer));
where root is of course the root of your scene.
Thanks,
Carsten
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users