Object3D.setTransparency range?

Started by Uwe Siems, August 17, 2011, 08:25:51 PM

Previous topic - Next topic

Uwe Siems

What is the expected value range for Object3D.setTransparency?
I'm experiencing that objects are completely opaque at value 5 and reasonable transparent at 0. I would have expected that they are opaque at 255 and invisible at 0.

And it seems that the additional color set with setAdditionalColor is multiplied with the base color instead of added to it, so an object with a black texture will still be black, regardless of the additional color, and an object with a green texture and an additional red color will stay green. Is this intentional?


Regards,
Uwe

EgonOlsen

The default transparency for these values is choosen in a way that hardware and software renderer create similar results for the same value. Transparency in the software renderer is much more coarse than it has to be with hardware, which is why you might want to modify the formula which calculates the actual transparency if you are using OpenGL only. Have a look here: http://www.jpct.net/doc/com/threed/jpct/Config.html#glTransparencyOffset and here: http://www.jpct.net/doc/com/threed/jpct/Config.html#glTransparencyMul