Hello monkeys!
I’ve switched from Nitfy to Lemur and I’m learning it right now. I’ve figured out how basic things works and make some things. like creating Style on Groovy and custom panels like those:
But now i’m stuck. I need to attach a Geomtry (which has a custom MaterialDef and Shader) to a Container. But when I attach, nothing happens.
If I change the Material of Geometry to Unshaded.j3md or ShowNormals.j3md it works. So my question is: Since i’m using custom MaterialDef do I need to create something to make it works? I was taking a look on Lemur source and it seems to convert materials to GuiMaterial or something like it.
Here are some source codes:
//Geometry creation
Mesh mesh = VoxelMesh.getMesh(Voxel.VT_STONE);
Geometry geom = new Geometry("box", mesh);
geom.setMaterial(atlas); //Doesn't show the Geomtry
//geom.setMaterial(new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md")); //Show the Geomtry
geom.setCullHint(Spatial.CullHint.Never);
//And to attach it to Container
container.attachChild(geom);
I don’t know what code should I post here, but just ask and I do it.
Unshaded MatDef: