Page 1 of 1

Blender Exporter Issue

Posted: Fri Jun 03, 2005 4:51 pm
by Game_Ender
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.

Re: Blender Exporter Issue

Posted: Fri Jun 03, 2005 10:05 pm
by reimpell
Game_Ender wrote:It would be nice if you could just tell the exporter to put them in one file.
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.

Posted: Sat Jun 04, 2005 4:25 am
by walaber
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...

Missing polygons

Posted: Sat Jun 04, 2005 11:38 am
by reimpell
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.
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.

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?

I was looking for that command

Posted: Sat Jun 04, 2005 1:25 pm
by Game_Ender
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.

Posted: Tue Jun 07, 2005 5:12 am
by walaber
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! :P

Posted: Thu Jun 09, 2005 8:19 am
by walaber
okay, here's a picture. the problem definately happens when exporting using the "Game Materials" option.

Image

:arrow: here's the .BLEND

Posted: Thu Jun 09, 2005 8:23 pm
by reimpell
walaber wrote:the problem definately happens when exporting using the "Game Materials" option.
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 lines

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)
with

Code: Select all

				# game engine materials
				if face.image:
					faceMaterial = GameEngineMaterial(data, face)
in the export_mesh function of the script should remove that problem, but also the possibility to mark faces as invisible.

Posted: Fri Jun 10, 2005 3:30 am
by walaber
ok, thanks for the tip. and thanks again for the fantastic exporter!

Posted: Fri Jun 24, 2005 12:16 am
by odyssey
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. :)

Posted: Fri Jun 24, 2005 2:25 am
by walaber
no they're definately pointing out, I have "show normals" chosen in edit mode and checked them all.