www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: guillaume on December 23, 2011, 01:45:46 am

Title: texture is faded after Object3D.setTransparent
Post by: guillaume on December 23, 2011, 01:45:46 am
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]
Title: Re: texture is faded after Object3D.setTransparent
Post by: EgonOlsen on December 23, 2011, 09:51:30 am
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.
Title: Re: texture is faded after Object3D.setTransparent
Post by: guillaume on December 26, 2011, 01:38:29 am
thanks. I have tried it. now the icon looks better.
Title: Re: texture is faded after Object3D.setTransparent [ new problem ]
Post by: guillaume on December 29, 2011, 08:18:41 am
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]
Title: Re: texture is faded after Object3D.setTransparent
Post by: EgonOlsen on December 29, 2011, 02:14:41 pm
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.
Title: Re: texture is faded after Object3D.setTransparent
Post by: guillaume on December 30, 2011, 01:36:32 am
Yes. thank you. I just not  use the constructor with useAlpha parameter, now it looks ok. :)