I am trying to load a .3ds file using the maxtojme converter. The model loads just fine but i can not seem to get it to load the texture.
The only clue given is: com.jme.util.TextureManager loadTexture WARNING: TextureKey is null, cannot load.
I did some debugging and found that the write method of Texture writes out null for this particular field. Now i have no idea as to why this is, but the same seems to be happening in lesson 7 where the bike model is loaded. However write does write out an imageLocation which is read back by the read method only nothing is done with it. So i tried the following modification (might not be completely generic for everybody)
TextureKey has a static methid for overriding the texture path.
Yeah but unless you override Texture, there is no way you can set it. Since the textureKey is automaticly created at the read and write methods as far as i could see.
how stupid of me, completely missed that. however using the following code i still can not get my texture to show up and i still get the "TextureKey is null, can not load" message.
Well, it appears that readTextureMap* methods in com.jmex.model.XMLparser.Converters.TDSChunkingFiles.MaterialBlock never creates a TextureKey, which in turn means it can't be stored properly. It's mostly an upgrade issue, if you are adventurous enough you might play around with it, just create a new TextureKey object, set the values that should be set and call t.setTextureKey().
If not, you'll have to wait awhile before I get around to playing with it.
Like you said. However since i have no idea as to where to get the actual values to initialize the key with, i'll leave it to you guys to fix this properly.