How to animate using a 'model series'

Hello, I’ve written a program that creates abstract tube shapes that move around. I added the ability to write out .obj files which I then import into blender to render nicely. Currently the .obj files are a single static mesh.

Now I want to import an animation of the mesh, that is… my program will write a series of meshes to the .obj file and when imported into blender I want to have one object that uses the appropriate mesh for each frame. I’ve looked into shape keys, they might work but I can’t tell and it’d need to be automated. A python script can do this right? That’s a steep hill for me though; I’ve peeked at the API, what module would I manipulate? Maybe a different file format can specify mesh sequences; that seems an easy and brute force way to transfer animations I’d expected it to be out there.

The pics at the top of my blog are the shapes I’m talking about (http://trochoid.blogspot.com/); imagine them wiggling, that’s what I’m trying to do.
------ Thanks -Laz

The RVK1 to to RVk2 script (under Mesh in the script menu), might do what you want. All of the obj meshes have to have the same # of verts AFAIK.

But, if you’re program is already generating the different obj’s … which in effect is the animation, you might want to just modify one of the import scripts to “batch” the process.

Otherwise, the “normal” way would be to export the starting mesh, and then animate it in blender using either shape keys or an armature.

Mike

Yes, I looked at rvk1->rvk2 and it does what I want. I did a manual test by writing out 8 .obj files, imported each of them then rvk1->rvk2ed meshes {1234567} into mesh 0. Hide all the other objects and you can step through the shape keys to see the animation I’m after.

Now I need to set it up so each frame shows the appropriate shape key, this is what I’m working on. I somehow made it move but I need to read the docs on shape keys, having trouble.

I’ve also collected some python intros, the blender script API, .obj import script and a script from someone I think is doing the same thing http://jmsoler.free.fr/util/blenderfile/py/rvk1torvk2v240.py. Lots of work to do!

Thanks Mike for the rvk hint, exactly what I needed. -Laz

…The animation it made is here http://www.dailymotion.com/qqazxxsw/video/3673091. There’s a jerk at the beginning but as I don’t understand how shape key animation works (yet) I couldn’t fix it. Also, it’s moving 10 frames between each shape key while I want each frame to be another key. In the image I don’t understand why the action editor is empty, is this messed up; and I’d expected the ipo curves to vary instead of being constant.

Laz,

Ok, what version of Blender are you using ?

The IPO curves won’t vary, until you make a change in either the shape key slider on the Action editor (you might have to expand the window to see the sliders), or use the Shape key sliders in the Edit buttons / Shapes panel (same end effect) and on different frames.

To make the shapes change every frame, should just be a matter of changing the frame counter by 1 and changing each shape keys’ setting from 0-1 or vice versa
.

If you describe exactly what you did, it might help and/or post the blend file (you’ll have to use an external site to do so).

Mike