I'm making a game on JMonkeyEngine 3, I'm working on design. I made and added walls, ceiling, floor, and some models.
But after I run my game, it lags. I don't need any light effects, so I want to load anything with Common/MatDefs/Misc/Unshaded.j3md
MaterialDef to reduce lagging.
I'm loading my models like this: (they all are in glb format, I can't translate them to j3o because I'm using IntelliJ IDEA)
Spatial model = assetManager.loadModel("Models/Model.glb");
I don't need to set material because glb file format includes it.
And as default, we have lighting MaterialDef. But I don't want it.
How can I set model's MaterialDef to unshaded? Or load it with unshaded material?
The first example about materials in the official JMonkey Engine Documentation shows, how to load and apply the unshaded material. Just apply it to the geometry you loaded into your game.
Your question is similar to this one, which was posted to the official JMonkey Engine forum.