I just downloaded this engine last night, and it seems extremely powerful. I have been going through the tutorials and ran into a snag with my 3D models. I exported my .obj file and .mtl file, with the texture I used to map onto it. I see in the engine where to change the .obj -> .j3o file, and the geometry loads fine, but my question is this:
How to change my .mtl file that I exported to the .j3m file format that is requested, so I can keep my texture mapping?? I get loading errors when I attempt to load the .mtl file using the asset manager…
Appreciate any assistance.
it’s better to make your own JME material. Either with code or with j3m material file.
It’s more powerful in this way to work with shaders.
UV maps are stored in the mesh and not the material, you just need to set a material with the correct texture like mifth said, then it will map out again. The mtl file only references the texture. Its important the texture can be reached when loading (see hints in Model Import tool etc.), ifits on another disk or folder it won’t load but as said the UV coords are still imported.
You should only load .j3o and .j3m files. The .obj and .mtl files are just intermediate formats.
Use the SDK to convert your .obj files to .j3o files. Double click on the .obj file in the SDK and it’ll automatically create the .j3o file. The .obj file contains a link to the .mtl file and the material will be included in the .j3o file automatically, so you don’t have to load the material additionally.
You can create .j3m files by hand to create additional materials if you need them.
Sweet, thanks for the help guys. I was able to get the model loaded and with the correct texture mapping, using the material creator in the SDK. Now, I am moving forward with the rest of the tutorials.
Thanks again, I will post if I have further issues in the correct threads.