Slow loading model (.3ds)


I'm a new to jME and to this 3d stuff. I'm loading this model ( ). It loads well but it takes something like 2 minutes to load!

I'm using the code in SimpleGame tutorial to do the other stuff.

I wonder is the long loading time because of that model, that code or something else.

Here's the code for loading the model:

 URL model=SpaceGame.class.getClassLoader().getResource("model/enforcer.3DS");

For starters, that model probably has way too many vertices to be efficiently used (based on the comment on the turbosquid page). I'm no pro either though, but its slowness is probably due to the size/complexity of the model. Model loading itself is kinda slow, but quicker if you convert the model to the jme binary format first and load it from that each time.

Well it works really well once it's loaded. I should try the conversion.

How the conversion is done? Is there some kind of app to do it with?

Give ModelLoader a try…it's in the jME source code.

I have taken a look at the model that you linked to on turboSquid. It has over 92000 faces and uses more than 350 MB of active memory and over 756 MB of virtual memory according  to my copy of 3DS Max 8. This model that you are using has a lot of unneeded objects in it. These were mainly used to get a high res still image. You should also keep in mind that this model has two directional lights and two point lights that come for free, so to speak, and may help or hurt in the long run. Remember that lights have a compounding affect with other things in the scene.