Why is data in Blender stored the way it is?
Posted: Wed Jan 07, 2009 1:38 am
In the last couple of weeks I've begun to write and make use of my own Python export script. The thing that has shocked me the most is the way that data is stored by Blender. Blender uses OpenGL but does not seem to conform much to OpenGL defaults. OpenGL is right-handed while Blender is left-handed. By default, OpenGL recognizes faces as front faces when the vertices have been fed in counter clock-wise order while Blender recognizes the exact opposite. Blender even goes so far as having backwards U coordinates.
I have come to all of my conclusions based on the modifications I have had to make to my export script to get my meshes to look exactly the same way in my OpenGL applications as they do in Blender. Either I am going to have to keep making peculiar modifications to my export script or I am going to have to adopt the way Blender stores it's data, which would make me an oddity among innumerable coders who do not expect front faces to be in clock-wise order.
I have a hard time believing that I am the only one that is uneasy about these oddities. I cut & pasted my code into the post, but it looks horrible on this forum, so I took it out. I would just appreciate knowing how the Blender developers or other Blender users feel about this.
I have come to all of my conclusions based on the modifications I have had to make to my export script to get my meshes to look exactly the same way in my OpenGL applications as they do in Blender. Either I am going to have to keep making peculiar modifications to my export script or I am going to have to adopt the way Blender stores it's data, which would make me an oddity among innumerable coders who do not expect front faces to be in clock-wise order.
I have a hard time believing that I am the only one that is uneasy about these oddities. I cut & pasted my code into the post, but it looks horrible on this forum, so I took it out. I would just appreciate knowing how the Blender developers or other Blender users feel about this.