The unshaded material has no transparency limitation of any sort.
As to what is your issue it’s hard to tell from your question. Some code would have helped.
Asa rule of thumb for transparency, make sure your objects are in the transparent bucket and that the material additionalRenderState is set to Alpha (if you want alpha transparency).
indent preformatted text by 4 spaces public void makeUnshaded(Node node) {
SceneGraphVisitor sgv = new SceneGraphVisitor() {
public void visit(Spatial spatial) {
if (spatial instanceof Geometry) {
Geometry geom = (Geometry) spatial;
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
Material tat = new Material(assetManager, "Common/MatDefs/Terrain/Terrain.j3md");
if (geom.getName().equals("Invisible")){}
else if (geom.getMaterial().getTextureParam("DiffuseMap_1") != null) {
tat.setTexture("Alpha", geom.getMaterial().getTextureParam("AlphaMap").getTextureValue());
if (geom.getMaterial().getTextureParam("DiffuseMap") != null) {
tat.setTexture("Tex1", geom.getMaterial().getTextureParam("DiffuseMap").getTextureValue());
tat.getTextureParam("Tex1").getTextureValue().setWrap(Texture.WrapMode.Repeat);
tat.setFloat("Tex1Scale", Float.valueOf(geom.getMaterial().getParam("DiffuseMap_0_scale").getValueAsString()));
}
if (geom.getMaterial().getTextureParam("DiffuseMap_1") != null) {
tat.setTexture("Tex2", geom.getMaterial().getTextureParam("DiffuseMap_1").getTextureValue());
tat.getTextureParam("Tex2").getTextureValue().setWrap(Texture.WrapMode.Repeat);
tat.setFloat("Tex2Scale", Float.valueOf(geom.getMaterial().getParam("DiffuseMap_1_scale").getValueAsString()));
}
if (geom.getMaterial().getTextureParam("DiffuseMap_2") != null) {
tat.setTexture("Tex3", geom.getMaterial().getTextureParam("DiffuseMap_2").getTextureValue());
tat.getTextureParam("Tex3").getTextureValue().setWrap(Texture.WrapMode.Repeat);
tat.setFloat("Tex3Scale", Float.valueOf(geom.getMaterial().getParam("DiffuseMap_2_scale").getValueAsString()));
}
geom.setMaterial(tat);
}
else if (geom.getMaterial().getTextureParam("DiffuseMap") != null) {
mat.setTexture("ColorMap", geom.getMaterial().getTextureParam("DiffuseMap").getTextureValue());
geom.setMaterial(mat);
}
}
}
};
node.depthFirstTraversal(sgv);
}
indent preformatted text by 4 spaces
It’s a method that I use to change an entire scene to unshaded.
It may have to do with the render state you’re talking about.
How would I set “the additionalRenderState to alpha” I can do material.getAdditionalRenderState() but reading through the methods I’m unsure what to do.