Texture paths/settings in BinaryImporter

While playing around with the "new" binary loading code (yes, it's been a while since I have done anything productive with jME!) I thought of the feature of Cep's old code where you could specify (override) the texture location by specifying a base url. Is there anything the like in the new model loading code?

And what happens when I create/import a scene and write it to disk using BinaryExporter, are relative Texture paths maintained, or are they converted to absolute ones?

Oh, and can I instruct the binary loader to load (dds) textures flipped?

BTW, I thought I recently saw a topic regarding saving jME Images to .dds files around, but can't seem to find it any more… any clues?

Take a look at TextureKey.setOveridingLocation(URL)

I'm sorry, I can't see how that helps me to specify the texture location when loading a scene via BinaryImporter… maybe I'll have to patch BinaryImporter myself, to set the TextureKey for the texture to load?

As for the .dds flipping thing: is it at all possible to flip compressed .dds textures, or do I have to flip them before compression?

The texture manager does not have support for flipping dds textures.

AFAIK it sets the overriding location for all TextureKeys. Or do you mean you want to save a model with BinaryImporter that also saves this location?



And flipping a compressed texture would be hard since it's never decompressed by jME. You can always flip the texture coordinates instead.

Stupid me, didn't notice setOverridingLocation was static… thanks, that should be what I want.

llama said:

You can always flip the texture coordinates instead.

Yes, I thought of that, too, but I think I'll rather flip the image before compression, then, to avoid having to re-arrange the uv buffers on each model load. Not the most convenient, but probably the most performant way.