Can I load textures (using the standard getTexture func) containing predefined alpha values like in a png image file (e.g. from gimp) ?
Yes, it also loads PNGs in RGBA format (that is 24 bpp RGB plus 8 bpp alpha layer in one PNG file).
When I do so I get black opaque pixels for all transparent pixels.
You need to enable transparency for the Shape3D using the RGBA texture. For example
1 2 3 4 5
| Appearance ape = <your Shape3D's appearance object> .. TransparencyAttributes tranat = new TransparencyAttributes(); tranat.setTransparencyMode(TransparencyAttributes.BLENDED); ape.setTransparencyAttributes(tranat); |
What image formats next to "RGB" can be used ? ARGB, RGBA, BGR, ABGR ?
It happily works with RGB and RGBA. Both directly loaded from a PNG file.
If other formats are possible I don't know.