Unable to convert from .scene to .j3o

I exported from Blender a car scene with many meshes to a .scene and many .mesh.xml files.



I copied these files to ‘JmeTests’ project’s ‘test’ directory, so I can see these files in the jMonkeyPlatform Alpha-4 IDE. And these files have the ogre icons.



I right click on my .scene file and choose ‘Convert to j3o binary’. I get message in the ouput:

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

and no .j3o file is generated.



I right click the .scene file and choose ‘view model’. Nothing happens and no error message.



The same behaviors happen for .obj files as well.



Please help

what blender version are you using? have you tried using the blender loader in jmp? also if possible can you upload the blender file so we may see. If not make sure that you do not have any stray vertices.

Make sure your material have the same name of your scene.

e.g.: Car.scene, Car.material or

Car.mesh.xml, Car.material



Also, make sure the models, textures and materials are in the same folder before converting to j3o.

I have Blender 2.49b.



I just tried to convert the default cube in Blender to

testCube.scene

Scene.material

Cube.mesh.xml

and then manually renamed (including within each file when referencing external files) to

Cube.scene

Cube.material

Cube.mesh.xml



Still get

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

So I think my car model should not be the cause.



The most similar post to my problem is:

http://hub.jmonkeyengine.org/groups/jmonkeyplatform/forum/topic/problem-converting-from-ogre-mesh-file/



This post suggests there is a command line converter. May I be pointed to its name and where is it?

There’s a log file in [patch]c:OgreCommandLineTools [/patch]?

Did a search in c: and C:Program Filesjmonkeyplatform

don’t find ‘OgreCommandLineTools’



I’m doing a ‘check for update’ from the ‘Help’ menu within the jMP IDE. It’s still going. Does it update to the latest nightly build so I can try the convert from .blend to .j3o feature.

yeh, or its a plugin you have to check. Atm the server router is having problems, so i dont think youll be able to download it now

darkforest said:
Did a search in c: and C:Program Filesjmonkeyplatform
don't find 'OgreCommandLineTools'
I'm doing a 'check for update' from the 'Help' menu within the jMP IDE. It's still going. Does it update to the latest nightly build so I can try the convert from .blend to .j3o feature.

@darkforest: I don't know why did you get to export your model files if there isn't ogre command line tool in your system xD.

@glaucomardano



The export from .obj model loaded into Blender to OGRExml .scene and .mesh.xml are successful. They are handled by the python scripts in Blender.



I was looking for a command line tool that converts the collection of .scene and .mesh to .j3o. Since doing it from jMP GUI fails, maybe the command line one I’d see more meaningful errors than “Trying to save asset that has not been loaded before or does not support saving!”



On this topic, how is the size of a .j3o file compared to a .3ds file?

No. The ogre command line tools is a dependency for the blender’s ogre xml importer/exporter. You have to install the python 2.6 and the ogre command line tool if you wanna the blender’s ogre xml script work fine. Peharps your exported models are broken.

darkforest said:
On this topic, how is the size of a .j3o file compared to a .3ds file?

Don't worry about it, whenever a model is loaded in a jme app it's automatically converted to a j3o object in runtime, then converting a model to j3o manually is the correct way, it gives more performance.

Hmm, my car model shows up with materials when loading the testCar.scene file I have. So the file is ok.



I’m not making progress converting testCar.scene to .j3o, which I read is a binary format.



My problem is I need a compact 3d format. The original testCar.obj file is 1.3MB. The OGRE .mesh.xml added up together is 8.6MB!



So while jMP converts the OGRE meshes to .j3o at run time, the OGRE meshes are still not realistic for the web as I have other .obj files that are 10+MB, which presumably would give me a set of OGRE meshes close to 100MB.



Ideally I wish jMP would support the .m3g mobile 3d graphics format. It’s quite compact and Java centric.



Thanks

You can convert the ogre meshes to j3o when you import them into jMP, in fact you cannot load ogre meshes at all if your project is in jMP because only the j3os are exposed