Blender Exporter Issue
- Game_Ender
- Ogre Magi
- Posts: 1269
- Joined: Wed May 25, 2005 2:31 am
- Location: Rockville, MD, USA
Blender Exporter Issue
I am using the ogrexml exporter for blender and when I export my single .blend model file (which I imported from a sinlge .obj model file) i get about 45 seperate .mesh.xml files. I have spent several hours slapping toghether a little c++ tool to paste all the files toghether, but there has to be something I am doing wrong.
Each xml file contains only one submesh.
Edit Update: I looked at the .obj file I have and it appears that the mesh is composed of a bunch of "objects". So i commented out all the seperate "g" lines in the .obj(which appear to define the seperate object names) before importing and the export finnally outputed one file. It would be nice if you could just tell the exporter to put them in one file.
Each xml file contains only one submesh.
Edit Update: I looked at the .obj file I have and it appears that the mesh is composed of a bunch of "objects". So i commented out all the seperate "g" lines in the .obj(which appear to define the seperate object names) before importing and the export finnally outputed one file. It would be nice if you could just tell the exporter to put them in one file.
-
reimpell
- OGRE Contributor

- Posts: 570
- Joined: Mon Mar 01, 2004 10:35 am
- Location: Hamburg, Germany
Re: Blender Exporter Issue
Blender can join several mesh objects into a single mesh object: Select the objects you want to join, choose "Object->Join Objects" or press the corresponding hotkey (crtl+j). More information can be found in Blender's manual.Game_Ender wrote:It would be nice if you could just tell the exporter to put them in one file.
- walaber
- OGRE Expert User

- Posts: 829
- Joined: Sat Oct 02, 2004 2:20 pm
- Location: California, USA
- Contact:
this is a bit unrelated, bit I don't think worth creating a new thread. I've noticed with the Blender exporter that exporting un-textured models (just diffuse/ambient color) often leads to missing polygons.
if I have a simple object, and export it with no texture/uv, I often experience missing polygons when loaded in Ogre (not reversed normals, but completely missing polygons). if I add a texture to the object, it is exported perfectly. anyone else experience this behavior? right now I'm using the exporter that came with the 1.0.2 source release of Ogre with Blender 2.7...
if I have a simple object, and export it with no texture/uv, I often experience missing polygons when loaded in Ogre (not reversed normals, but completely missing polygons). if I add a texture to the object, it is exported perfectly. anyone else experience this behavior? right now I'm using the exporter that came with the 1.0.2 source release of Ogre with Blender 2.7...
-
reimpell
- OGRE Contributor

- Posts: 570
- Joined: Mon Mar 01, 2004 10:35 am
- Location: Hamburg, Germany
Missing polygons
Hmm, this is strange. If the "Game Engine Materials" option is set, the exporter intentionally skips polygons if the face draw mode is set to invisible or the face is hidden in edit mode (I will remove the later case as it doesn't seem to affect the game engine display). Also, I realized that I missed the case to skip invisible faces if there is no texture assigned.walaber wrote:this is a bit unrelated, bit I don't think worth creating a new thread. I've noticed with the Blender exporter that exporting un-textured models (just diffuse/ambient color) often leads to missing polygons.
Without the "Game Engine Materials" option set, materials with the "ENV" option set are exported with "depth_func always_fail" and therefore invisible.
Unfortunately, I am not able to reproduce the bug. Can you please send me such a failing .blend file?
- Game_Ender
- Ogre Magi
- Posts: 1269
- Joined: Wed May 25, 2005 2:31 am
- Location: Rockville, MD, USA
I was looking for that command
Thank your reimpell, I had been looking through a bunch of blender tutorials just trying to get information on basic commands. I had not thought to run a search for the manual.
- walaber
- OGRE Expert User

- Posts: 829
- Joined: Sat Oct 02, 2004 2:20 pm
- Location: California, USA
- Contact:
reimpell - Sure, I'll send you a failing file... I think however it only happened when I used "Game Engine Materials"... I'll double-check, and once I have a clearer idea of the criteria that causes the problem I'll send you a .blend.
thanks again for this fantastic exporter by the way, I live by it!
thanks again for this fantastic exporter by the way, I live by it!
-
reimpell
- OGRE Contributor

- Posts: 570
- Joined: Mon Mar 01, 2004 10:35 am
- Location: Hamburg, Germany
Many thanks for the blend file and the pictures. I still can't reproduce the bug using the linux version of Blender 2.37. I guess that Blender does not properly initialize the unused face.image and face.mode or face.flag values. This could result in a false positive for the check against invisible or hide flags of these faces. It may help to use the Make TexFace Editing (F9) button, as I expect it to correctly initialize the face values. However, if my guess is right, replacing the lineswalaber wrote:the problem definately happens when exporting using the "Game Materials" option.
Code: Select all
# game engine materials
if face.image:
if (not(face.mode & Blender.NMesh.FaceModes['INVISIBLE'])
and not(face.flag & Blender.NMesh.FaceFlags['HIDE'])):
faceMaterial = GameEngineMaterial(data, face)Code: Select all
# game engine materials
if face.image:
faceMaterial = GameEngineMaterial(data, face)- walaber
- OGRE Expert User

- Posts: 829
- Joined: Sat Oct 02, 2004 2:20 pm
- Location: California, USA
- Contact:
-
odyssey
- Gnoblar
- Posts: 13
- Joined: Thu Mar 17, 2005 6:44 pm
Umm, okay ..
..this may be too off base already but, are you certain all your Normals are facing OUT ?
To make certain, select your object and go into edit mode; select all vertices and press Ctrl + N. At the prompt, confirm that you do in fact want all your Normals facing out.
It may not be a dropped poly after-all.
..this may be too off base already but, are you certain all your Normals are facing OUT ?
To make certain, select your object and go into edit mode; select all vertices and press Ctrl + N. At the prompt, confirm that you do in fact want all your Normals facing out.
It may not be a dropped poly after-all.
- walaber
- OGRE Expert User

- Posts: 829
- Joined: Sat Oct 02, 2004 2:20 pm
- Location: California, USA
- Contact:

