Hi,
Can anyone please tell me the issues that we face when using JCanvas3D instead of Canvas3D?
How to achieve transparency using JCanvas3D?
Regards, hariprasad
Hi,
Can anyone please tell me the issues that we face when using JCanvas3D instead of Canvas3D?
How to achieve transparency using JCanvas3D?
Regards, hariprasad
The only reference to JCanvas3D I can find right now is in a com.sun.j3d.exp.swing package. The API for that package actually has an EXPERIMENTAL warning on it. That being said, the forums still have quite a bit of activity in them and it sounds as though people are still actively working on the code.
The distinguishing feature between these two seems to be that Canvas3D is the standard "AWT"-like heavyweight component and JCanvas3D is meant to be its Swing counterpart.
After searching around a bit more: I found this tidbit quoted from an answer by interactive mesh which sounds like it will answer your more specific question.
A transparent scene background is available for all lightweight 3D canvases (JCanvas3Dxyz, FxCanvas3Dxyz). Setting the Java 3D system property "transparentOffScreen" to true (-Dj3d.transparentOffScreen=true or System.setProperty("j3d.transparentOffScreen", "true")) results in an alpha value of '0' for all pixels in the scene background area so that the panel's own background color shows up. When switching its opaque attribute to false the parent panel will be rendered in the scene background area.
This allows - to create a fancy background or - to move the 3D scene content across all panels within a JFrame or - to create layered 3D scenes.
The scene background area within a Canvas3D is always opaque.
-August