hello.
i'm making transparent 3D objects in 3D space using texture . what i did was - set the
material transparant, and set the texture opaque. The result was, the object is opaque
to the background, but transparent to the other objects. the background is hidden
behind the object, but i can see the other objects thru my objects.
the code is like this.
TextureAttributes texAttr = new TextureAttributes();
texAttr.setTextureMode(TextureAttributes.REPLACE);
app.setTextureAttributes(texAttr);
TransparencyAttributes transparency = new
TransparencyAttributes(TransparencyAttributes.NICEST, 1.0f);
app.setTransparencyAttributes(transparency);
Color3f black = new Color3f(0.0f, 0.0f, 0.0f);
Color3f white = new Color3f(1.0f, 1.0f, 1.0f);
Color3f red = new Color3f(0.7f, .15f, .15f);
app.setMaterial(new Material(red, black, red, black, 1.0f));
// Create a ball to demonstrate textures
int primflags = Primitive.GENERATE_NORMALS + Primitive.GENERATE_TEXTURE_COORDS;
Box textureCube = new Box(0.3f, 0.3f, 0.3f,primflags, app);
objTrans.addChild(textureCube);
the same attribute is given to all of the objects.
how can i hide the other object behind mine?
thanks in adv. sw.
===========================================================================
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".