www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: rtSJ on May 23, 2014, 09:49:25 am

Title: Strange transparency
Post by: rtSJ on May 23, 2014, 09:49:25 am
Hello everyone !

I'm coming here today because I have a problem about transparency on my 3D object. I put a transparent texture on one object 3D, and, here's my problem, nothing behinde if display. I have a CameraView on the background and I can see it. But there's is object between my transparent object and my background...

I must enable any Z-order renderer of anything like that ?
Title: Re: Strange transparency
Post by: EgonOlsen on May 23, 2014, 02:17:46 pm
That's because the alpha values will be written into the frame buffer as well making everything behind it transparent. That's an issue only if the frame buffer supports alpha, i.e. has transparency enabled. We had this topic before but no satisfying solution. I have one last idea that might help here and i'll upload a version that includes it later today for you to try.
Title: Re: Strange transparency
Post by: EgonOlsen on May 23, 2014, 05:27:28 pm
Ok, here you go: jpct.de/download/beta/jpct_ae.jar (http://jpct.de/download/beta/jpct_ae.jar)

It has a new method in Object3D: setAlphaWrites(<boolean>); Try to set it to false on the objects in question and see if that helps.
Title: Re: Strange transparency
Post by: rtSJ on May 26, 2014, 10:23:03 am
It's works fine ! Thank you for your work  ;D

Just a little more question, can I know if a texture loaded directly on the 3D model have an alpha value ? Because I know how to check when I load a new texture (With the bitmap image), but when it's load by the librairy, can I check if it have an alpha value ?