X.mesh.xml Causing problems

I have a simple blender file containing only the default box (for testing purposes). Using the latest blender to ogre xml exporter, I created a .material, .mesh, .scene, and .mesh.xml file.



Blender 2.63

Ogre exporter 0.5.8



After renaming the files like so:

box.material

box.mesh

box.scene

Cube.mesh.xml



I open the SDK and attempt to view box.scene (not in code, just the SDK model viewer) And get this error:


Unsupported pass directive: alpha_to_coverage
Unsupported pass directive: colour_write
Unsupported pass directive: depth_check
Unsupported pass directive: depth_func
Unsupported pass directive: depth_write
Unsupported pass directive: illumination_stage
Unsupported pass directive: light_clip_planes
Unsupported pass directive: light_scissor
Unsupported pass directive: normalise_normals
Unsupported pass directive: polygon_mode
Unsupported pass directive: scene_blend_op
Unsupported pass directive: shading
Unsupported pass directive: transparent_sorting
Loaded material definition: Phong Lighting
Child (Cube) attached to this node (Scenes/Box/box-scene_node)


I found that if I remove Cube.mesh.xml, the scene loads, but the box is colored red, even if I apply textures in blender. Here is the output without Cube.mesh.xml:

Unsupported pass directive: alpha_to_coverage
Unsupported pass directive: colour_write
Unsupported pass directive: depth_check
Unsupported pass directive: depth_func
Unsupported pass directive: depth_write
Unsupported pass directive: illumination_stage
Unsupported pass directive: light_clip_planes
Unsupported pass directive: light_scissor
Unsupported pass directive: normalise_normals
Unsupported pass directive: polygon_mode
Unsupported pass directive: scene_blend_op
Unsupported pass directive: shading
Unsupported pass directive: transparent_sorting
Loaded material definition: Phong Lighting
Child (Cube) attached to this node (Scenes/Box/box-scene_node)
Cannot locate Scenes/Box/Cube.mesh.xml for scene Scenes/Box/box.scene
Loaded material definition: Unshaded
Child (placeholder) attached to this node (Cube-entity)
Child (Cube-entity) attached to this node (Cube)
Tools Node (Node): All children removed.
Root Node (Node): All children removed.
Child (Scenes/Box/box-scene_node) attached to this node (Root Node)


So from I can tell, there is something wrong with my mesh.xml file. I have uploaded it here:
Box.zip

Any help is appreciated!

The “Unsupported” stuff is not an error. The model loaded fine actually, can you see it?

You added a light? Else you won’t see anything.

It does load, but only if I get rid of the Cube.mesh.xml file. When the file is there, I get a popup stating a general error, and the openGL window doesn’t even open.



Without the xml file, textures (and probably other things) wont work.

Again, did you turn on the light? You need to do that in both the SDK viewer and also add a light to your applications scene in code. Also, convert your ogre files to j3o, ogre files will not be included in the distribution. Check out the manual as well.

I also tried using something besides the default blender cube, and without the x.mesh.xml file, blender only shows a cube, instead of what I designed. The cube is again colored red.

l

@normen said:

Again, did you turn on the light? You need to do that in both the SDK viewer and also add a light to your applications scene in code. Also, convert your ogre files to j3o, ogre files will not be included in the distribution. Check out the manual as well.




Alright, I'll try that.

I can’t add a light, because box.scene wont even load, or convert to a j3o. I was able to load the .blend file, and I was able to see the mesh and light in the scene explorer, but nothing appeared in the editor.





Overview of whats happening:



Using the ogre XML export from Blender, with the test.mesh.xml file



Using the ogre XML export from Blender, without the test.mesh.xml file



Converting the .blend file to j3o



Hopefully this clears things up.

You seem to have no material whatsoever on your model…?

Maybe this helps:

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:external:blender

No, there is a material:

http://imgur.com/NjHVd

And there you have your problem. Please read the link.

Alright. I followed this (tutorial on the previous link) tutorial, preforming each step exactly.



After step 7), I am stuck with the error:


Child (PlayerPos) attached to this node (Scenes/Test/Export/basic-scene_node)
Child (Floor) attached to this node (Scenes/Test/Export/basic-scene_node)
Cannot locate Material.001 for model Scenes/Test/Export/Plane.mesh.xml
Loaded material definition: Unshaded
Trying to write asset failed, asset data null!
Import failed?
Could not locate saved file.


After trying to convert the .scene to a j3o.

Here are the files at step 7

Now, if there is something obvious I'm missing, please tell me, or at least point me in the right direction.

You renamed some files. Your scene file references “Material.material” yet you have no such file in your zip, only “basic.material”.



Besides that, I was able to load your model just fine.

So does that mean I should rename one of the files to ‘Material.material’, or am I missing a file entirely? I tried the former (changing ‘Material.001. material’ to ‘Material.material’), then attempted to view the .scene in the SDK, but that caused an error. I was also unable to convert the .scene to a j3o.

Re-export your model, then load the dotScene file in jMP.

@Momoko_Fan said:
Re-export your model, then load the dotScene file in jMP.


How will that help? That's exactly what I've been doing the whole time.

You may need to wait for stable SDK release … I don’t think its out yet. There were some fixes to model loading recently but they are only available in the nightly right now, which is what I used to test your model.

I’m on nightly too. Can you send me a zip of some files you made in blender, that you can open in the jMonkey SDK?

You can’t be on nightly because SDK isn’t using nightly, and you cannot make SDK use nightly for model importing.

Well what does it mean to be on nightly? You said you were able to import the model in nightly, so obviously it’s working for you. As far as I know, I enabled nightly by going to tools>plugins>settings and checking the box for nightly, then updating.