Its the ZBuffer, the whole poly is still being rendered to the zbuffer even
though parts of it are transparent, but there is 2 situations (depending on
what kind of transparency you are trying to do) with its own solution...
What kind of transparency are you trying to do,
blended/translucent/semi-transparency (usually water explosions etc), or
cooky-cutter/sprite transparency (usually sprite characters etc)?
I dont know the exact solution (someone here could probably elaborate) for
the first situation, but you need to do ordered rendering, or render in
retained mode drawing sorted polys.
But It sounds like you are trying to do the cookycutter because you are only
using Alpah values of 255 and 0. In which case try this out...
Appearance app;
app = shape.getAppearance();
//
TextureAttributes texAttr;
texAttr = new TextureAttributes();
texAttr.setTextureMode(TextureAttributes.MODULATE);
app.setTextureAttributes(texAttr);
//
RenderingAttributes renAttr;
renAttr = new RenderingAttributes();
renAttr.setAlphaTestFunction(RenderingAttributes.NOT_EQUAL);
app.setRenderingAttributes(renAttr);
//
shape.setAppearance(app);
This will set a shapes texture to avoid using the zbuffer in areas where
there is complete transparency, and use zbuffer where there is complete
opacity.
BTW, if this is what you want to do, you can set the transparency inside the
gif image itself (like you would do for web graphics). Most modern graphics
programs (even GIMP) will save this information for you if you tell it to. In
this case you dont have to do any buffered image stuff, you can just load the
texture and apply it to the appearance and do the above code and your set.
Ive even gotten to the point where I load a scene with objects that use these
kinds of textures and I just parse the scene changing all the appearances of
the shape nodes.
Leyland Needham
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".