Blender .obj File

Hi there,



i’m going to create a game using jMonkeyEngine 3. For this, i’ll have to use Blender for creating the Scene/Terrain. It will be a room with different materials. If i only import it like:



Spatial lab001 = assetManager.loadModel(“Models/room001/room001.obj”);



I’ll get this error-code:

Uncaught exception in Thread[LWJGL Renderer Thread,5,main]

com.jme3.asset.AssetNotFoundException: Cannot find material room001.mtl for model Models/room001/room001.obj

at…



I’ve also use google with the result to try a ObjToJme FormatConverter. I’ve tried it with the result that the class FormatConverter and some other stuff wasn’t found without import-tips. I’ve included all external libraries of jMonkey… Nothing. Any Ideas?



Thanks,

Tom



INFO: If my english is not so well please fogive me i’m from Germany and 13 years old… But i’m working hardly :smiley:

@tommy5696 said:
Cannot find material room001.mtl for model Models/room001/room001.obj

The material file as well as any textures have to be in the same folder as the .obj file.
1 Like
  1. i would not export as an object

    I would just use the .blend file

    and convert it to a .j3o file by right clicking it from the SDK Project Explorer

    then load the model…


  2. your problem is that the blender exporter splits the object into a material (.mtl) and an object file (.obj) it can’t find the material file of the object you are trying to use…



    But still i wouldn’t go this route, just let the SDK convert it for you
1 Like

Okay, thanks



@normen → Yes, it’s in the same folder

@kbender88 → Okay i’ll give it a try…

Okay i’ve saved it as a Blender file and right-clicked it and pressed Convert to j3o Binary but it doesn’t work. Where is the save-path from the file?



Tom



EDIT:

Error:

Unknown data type: unit64_t

Trying to save asset that has not been loaded before or does not support saving!

Coud not locate saved file.

Damn, I wish I had started graphics programming when I was 13…

hihi i’m started programming 2009 with ten years and started with develope websites, at the end of 2011 i started to program with java and tried out java 3d but now, i think in march, i’ve started to program with jmonkey… the hardest part is that there are not so many german tutorials, so i must translate me the text - of course in my brain…

i’ve seen that error before… make sure you have closed down blender, restart the SDK, (make sure the file or folder isn’t read only??)

nope, i have closed down blender and checked the read-rights… nothing. :cry:

ooh try this, make sure there is no custom properties attach to the object in blender… if you go to the properties window (with the object selected) some where you should see some data values (looks like a bunch of AF23114rf20fj4=2) that you can delete, wish i had a better description… (maybe in the modifiers tab i’m not sure)

1 Like

No it seems the model has some other issue now, did you export it newly? Try the model import tool in the SDK, its much easier seeing in the preview if the model works or not.

Edit: Or what he said… I guess there could be options that cannot be translated properly.

@kbender88 → I’m looking

@normen → That’s the problem, it doesn’t work, i’ll get the errorcde can’t open the file or so…

@tommy5696 said:
@normen --> That's the problem, it doesn't work, i'll get the errorcde can't open the file or so...

Then why should it work in code? Thats what I mean. You can check the error output with the little warning sign in the lower right.

okay, the error is: Unknown data type: unit64_t



I’m looking in blender now…

Blender 2.61 .blend files works fine, but when I tested newer Blenders (2.62, 2.63) models did not show up.



edit: 2.62 works with nightly, I thought I tested it already and didnt see my model, but tested it again and it works.

ok then i’ll have to downgrade my blender?



Tom

-.- the blender guys keep all exporter and importer coders quite busy since 2.5, theres like four versions of everything now… 2.5, 2.60, 2.62 etc… :frowning:

okay, with blender 2.61 i’ve got one error less…



oonly the second and third one.

:? Are we supposed to keep track of your errors and number them now?

Trying to save asset that has not been loaded before or does not support saving!

Could not locate saved file.



Thats the errors