Page 1 of 1
Blender export "error in normalize": Remove Double
Posted: Wed Aug 31, 2005 6:28 pm
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!
Posted: Wed Aug 31, 2005 6:39 pm
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.
Posted: Wed Aug 31, 2005 7:36 pm
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:
And here it is in Ogre:
So, any ideas?
Posted: Wed Aug 31, 2005 9:16 pm
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?
Posted: Wed Aug 31, 2005 9:44 pm
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
to
in the exported xml file before using the xmlconverter?
Posted: Wed Aug 31, 2005 10:04 pm
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
to
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.

Posted: Wed Aug 31, 2005 11:26 pm
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.
Posted: Wed Aug 31, 2005 11:39 pm
by Martoon
Thanks!
Posted: Fri Sep 02, 2005 3:08 pm
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.
Posted: Fri Sep 02, 2005 5:09 pm
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.
Posted: Sat Sep 03, 2005 12:23 am
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.
Posted: Sat Sep 03, 2005 1:25 pm
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?