Do these two things work together currently?
I’m finding if I enabled lighting on a material for an appearance the transparency settings have no effect.
Any help appreciated,
Kev
Do these two things work together currently?
I’m finding if I enabled lighting on a material for an appearance the transparency settings have no effect.
Any help appreciated,
Kev
Well, I think I can help with a Xith3d question - for the very first time. 
Basically the same question I’ve asked some days ago, but unfortunately I’ve hidden it in another poster’s thread, so it’s hardly noticeable.
Please have a look at here: http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=xith3d;action=display;num=1067981426;start=15
The exact technical details have been revealed by Yuri in the linked thread. However, because the topic really fits better to your new thread here, please let me quote Yuri’s two main articles:
[quote]Well, some points on alpha blending.
There is no bug in this functionality, but this is a bit incompatible with Java3D. I just committed new test - Xith3DTransparencyAlphaTestLight.java - to CVS.
You should use setColorTarget(…) on your material to get transparency working in some (most) cases. The reason for this is that Java3D-style material accepts 3-component colors only, so for now material shader sets alpha to opaque. If you specify color target, appropriate material color will be replaced with color from coloring attributes/vertex colors/transparency attributes.
This is still not clear of what to do with this incompatibility, and I personally prefer to go to more advanced Material that will support different front/back materials and 2-sided lighing model, as well as more sophisticated light control.
[/quote]
[quote]From Java3D docs:
In Xith3D, if no vertex colors present, the color combined from ColoringAttributes and TransparencyAttributes used as a vertex color and set to be same for all vertices.
Also note that default color target in Java3D is DIFFUSE and in Xith3D is NONE.
Yuri
P.S. There is also JavaDoc comments for this method/constants in Xith3D Material.java
[/quote]
Doh! Thanks alot Preston!
I actually read the post and totally forgot about it. Thanks again thats done the trick…
My lovely teleport effect works again.
Kev
Always light on in the following. 
Is it possible to create a per vertex coloured Shape3D without having to use COLOR_4 ?
For example there’s a a per vertex coloured Shaped3 of type COLOR_3 and it shall be made transparent with one value (50% for example), like using “tansparency.setTransparency(0.5f)”. This just works for Shape3ds without any COLOR_x in the geometry.
With COLOR_4 the appeareance.setTransparency(value) is being ignored or rather overwritten by the per vertex colours’ alpha value. While this works fine and allows a good fine tuning of the transparency per vertex, like here:
IndexedTriangleArray geo = new IndexedTriangleArray(vertices.length, GeometryArray.COORDINATES | GeometryArray.COLOR_4 | GeometryArray.NORMALS, polygonindices.length);
geo.set...
Appearance ape = new Appearance();
Material material = new Material();
material.setColorTarget(Material.AMBIENT_AND_DIFFUSE);
ape.setMaterial(material);
TransparencyAttributes transp = new TransparencyAttributes();
transp.setMode(TransparencyAttributes.BLENDED);
transp.setTransparency(0.5f); // is being overwritten by the vertex colours' alpha values
ape.setTransparencyAttributes(transp);
Shape3D korpus = new Shape3D(geo, ape);
I wonder if there’s a simpler way to achieve a transparent coloured Shape3d whit one Transparency-value…?