Blender 2 ogre export and error when converting to j3o

Hello!

I’m a little new to blender but I have managed to create my first character, which I have painted completely green (for testing purposes). I have UV-mapped the the green texture and exported it directly into the /Models folder in jmonkey.

I get these files in jmonkey: cube.mesh.xml, cube.material, mycube.scene, testpaint.png. I convert the cube.mesh.xml file to j3o.

I’m using blender 2.69 which comes with jmonkey, and i downloaded the blender 2 ogre 0.6.0 python script.

When I convert the model to j3o I get the following error message:

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
Unsupported texture_unit directive: scale
Unsupported texture_unit directive: colour_op

File Cube.mesh.xml saved successfully
Notified about change in AssetData properties for Cube.mesh
Cube.mesh listening for external changes on C:\Users\Johan\Documents\JMonkeyProjects2\OgreImportFromBlender\assets\Models\Human\Cube.mesh.xml@c31485a6:55c6dfc7
Set original path for Cube.mesh to Models/Human/Cube.mesh.xml
Removing asset Models/Human/Cube.mesh.xml, from cache via main asset Cube.mesh.
Removing asset Models/Human/Cube.material, from cache via main asset Cube.mesh.
Removing asset Models/Human/testpaint.png, from cache via main asset Cube.mesh.
Removing asset Common/MatDefs/Light/Lighting.j3md, from cache via main asset Cube.mesh.
File C:\Users\Johan\Documents\JMonkeyProjects2\OgreImportFromBlender\assets\Models\Human\Cube.mesh.j3o@c314c137:1c371c72[invalid] deleted, remove!
Remove file change listener for C:\Users\Johan\Documents\JMonkeyProjects2\OgreImportFromBlender\assets\Models\Human\Cube.mesh.xml@c31485a6:55c6dfc7

The funny thing is that when I add in the scene composer, it works great and the character shows up with its green texture. So are these error messages really something to worry about? Anyway I don’t like error messages even thoug everything seem to work.

Did you tried blender → j3o ?

No I don’t understand what you mean. I just used the ogre exporter in blender and converted in jmonkey myself. I also tried exporting it to a folder, then import it from jmonkey by pressing “import model”. Everything works but the error messages remains…

Try to import the blender file into the engine, it will create an j3o.

Okey so I imported to jmonkey directly form my blender workspace and choose the .blend file, it converted to j3o directly as you said, and the error messages I got before disappeared, but now I got these instead:

Unsupported modifier type: SubsurfModifierData
Null Spatial name!
Null spatial name!

and it imported the lamp and the camera from blender too :stuck_out_tongue:

So, just to have sure I understood, then engine :

  1. is able to read the blender file directly
  2. can import the blender file into j3o but list this error
  3. cant import files from ogre
    Are you using an old version of blender ? What is your blender version ?

Yes I thing it read it directly, but it imported camera and light and stuff.
But when I export throught ogre, I convert the mesh.xml file or .scene file, both of them work, but I get the error messages I listed above.

Yes it imported the blender file and it seemed to work (with those new error messages).

I just use the green import button in jmonkey to import. But I prefer exporting from blender directly into jmonkey.

I’m using blender 2.69, because I can’t find an ogre exporter which works for versions > 2.69.
https://code.google.com/p/blender2ogre/downloads/list

No need to worry about the messages either way.

Okey that is good to know!

Do you know if there will come newer versions of blender 2 ogre which works for the newer versions of blender?

Can’t say, we don’t have any word in that. I’d go the .blend->j3o route anyway.

Okey but I got this error when I do that:

Unsupported modifier type: SubsurfModifierData
Null Spatial name!
Null spatial name!

And the character is flat instead of smooth.

Apply the subsurfs before importing.

Ok thank you. But how do I do that? :stuck_out_tongue: I’m new to blender hehe

Google “bake subsurfs blender”

Thank you for all your help, I will do that! :smiley:

Try apply modifier before export: Go to modifier panel and click in button apply on modifier selected. Next, try export your model to j3o.

:slight_smile: Excuse me for English errors, my first language is portuguese.

Usually you want to “bake” “normal maps” instead of having high poly subsurfed models.
You then have a low poly or medium poly version of your 3d model with a “normal map”.
At least that’s how many games since Doom 3 made it.

If you understand the text above, you most certainly will understand where this illusion breaks -
until you have a better shading tech with tesselation, parallax shading, etc. for compensation.
At least parallax should work in the current engine, because I saw some demos, made by normen.

So, it’s quite a topic for absolute beginners…

1 Like

Just an comment about that,you can use blender 2.74 with ogre with no problem, I am using it.
@Gilzamir_Ferreira_Go mais um brasileiro ou portugues ?

Brasileiro :cactus:

Thank you, everything workes fine now! :slight_smile: