Hi, I have to fill a terrain with lods of models(trees). The models are described in a tileset and the mapdescription holds the info where which tree is set. I decided to first load one instance of every model and then cloning them using CloneImportExport. But the whole loading is still a bit slow. Anyone has an idea how to speed it up?
One thing i saw is that he always tries to reach the textures . Maybe this is the reason why its slow because he tries to load every texture again for every clone?
I use a precacher for the models, and load every model needed at the beginning, then just use SharedNodes to repliate them when atually needed in world. (Kinda long laoding, but then ti works without problems, Idea here would be a loading screen showing progress ("Precaching cookie.mdl"))
But after this I have to populate my world with lots of SharedNodes and this takes some time. Its ok for now (5 seconds), but there will be other things to load too before the game starts. I will go on now. If its to slow It can be optimized later.
Thats why i say a loading screen with a visible progress, 10 seconds waiting when you see something happens is shorter than 5 looking at a black window saying no response in title ^^
public class LoadingScreen extends Pass {
private static final long serialVersionUID = 1L;
private static LoadingScreen myself;
private Node rootnode;
private Quad backgroundnode;
private DisplaySystem display;
private BitmapText txt;
private BlendState blendstate;
LoadingScreen(){
this.display = DisplaySystem.getDisplaySystem();
this.rootnode = new Node();
rootnode.setRenderQueueMode(Renderer.QUEUE_ORTHO);
this.backgroundnode = new Quad("Background",Settings.Get().getResolutionx(),Settings.Get().getResolutiony());
this.backgroundnode.setLocalTranslation(Settings.Get().getResolutionx()/2f,Settings.Get().getResolutiony()/2f,0);