View.setTransparencySortingPolicy(View.TRANSPARENCY_SORT_GEOMETRY)
plateAppearance = new Appearance(); transparencyAttributes = new TransparencyAttributes(TransparencyAttributes.BLENDED, 1.0f);
TextureAttributes texAttr = new TextureAttributes(); texAttr.setTextureMode(TextureAttributes.REPLACE);
texAttr.setPerspectiveCorrectionMode(TextureAttributes.FASTEST);
plateAppearance.setTexture(texture);
RenderingAttributes plateRenderingAttributes = new RenderingAttributes(); plateRenderingAttributes.setIgnoreVertexColors(true);
Material plateMaterial = new Material(); plateMaterial.setLightingEnable(false); plateAppearance.setMaterial(plateMaterial);
plateAppearance.setRenderingAttributes(plateRenderingAttributes); plateAppearance.setTextureAttributes(texAttr); plateAppearance.setTransparencyAttributes( transparencyAttributes );
plateShape.setAppearance(plateAppearance);
HTH
Jeremy
Thanks for the help but still no result. PS it is frustrating because transparency is SO POORLY documented
Here is the code implemented in jython
def Main(self):
.....view = univ.getViewer().getView()
view.setTransparencySortingPolicy(View.TRANSPARENCY_SORT_GEOMETRY)
Background.def buildAppearance(self):
plateAppearance = Appearance()
plateTransAttrs = TransparencyAttributes(TransparencyAttributes.BLENDED, 1.0)
plateTexAttr = TextureAttributes() plateTexAttr.setTextureMode(TextureAttributes.REPLACE)
plateTexAttr.setPerspectiveCorrectionMode(TextureAttributes.NICEST)
plateTexture = TextureLoader('mask5.png', JFrame()).getTexture()
plateRendAttrs = RenderingAttributes() plateRendAttrs.setIgnoreVertexColors(1)
plateMaterial = Material() plateMaterial.setLightingEnable(0)
platePolygon = PolygonAttributes() platePolygon.setCullFace(PolygonAttributes.CULL_NONE) platePolygon.setBackFaceNormalFlip(1)
plateAppearance.setTextureAttributes(plateTexAttr) plateAppearance.setTransparencyAttributes( plateTransAttrs ) plateAppearance.setMaterial(plateMaterial); plateAppearance.setPolygonAttributes(platePolygon) plateAppearance.setRenderingAttributes(plateRendAttrs) plateAppearance.setTexture(plateTexture)
return plateAppearance
I am on a linux machine. I am using SimpleUniverse and orbitBehavior, -> camera moves not object. The program requires a set of 3D coordinates and vector weights as input. A set of 3D polygon blob like objects are created showing areas within the molecule that do not like water (hydrophobic patchs) I was not keen on using j3d but the boys upstairs made me. I am pretty much finished with the prototype; the transparency issue is all that is left. Do I have to build up my geometry in a special way ? What else can I do ?
Thanks for your help,
Chris
=========================================================================== 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".
