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:
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
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.
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 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.
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.
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.
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.
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.