Author Topic: Object3D Transparency setting  (Read 2958 times)

Offline hayden621

  • byte
  • *
  • Posts: 20
    • View Profile
Object3D Transparency setting
« on: May 23, 2011, 10:18:00 am »
Hi, I am trying to a fade in effect by setting the transparency of an Object3D from 255 to 0 within onDrawFrame() method. However, I find the transparency is not changing and stays to be fully opaque disregard to my transparency setting. Does anyone know what is happening here and how should I solve this? Thanks!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Object3D Transparency setting
« Reply #1 on: May 23, 2011, 10:22:18 am »
At least 0-10 should make a difference. 255 is very high...transparency is calculated by a crude formula, it's not in the range of 0..255 unless you change the parameters in Config. Maybe it actually works, but because you are starting with such a high value, you aren't noticing any changes before giving up?

Offline hayden621

  • byte
  • *
  • Posts: 20
    • View Profile
Re: Object3D Transparency setting
« Reply #2 on: May 23, 2011, 10:33:03 am »
I have tried that too, and tried to print out isTransparent() of the object when setting the transparency to 0 and it is true, however it is still opaque on the screen.

Offline hayden621

  • byte
  • *
  • Posts: 20
    • View Profile
Re: Object3D Transparency setting
« Reply #3 on: May 23, 2011, 10:45:53 am »
Oh, I realized the problem, it's because my object is a group of animated 3d Object instead of one Object3D and I'd need to set the transparency for each animated 3D. Thanks!