Loading times

I experience very strange loading time differneces and I put together some of the models I load. The house2 model loads incredibly slow but I hoped to have all the models loaded a bit faster.



http://www.world-of-mystery.de/download/jme-loading.xhtml



Is there anything the binary importer recreates in the models that may justify the loading times?

animations?

The building models do not have animation, no. I add controllers after the loading but this is not reflected in the mentioned loading times.

How are your experiences with loading jME binary? Is it similar or are we way below of what we could expect?

No, you should not be seeing loading times that seem unreasonable. What are the size of the binary files that you are loading? What sorts of times are we talking about here? I've yet to see any model that takes longer than a couple seconds.

I put the table in the .xhtml, but I post it here to make it easier to read:



The KB column shows the file size in kilobyte (kibibyte according to ISO).

Are you measuring strictly the return time of the binary loader call?  Textures and the like are generally what I've seen cause longer loading times.

the automatic texture compression(s3tc/dxt) when loading textures costs alot

if you want to use texture compression to be nice on your graphics card i suggest pre-compressing the textures to .dds files(appropriate dxt format) with some tool(i mostly use nvidia's photoshop plugin), and then load those textures instead…

…or if you use gimp: http://nifelheim.dyndns.org/~cocidius/dds/

Now, this may be a noobish thought (and I would say feel free to tell me so, but I have no doubt you would), but what about creating a feature in jME as part of the model exporting also export the textures to a pre-baked texture?  Would that be incredibly complicated to write?  We already support pre-baked textures to put them on, so I wouldn't expect it would be that big of a deal to do the reverse and generate them from the model would it?

sfera said:

..or if you use gimp: http://nifelheim.dyndns.org/~cocidius/dds/


Thank you for that link!
darkfrog said:

what about creating a feature in jME as part of the model exporting also export the textures

I'd think that would be a nice option for JMEExporter, yes. Can someone tell if you can get the compressed data from a texture?

justin: you're welcome


darkfrog said:

what about creating a feature in jME as part of the model exporting also export the textures


i suppose that's the purpose of artist tools. i'm not sure if exporting various image forrmats is a functionality which belongs into an engine.  :|

Many thanks for the hints and pointing to the texture loading. I believe that's the problem and I will have a look at that when I'm back (I'll be off for some days).

I guess I can still use the TextureManager but use a .dds picture? Or do I have to preload the .dds and use the texture IDs for the models?

Galun said:

I guess I can still use the TextureManager but use a .dds picture? Or do I have to preload the .dds and use the texture IDs for the models?


just load the dds texture like you would load a png or jpeg

Texture contains storeTexture boolean that when set will save the texture in the binary (it will take up quite a bit of space, however). So, if the dds texture can be pushed back to the Texture it could easily be stored. Pushing it back is the question.

There's one little quirk with using DDS-textures. The DDS-loader works great with modern graphics cards, but when I tried to load a DDS texture while using an old graphics card that did not support texture compression, the texture couldn't be loaded because it didn't decompress the already compressed texture. I might be wrong though. It was a little while ago.

I'm just now getting around to implementing this.  How do I get the texture(s) for the model to set the storeTexture value before I save it to a jME binary?

  • BUMP *



    I'd like to add a feature to ModelLoader to allow you to bake the textures into the generated .jme file but I'm still not sure how to do this???

Well, I guess my real question is, how do I cycle through all the textures that are loaded with a model to set this flag on them?