First export the object from Blender.
Then run OgreCommandTool to generate LOD for the model.
Next import the generated xml file into JME => convert to J3O. DO NOT USE advanced conversion.
Open the J3O to set the various materials… if necessary.
With these steps, the J3O model has up to 10 LOD levels. They can be selected/viewed from the scene composer, but the displayed number of vertices/faces is not impacted by the chosen LOD. Nor the wireframe grid…
If the advanced converter fails (that is the command line tool created by the inventors of this file format) then I suggest you should blame the model file and its creator first, namely the blender exporter plugin.
@yang71 said:
Yes you're probably right. I don't blame on JME importer. Just wanted to share my finding, since it seems quite desired this late.
I really don’t know why it often fails in JME, while it works with the Ogre commandLine (except when setting the distance… why ?).
Similrarly, why do LODs are not exported by blender, while it says it do it so is a mystery to me.
Yeah, I don’t want to project the blame actually but your attempts to problem-solve I am the guy who doesn’t like workarounds but rather waits and works on the actual issues
First export the object from Blender.
Then run OgreCommandTool to generate LOD for the model.
Next import the generated xml file into JME => convert to J3O. DO NOT USE advanced conversion.
Open the J3O to set the various materials… if necessary.
With these steps, the J3O model has up to 10 LOD levels. They can be selected/viewed from the scene composer, but the displayed number of vertices/faces is not impacted by the chosen LOD. Nor the wireframe grid…
1- export to Ogre? I get a .scene model and a .material (no .xml)
2- How can I run the OgreCommandTool to generate LOD for the model? the only way I know is the avanced binary conversion in JMP. Am I missing another tool?
cool so I did it and generated the xml file, but when I try to import it into JMP I get an error and if I drag and drop and then try to convert to j3o I get Error Converting AssetNotFoundException
1- export from blender using Ogre (I get 2 files: .mesh.xml and .material).
2- I run the Ogrecommandtool on the mesh.xml in order to create the .mesh file. ( i know weird)
3-Then Rerun the command on the .mesh to create the .mesh.xml that has the LOD files in it now.
4- import into JMP however the object on the preview looks trimmed (half of it is missing)!!!
PROBLEM 1: Whether .j3o or .mesh.xml they both load but the model is missing half of it!!! what am I missing?
PROBLEM 2: The model is loaded as a node, I need it to be loaded as a geometry!!! How can I fix that?
@nightwolf911 said:
PROBLEM 2: The model is loaded as a node, I need it to be loaded as a geometry!!!! How can I fix that?
You don’t need it as a geometry. Fix your code to work with nodes instead. You can never count on a loaded model being a Geometry since it may have to be split up to make the final model, multiple materials, etc.
one more question and i’m out I noticed when I convert to Ogre I get a deformed object. At the beginning I thought it was a clipping issue but then it turned out that I am getting the whole object but more like squeezed in. Any idea why this would happen? It looks perfect in Blender but this happens when I import it to JMP.
Example: say I have a shelf with a certain height, in JMP I get the same shelf but the height is reduced
That’s because, as most newcomers to JME, you didn’t read the manual… not precisely at least.
You have to apply scale and rotation before exporting your object. If you use armature, it must have the same origin as the object. To be sure of that, I simply apply translation to both the object and its armature.
When you check the properties of your object in blender, it must show no rotation nor scale.
I always imported the blender directly into jMonkey and it got converted to j3o which in return I just used it and it worked fine… I am not sure what properties are you talking about…
Also this is new (after updated JMP) when I try to use the j3o object in the scene using this code:
I get that it cannot convert a node to a geometry. but looking in the scene explorer I can only see a node and a mesh. why is the mesh considered a node?
For the casting, them importer often build a deep tree of nodes. So your geometry may no be the child, but the child of the child of the child…
Just open the J3O in the scene composer…
@all, the binary command line converter is integrated in the SDK and you can invoke it by using “advanced import” for ogrexml or by just importing .mesh files like normal.