Unusual model importing?

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
sardak
Posts: 0
Joined: Tue Jun 06, 2006 9:41 am

Unusual model importing?

Post by sardak »

I'm working on an importer for a custom model format. The problem I'm running into is that the model format uses a shared vertex pool and one or more sub mesh objects that contain faces that index into that shared pool. What I need to be able to do in Blender is to create a mesh containing all the vertices, and then seperate objects containing all the faces for each sub mesh. Is this even possible?

Also, the other question I have is in regards to animation. Can I import my bone and keyframe animation into Blender? I had read somewhere on these forums that it may not be possible.

If one or both of these things cannot be done, I'll have to find another modeling program. Hopefully someone can answer these questions for me. Thanks!

z3r0_d
Posts: 289
Joined: Wed Oct 16, 2002 2:38 am
Contact:

Re: Unusual model importing?

Post by z3r0_d »

sardak wrote:I'm working on an importer for a custom model format. The problem I'm running into is that the model format uses a shared vertex pool and one or more sub mesh objects that contain faces that index into that shared pool. What I need to be able to do in Blender is to create a mesh containing all the vertices, and then seperate objects containing all the faces for each sub mesh. Is this even possible?
your script would have to do it manually
sardak wrote:Also, the other question I have is in regards to animation. Can I import my bone and keyframe animation into Blender? I had read somewhere on these forums that it may not be possible.
It may not be trivial, but it ought to be possible. The armature api has changed significantly in the last couple releases, but it should be usuable now [if poorly documented and having quirks you're not used to]

sardak
Posts: 0
Joined: Tue Jun 06, 2006 9:41 am

Re: Unusual model importing?

Post by sardak »

z3r0_d wrote:your script would have to do it manually
Do what manually? The data in the file I'm importing is already set up this way, so that's not an issue. Do you mean I would have to make them all seperate meshes with their own set of vertices and then during export find and recombine them all appropriately?

The reason behind the model being set up this way is that the submeshes contain various optional parts. Some of them replace others, but share the seam(s) where they connect to other submeshes. Using the shared vertices allows them to do this without the seams becoming broken from the animation.
z3r0_d wrote:It may not be trivial, but it ought to be possible. The armature api has changed significantly in the last couple releases, but it should be usuable now [if poorly documented and having quirks you're not used to]
Quirks I can handle as long as I can get it working. Thanks for the information.

der_ton
Posts: 0
Joined: Mon Oct 20, 2003 1:02 am

Re: Unusual model importing?

Post by der_ton »

z3r0_d wrote:
sardak wrote:Also, the other question I have is in regards to animation. Can I import my bone and keyframe animation into Blender? I had read somewhere on these forums that it may not be possible.
It may not be trivial, but it ought to be possible. The armature api has changed significantly in the last couple releases, but it should be usuable now [if poorly documented and having quirks you're not used to]
I didn't find it too difficult, the new API is quite nice!
Here is the importer script I wrote, it imports animation. Maybe you can find something useful in the code.
http://blenderartists.org/forum/showthread.php?t=31285

Post Reply