OBJ file unable to be converted to J3O

Hi,

I’m trying to convert obj files to j3o files. However, I get this error:

Unknown statement in MTL! tf
Cannot locate Textures/RawModels/runway_01/1 (Flipped) (Mipmapped) for material Textures/RawModels/runway_01/runway.mtl

The issue seems to be with the mtl file pointing to something that isn’#t there, but I need the mtl file for the texture.

Hopefully someone can point me in the right direction here.

It’s rather the Unknown statement in MTL! tf. The Texture is only a warning.
It could be that it has some advanced feature which we don’t understand and hence can’t create the Material.
Also note that you refer to a Texture called 1 (it is missing the extension).

A workaround is simply leaving the material away and then manually edit the .j3o and add/edit a .j3m Material file which handles that.

Does blender open it properly ?

So, how can I add a texture in the SceneComposer? I can’t find a tutorial for it.

This should cover all your needs, if not check the jMonkeyEngine YouTube Channel, actually there are plenty of youtube videos about the sdk already :slight_smile:

I hate to be “that guy”, but I seriously do not have the time to watch a 37-minute video just to try and find out the tiny piece of information I want (Also, I hate youtube tutorials in general). As far as I have viewed, that video seems to just have magically imported the textures (e.g. with MTL files) rather than adding a texture to a non-textured model.

I appreciate you trying to educate me, but a staight-up answer/solution would be very nice if possible.

Edit: Also, according to that video, there is an “option to create a J3M” file in the properties windows, wheras in fact, it simply gives a list of materials that I could use and no option to create a J3m.

Edit2: Even on a new J3O file, which can give the option to “Generate a J3M”, all it does is create some material which is still black and appears to do nothing. Oh, and no J3M File appears.

you can just watch from minute [5:0 ,10:0 ].

I didn’t want to educate you but it just covers more follow up questions you might have.

You have to click onto that generate .j3m file like select or deselect it, it’s a bit tricky. You will notice the SDK hang for a second and then it selects the newly created j3m file.
You can then open that Material from the Project Assets and select your Textures there.

So there is no way to import .mtl (especially not in your case) but you can import the model and then have a j3m generated and add your textures there

Edit: And yeah, the material might be black (though it is rather grey, black means you didn’t turn the light on^^), you have to edit the material.

Alright, thanks. So I now have this:

However the texturing is supposed to look like this:

The problem here is that the F16 is split up into four pieces:

And so does not texture properly.

Is that covered in the tutorial? Is there a way around it?

try to check tick for “flip” and “repeat” in material editor .

Each Geometry needs it’s own Material and not every Geometry the same Material.
Or you could use a texture atlas by changing the material, but for now it’s easy to just create 4 materials

Oh right… I just had to flip the texture…

Thanks to everybody to the help, I doubt I’d have worked out without you all.

Now I can start adding stuff like effect trails into the J3O file. :slight_smile:

Which look blocky as hell - But anyway, that’s for another thread.

well, make them smaller and more of them and maybe also turn on alpha (don’t know if that is even possible)
But you can also preview them in the j3o so just play around with them