Texture Transparency in J3D ?

Hello everybody,

i and some friends of my univerity have started to develop a realtime strategie game in Java with 2D (basic menues) and 3D (maps and battle area) environments.

Now i develop some test environments for the 3D maps. First i try to create a space map, with some stars for the systems and an background image. The biggest part (placing objects, setting view ect.) works fine, but now we have a problem with the transparency of these stars.

The stars are 2d textures (gifs or jpg), which placed on flat, 3D Shape quads. The problem we have, is that the transparent area around these stars (we will only have the shining of the star) is setting white by my paint program. So we have stars whith white areas around them to fill the quad on a nebular, realy ugly.

Has anyone a solution ore knowledge about to make this white areas transparency or to make it possible to import images with transparency?

Thanks with regards,

Christian

[992 byte] By [CHeine] at [2007-9-27 14:49:44]
# 1

I assume you need more than just transparency? (because gif supports simple transparency) if your doing semi transparent things like explosions, you need data in the alpha channel, neither jpg nor gif support alpha channel.

2 ways of getting alpha channel data into your image are:

1) create it from a png file (png supports alpha channel, and is supported in 1.3 onward)

2) create a second image to represent the alpha channel of the image, merge the 2 using the appropriate ImageFilter.

rob,

Abuse at 2007-7-5 22:49:48 > top of Java-index,Other Topics,Java Game Development...
# 2
Thx 4 hlp, i will try u're sollution.
CHeine at 2007-7-5 22:49:48 > top of Java-index,Other Topics,Java Game Development...
# 3
if u need extra info (u might be able 2 get some code)There have been many posts in the past, relating to this problem - try looking in the Java2D forum, as that is more applicable to this issue.
Abuse at 2007-7-5 22:49:48 > top of Java-index,Other Topics,Java Game Development...