From: Dirk Reiners <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: [Opensg-users] MakeTransparentGraphOp
Date: Fri, 15 Jun 2007 00:22:00 -0500


        Hi Thomas,

Thomas Weberndorfer wrote:
>>
>> Thomas Weberndorfer wrote:
>>> Hello,
>>> I have to make parts of a scenegraph transparent and use this code:
>>>
>>> MakeTransparentGraphOp *op = new MakeTransparentGraphOp;
>>> std::ostringstream str;
>>> str << "transparency=" << alpha;
>>> op->setParams ( str.str().c_str() );
>>> op->traverse ( root );
>>> delete op;
>>>
>>> But this results always in semi-transparent objects with an alpha-value
>> of
>>> 0.5f. I tested this code with alpha-values form 1 to 0, but i get always
>> the
>>> same output.

Is that problem still current or did you find the problem?

        Dirk

Hello,

Yes, the problem still exists. I want to change the transparency of a loaded model. For testing, I use the tie.wrl file. This is the method for changing the transparency:

void setTransparency ( float alpha )
{
   MakeTransparentGraphOp *op = new MakeTransparentGraphOp;
   std::ostringstream str;
   str << "transparency=" << alpha;
   op->setParams ( str.str() );
   // the root node contains a Group-core and has the model attached
   op->traverse ( root );
   delete op;
}

But this method seems to ignore the alpha-parameter, because the result is always the same. (Even alpha = 0 and alpha = 1 produces the same result. I attached the results.)


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

_________________________________________________________________
Sensationelle Konzerte auf allen Kontinenten - Musik für unsere Mutter Erde. http://liveearthsos.msn.com/Hub.aspx?mkt=de-at

<<attachment: LoadedModel.png>>

<<attachment: LoadedModelAlphaIs0.png>>

<<attachment: LoadedModelAlphaIs1.png>>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to