Simple trees

hey ,
i want to have simple trees in my app…
2 quads in an angle of 90 degrees
picture of a tree with transparent background…

i use this material:

  tree = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
  tree.setTexture("ColorMap", assetManager.loadTexture("Scenes/AndroRoom1/Tree3.png"));
  tree.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
  tree.getAdditionalRenderState().setFaceCullMode(RenderState.FaceCullMode.Off);

the quads are in the tranparent bucket!

in one hand it works, but in the other it has a strange behavior:
sometimes some parts of the tree get invisible for some seconds
most times if one quad is partly behind the other one…

Hello,
you’ve got intersecting transparent quad… use getAdditionalRenderState().setAlphaTest(true).
This should solve the problem

regards
Guillaume

mhm… it became better but still not perfect…:frowning:

maybe its the picture i use…but already used more zhan one…
or could it have something to do with thaqt i use two seperate spatials per tree?

in blender i have insert two plane seperate plane objects
i load the scene and traverse sthe Node… if the name starts with tree i set the material…

but thx for anwer :slight_smile:

Alpha discard threshold settings will help as well.