Author Topic: Strange transparency  (Read 699 times)

Offline rtSJ

  • byte
  • *
  • Posts: 21
    • View Profile
Strange transparency
« 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 ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Strange transparency
« Reply #1 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Strange transparency
« Reply #2 on: May 23, 2014, 05:27:28 pm »
Ok, here you go: 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.

Offline rtSJ

  • byte
  • *
  • Posts: 21
    • View Profile
Re: Strange transparency
« Reply #3 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 ?
« Last Edit: May 26, 2014, 10:52:04 am by rtSJ »