Blender export "error in normalize": Remove Double

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
Martoon
Greenskin
Posts: 118
Joined: Thu May 19, 2005 7:36 pm

Blender export "error in normalize": Remove Double

Post by Martoon »

I have a model that was created in Pro-Engineer, exported as .stl, and imported into Blender. It looks great in Blender.

If I export as Ogre XML, I get 4 "error in normalize" errors, and the exported model has a few scrambled polys.

If, before exporting, I select all vertices and apply Remove Doubles with the default limit of 0.001, I still get 4 errors on export. If I raise the limit to 0.005, I get 8 errors. A limit of 0.01 gives 10 errors, and if I start to go higher than that, I get more errors than I can count, and the appearance of the model degrades noticeably.

So essentially, the more doubles I remove, the more errors I get.

Anyone have any tips on how to massage this model so I can get it to an Ogre mesh?

Thanks!
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8
Contact:

Post by haffax »

Just a guess: Is your model maybe extremely small? Try to first scale it bigger and then do the export. The exporter can later scale it back if it needs to be small.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
Martoon
Greenskin
Posts: 118
Joined: Thu May 19, 2005 7:36 pm

Post by Martoon »

haffax wrote:Just a guess: Is your model maybe extremely small? Try to first scale it bigger and then do the export. The exporter can later scale it back if it needs to be small.
Good point. The mesh isn't small (it's around 8 units in each dimension), but it is somewhat detailed, so I'm sure there are some fairly small polys in there.

I scaled the mesh by 100, then exported with a mesh scale factor of 0.01. No errors this time, but when I view the mesh in Ogre, several of the polys are messed up. Most are fine, but several polys throughout the model appear as if maybe they're indexing the wrong vertices.

Here's the model in Blender:
Image

And here it is in Ogre:
Image

So, any ideas?
User avatar
NeOmega
Halfling
Posts: 86
Joined: Mon Apr 04, 2005 2:30 am
Location: Washington State, USA

Post by NeOmega »

THis is a wild, baseless guess, but do you have subsurfacing turned on? And if so, have you used the "apply deformation" script so that the subsurf is real, before trying ot export to Ogre?
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Post by reimpell »

Martoon wrote:Most are fine, but several polys throughout the model appear as if maybe they're indexing the wrong vertices.
Does it help if you change

Code: Select all

use32bitindexes="false"
to

Code: Select all

use32bitindexes="true"
in the exported xml file before using the xmlconverter?
User avatar
Martoon
Greenskin
Posts: 118
Joined: Thu May 19, 2005 7:36 pm

Post by Martoon »

reimpell wrote:
Martoon wrote:Most are fine, but several polys throughout the model appear as if maybe they're indexing the wrong vertices.
Does it help if you change

Code: Select all

use32bitindexes="false"
to

Code: Select all

use32bitindexes="true"
in the exported xml file before using the xmlconverter?
Yup, that in fact is the problem! Looks like there's too many polys for 16 bit indexes.

So, can I be expecting a tweak for the fabulous exporter script? It's a little hairy editing a 13MB xml file each time I export. :)
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Post by reimpell »

Martoon wrote:So, can I be expecting a tweak for the fabulous exporter script?
You can either wait for soureforge's next CVS update and download revision 1.37 of the script or replace the line

Code: Select all

			f.write(" use32bitindexes="false"")
with

Code: Select all

			if (len(submesh.vertices) < 65535):
				f.write(" use32bitindexes="false"")
			else:
				f.write(" use32bitindexes="true"")
				exportLogger.logInfo("Switched to 32 bit indices for submesh "%s"." % submesh.material.name)
in your copy of the export script.
User avatar
Martoon
Greenskin
Posts: 118
Joined: Thu May 19, 2005 7:36 pm

Post by Martoon »

Thanks!
psionprime
Kobold
Posts: 32
Joined: Wed Nov 03, 2004 5:32 am

Post by psionprime »

OS X 10.4.2, Blender 2.37a, ogreexport.py 1.37

I am experiencing a similar problem with the "error in normalize". My test object is just two characters. I added the object, changed font to curve to mesh, corrected the normals, extruded then subdivided (attempt to smooth out the model a bit). The errors did not occur until I subdivided the mesh. I see no obvious defect in the renders but am curious about the errors.
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Post by reimpell »

psionprime wrote:The errors did not occur until I subdivided the mesh. I see no obvious defect in the renders but am curious about the errors.
Please read the answer to the question
Wiki wrote:Q. Why does the export log say "error in normalize
in the FAQ.
psionprime
Kobold
Posts: 32
Joined: Wed Nov 03, 2004 5:32 am

Post by psionprime »

Thanks for the reply. This is a good community. I read the FAQ, the docs and several posts before posting and none of it applies but I don't know what "small polys" means to the author. This mesh was scaled up by x100.

As I typed before, there are no apparent negative visuals so I'm not too worried about it but think it is curious and thought to post about it if the information might help anyone.
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Post by reimpell »

psionprime wrote:This mesh was scaled up by x100.

As I typed before, there are no apparent negative visuals so I'm not too worried about it
Did you try to remove doubles (maybe with a small threshold) in Blender before exporting?
Post Reply