<cite>@nehon said:</cite>
post code and screenshots
the thing is that the floor is alpha rendered too,
on some rectangular areas, there can be facilities(props/buildings),
so i needed to set the uv of floor tiles so that it was using a part of the floor texture that has 0% alpha
otherwise i had precision problems on the depth test cos facilities have a floor too
so i enabled alpha discard threshold to have either the floor rendered, either the facility floor rendered
floor :
[java]
floorMesh = CreateFloorMesh();
Material mat = main.getAssetManager().loadMaterial(“Materials/Floor.j3m”);
mat.getAdditionalRenderState().setAlphaTest(true);
mat.getAdditionalRenderState().setAlphaFallOff(0);
Geometry geo = new Geometry(“Floor”,floorMesh);
geo.setMaterial(mat);
floor.attachChild(geo);
floor.setQueueBucket(Bucket.Transparent);
[/java]
Material My Material : Common/MatDefs/Light/Lighting.j3md {
MaterialParameters {
DiffuseMap : Textures/floor.png
AlphaDiscardThreshold : 0.0
UseAlpha : true
}
AdditionalRenderState {
}
}
some object that renders wrongly :
[java]
Node n=(Node) propToPlace.getChild(0);
Geometry geo=(Geometry) ((Node)n).getChild(0);
propMaterialToRestore=geo.getMaterial();
Material propMaterial = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
propMaterial.setColor("Color",new ColorRGBA(0.8f,0.8f,1.0f,0.9f));
propMaterial.getAdditionalRenderState().setBlendMode(RenderState.BlendMode.Alpha);
propToPlace.setMaterial(propMaterial);
propToPlace.setShadowMode(ShadowMode.Off);
[/java]
i am afraid there is no solution for my problem
unless i kind of force the floor to be rendered before anything else

strangely enough, if i load a model from blender that uses alpha maps, i dont get the same issue

the main difference is that i don’t modiffy/assign a material to that prop
and also that it does uses a texture.
while the others have no texture, they are “just set to alpha” rendering
code for the plant :
[java]
propNode= (Node) main.getAssetManager().loadModel(“Models/Plant.j3o”);
gameItem.setNode(propNode);
propNode.addControl(new PlantController(main,(Plant)gameItem,CreateBoxCollisionShape(propNode)));
[/java]
[cant have the layou right after the second image, dont know why]