texture is faded after Object3D.setTransparent

Started by guillaume, December 23, 2011, 01:45:46 AM

Previous topic - Next topic

guillaume

please see the attachement. I want to let the icon's black background
be transparent,  and do a setTransparent(0) on the icon. the result
is the icon seems faded than before, how can I keep it as before ?
thanks.

[attachment deleted by admin]

EgonOlsen

Increase the transparency value...maybe to 20 or something and use the default blending mode (i.e. not additive). That should leave the black areas transparent and the icon more or less opaque.

guillaume

thanks. I have tried it. now the icon looks better.

guillaume

after setTransparent, my texture seems distorted. see the attachment.
after Object3D.setTransparencyMode(Object3D.TRANSPARENCY_MODE_DEFAULT);
       Object3D.setTransparency(20);  the upper right of the recyclebin looks dirty.
how can I make it look as the same as I view it in picture viewers ?  thanks

[attachment deleted by admin]

EgonOlsen

Which constructor are you using for your Textures? If they provide a proper alpha channel in the png-file, use the new Texture(<....>, true); variant and see if that helps.

guillaume

Yes. thank you. I just not  use the constructor with useAlpha parameter, now it looks ok. :)