blender and my c-code

hello,

I’ve created this object
http://www.henriettenplatz.at/~sm133/b1.jpg
in blender.

But if I export the vertexes, the normals and the faces with a python script and display the object in my c-code, it looks like this
http://www.henriettenplatz.at/~sm133/b2.jpg

This is really bad and the normals are ugly.
I’ve done “recalc the normals outside” and “strg + T” becaues I show the object with the openGL cmds.
glVertexPointer
glNormalPointer
glDrawElements

Is there a better way to export the object?

I use the script
http://www.henriettenplatz.at/~sm133/c_export2.py

hope for help,
daniel

Wow, that is really bizzar looking. I am wondering. Are you scaling the mesh in OpenGL? When you call glScalef the normals are also scaled, because it affects the transformation matrix. When the normals are scaled out they are no longer of unit length, causing a more severe contrast in the lighting. I am wondering if you scaled the mesh up so much that the shading is either white or black without any shades of gray in between.

What was this project going to be used for? I would hate to sound as if I am advertizing, but a while back I wrote an exporter for Blender 2.23. It can export vertex coordinates, colors, texture coordinates, and texture information. I also wrote a C++ source file to easily load and display meshes. It automatically does the texture handling, so you don’t need to worry about any of that. The textures are loaded with DevIL (www.imagelib.org I think). Unfortunately what I wrote only works with C++, since I made use of classes and new. I also only tested it on Windows. A person named Heiko Jappe rewrote it to work with C and tested it on Linux. I haven’t tested his to see how well it works, but he says it works just fine. He is currently using it in a space game he’s making for Linux. Anyhow, you can find both at http://www.geocities.com/cheesesquid/. N3D seems to work good for everything I tried doing with it. I’m sure there are not any memory leaks and it seems efficient anough … although I will not make the claim that it is the cleanest code ever. The Python script is particularly hidious, but it works. I was planning on writing N3D version 2 sometime, but I ran into a few bumps that needs smoothing. I don’t quite know how to read Blender’s armature information.

hello,

no, I don’t scale the object.
The object is an callstation (i.e. to make voice-announcements in a airport).

thx for your posting!

daniel