Ah, then in effect you are drawing an image onto your canvas, even though
that image is a the result of taking a snapshot of a 3d object.  Next
question... are you drawing your image to a AWT canvas, using a graphics
context, or are you puttting your image into a Java3d scene?  Eaither way,
you will need to create an alpha channel in your image.  There is no
"transparent" image really.  When you rendered to the offscreen buffer, you
effectively made an image, with every pixel filled in.  You now need a mask
to be able to draw this without a background.  As far as I know, and I could
be wrong, you cannot render to an offscreen buffer and have it set the alpha
channel automatically, although that would be nice.  And you can't really
pick a background color for your mask because the scene will be anti aliased
against the background color.  Perhaps there is a trick someone else knows
about.

> ----------
> From:         Tater Read[SMTP:[EMAIL PROTECTED]]
> Reply To:     Discussion list for Java 3D API
> Sent:         Tuesday, September 05, 2000 12:30 PM
> To:   [EMAIL PROTECTED]
> Subject:      Re: [JAVA3D] Making background Transparent
>
> I'm using a color background.  The 3D objects themselves are not being
> occluded, it's the underlying vector graphics that are being occluded.
> That
> is, I'm rendering the 3D scene to an off-screen buffer, copying the image,
> then drawing it to a graphics context.  So ideally, the background color
> should be transparent.
>
> Cheers,
>
> Tater
>
>
>
> The background should not be occluding your objects.  Are you using
> background geometry, image or color?
>
> >
> > Hi Dave,
> >
> > I suppose at some point I would like to add transparency to the 3D
> objects
> > in the scene but for now I am just adding opaque 3D objects with images
> > and/or vector graphics in the background.  By the way, I noticed that
> the
> > ImageComponent supports an RGBA format, how do you set the Background to
> > be
> > transparent?  From the constructor it looks like it only takes RGB
> values.
> >
> > Cheers,
> >
> > Tater
> >
> >
> >
> >
> > I am not sure what you mean.  If you mean can you draw a transparent
> > image,
> > then yes you can use alpha blending to great effect.  You can set the
> > transparency attributes on the polygon to totally transparent then
> texture
> > it with BLEND and with a RGBA loaded image (PNG works very well).
> >
> > Dave Yazel
> >
> >
> > > Hello,
> > >
> > > I'm creating a simple 3D scene that I want to draw onto a canvas with
> > > other
> > > graphics objects.  Unfortunately, the background ends up being a black
> > > rectangle on top of the graphics.  Is there a way of setting the
> > > background
> > > to be transparent?
> > >
> > > Cheers,
> > >
> > > Tater
> > >
> > >
> > > Tater Read
> > > Research & Development
> > > Improv Technologies
> > > 535 Eigth Avenue
> > > New York, NY 10018
> > > (212) 725-4590
> > >
> > >
> >
> ==========================================================================
> > > =
> > > 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".
> > >
> >
> >
> ==========================================================================
> > =
> > 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".
> >
> >
> ==========================================================================
> > =
> > 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".
> >
>
> ==========================================================================
> =
> 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".
>
> ==========================================================================
> =
> 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".
>

===========================================================================
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".

Reply via email to