Author Topic: transparency  (Read 4596 times)

Offline raft

  • quad
  • ******
  • Posts: 1972
    • View Profile
    • http://www.aptalkarga.com
transparency
« on: August 05, 2010, 03:39:54 pm »
i've problem with transparent objects on nexus one. they seem rigid, not transparent.

this is how it looks on emulator:


and on N1:


it was ok on G1 too. is there anything i can try ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: transparency
« Reply #1 on: August 05, 2010, 05:37:36 pm »
Strange...is this always the case or just on some objects? Have you tried to use additive transparency instead? Does an alpha channel in the texture has any effect?

Offline raft

  • quad
  • ******
  • Posts: 1972
    • View Profile
    • http://www.aptalkarga.com
Re: transparency
« Reply #2 on: August 05, 2010, 06:11:34 pm »
seems as happens for all objects. alpha channel in texture seem to have effect
additive transparency also works, as in the screenshot

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: transparency
« Reply #3 on: August 05, 2010, 06:30:38 pm »
What kind of effect does a texture's alpha has? Does it help to make things transparent even in default mode? What's the value you are using for transparency?

Offline raft

  • quad
  • ******
  • Posts: 1972
    • View Profile
    • http://www.aptalkarga.com
Re: transparency
« Reply #4 on: August 05, 2010, 06:37:48 pm »
after you asked, i applied color-to-alpha conversion in gimp. i'm not sure what it did exactly ::) i'll send it with email
yes, it works in default mode. i didnt try additive mode for that.

values are below. but it didnt working with default Config values either

Code: [Select]
Config.glTransparencyMul = 1f / 1000;
Config.glTransparencyOffset = 0.0f;

Object3D.setTransparency(500);         

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: transparency
« Reply #5 on: August 05, 2010, 06:43:49 pm »
Have you tried disabling the conversion to 16bit for these textures?

Offline raft

  • quad
  • ******
  • Posts: 1972
    • View Profile
    • http://www.aptalkarga.com
Re: transparency
« Reply #6 on: August 05, 2010, 06:46:41 pm »
how should i do that ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: transparency
« Reply #7 on: August 05, 2010, 06:54:29 pm »
There's a method in Texture..enable4bpp(..) or similar. Just set that to false on that texture right after loading. In addition, could you try to adjust transparency in additive mode and when using a texture with alpha, please? My guess is, that this will show no effect...

Offline raft

  • quad
  • ******
  • Posts: 1972
    • View Profile
    • http://www.aptalkarga.com
Re: transparency
« Reply #8 on: August 05, 2010, 08:14:07 pm »
you mean enabling it. doc says it's false by default. didnt help, tried both true and false.
and yes, setting transparency value has no effect in additive mode as you expected

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: transparency
« Reply #9 on: August 05, 2010, 08:26:11 pm »
Yes, default is indeed false. I'm always setting it to true, so i somehow thought that this was default...anyway...

Just to be 100% sure: The AE-jar that you are using on the N1 is the most current, isn't it? I'm asking because there was a bug in a earlier version that had exactly this effect.

Offline raft

  • quad
  • ******
  • Posts: 1972
    • View Profile
    • http://www.aptalkarga.com
Re: transparency
« Reply #10 on: August 05, 2010, 08:35:09 pm »
yes it's latest. to be 100% sure, i just downloaded it again. diff returns no result

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: transparency
« Reply #11 on: August 05, 2010, 08:38:39 pm »

Offline raft

  • quad
  • ******
  • Posts: 1972
    • View Profile
    • http://www.aptalkarga.com
Re: transparency
« Reply #12 on: August 05, 2010, 08:58:37 pm »
partially solved. transparency came back with this jar, but object still seem rigid from some distance. ie, if you come closer it becomes transparent.

additive mode:


default mode same camera distance


in emulator, same camera distance. only difference is screen resolution but shouldnt differ i suppose

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: transparency
« Reply #13 on: August 05, 2010, 09:12:34 pm »
Is there some light source in that scene? If so, please try to disable it to see if that changes something.

Offline raft

  • quad
  • ******
  • Posts: 1972
    • View Profile
    • http://www.aptalkarga.com
Re: transparency
« Reply #14 on: August 05, 2010, 09:19:02 pm »
yes, there is a light source inside the ball. disabling it helped.