Exporter for C++ OpenGL


(Waffler) #1

I started this project last summer, but school came along. I had to put it away unfinished. Anyhow it is mostly done. It just needs a good way to handle texture mapping. Also some parts could probably be rewritten better.

I would do these myself, but I don’t have any time anymore. Anyhow, I came up with a way of exporting meshes to be able to use key-frame animation with deformable meshes. To get around the lack of armature support I was going to have it so you chop your characters up into smaller parts and give them special names. The names would tell whether the part is an OpenGL display list or vertex array (arrays were going to be bendy to keep joints connected) and the matrix manipulation (push, pop, do nothing). There might have been something else, but I cannot remember at the moment. I haven’t gotten around to really starting this project yet, so some of the details are not quite worked out. I do know that it would be FAR more complex than the N3D that I have here.

Anyhow, feel free to finish it if anybody wants to. I would really like to see this finished … unless there is already something better. If there is, please tell me about it!

It’s actually very easy to use in personal projects … as long as you don’t need textures!

N3D Mesh;
Mesh.LoadMesh(“whatever.n3d”);
Mesh.DrawMesh();

That’s all!

n3d.zip - 12.2 Kb
http://www.geocities.com/cheesesquid/N3D.zip


(Waffler) #2

Oh yeah, about the exporter. Make sure the mesh is made up of ALL TRIANGLES. I don’t rememeber if I have anything checking what the faces are.

Oh yeah. My exporter was tested with Blender version 2.23. I don’t know how much changed since then.

Oh yeah … again. Sorry for the lack of comments in both Python Script, Header file, and Cpp file. I have never been much for commenting … although maybe I should really get into the habbit of using them!


(azcoder) #3

The link doesn’t seem to work…Where else could I get the script?

Thanks


(Waffler) #4

Sorry. I was sort of hoping that my post would dissapear for a while. A couple days ago I noticed that the version I uploaded was not complete. I wanted to improve some parts, but I hadn’t finished the functions. Needless to say, the exporter doesn’t run.

Also, earlier this week I started to add to the C++ loader, so texture mapping and call lists could work. I don’t expect to have these finished too soon… I hope I hadn’t caused too much trouble :-?.

If you’re patiant a working version might be done some time soon (hopefully). I have a lot of homework to do, so I’m not sure whether it would be as soon as I hope. It does seem very promising thus far, and in the future I hope to include animated mesh capabilities, which seems easy enough.

Anyhow, there isn’t much I could do at the moment for helping you obtain a working version.