3dsmax: exporting vertex animations

how do you do it? when you specify to export an animation in the exporter it asks what bones you want to export, how do you export vertex animations?

In theory, panda does support morph animations (which is essentially vertex animation). In practice, I’ve not gotten it to work, with any modeling program.

In principle, all you should have to do is create an animation in max and then export it. As for whether it works or not — I don’t know. I suspect not.

Note that a morph animation is one kind of vertex animation, but there are other kinds of vertex animations that are not morphs. Panda doesn’t support vertex animation in general, just the restricted case of vertex animations that are describable as morphs.

David

Wait… so what kind of vertex animation can’t you express as a series of morph targets?

Well, in principle I guess you could define 3 different morph targets for each vertex–one for each of the X, Y, and Z unit vectors–and in this way you could in fact describe arbitrary vertex animation using morph targets. But that would be pretty extreme, and not particularly efficient.

Alternatively, I guess you could define every frame of your arbitary vertex animation as a separate morph target, and then fully enable each morph target one at a time (while disabling all of the other ones) in the animation channels. Again, not a particularly efficient approach, but probably better than the above idea.

A morph is defined as a linear interpolation of vertices between two different targets. So a single morph can animate the vertices only as a group, and only linearly between the base shape and the morph target. Each additional morph adds a new dimension of control, but still you have to predefine all of your morph targets ahead of time.

David

Alternatively, I guess you could define every frame of your arbitary vertex animation as a separate morph target, and then fully enable each morph target one at a time (while disabling all of the other ones) in the animation channels. Again, not a particularly efficient approach, but probably better than the above idea.

Yes, that was what I was thinking of. But what’s inefficient about it (aside from the inherent inefficiency of vertex animation)?

Actually, you’ve overspecified it. You wouldn’t have to fully enable one target while disabling all others. Instead, you’d set the base position for all vertices to (0,0,0). Then, each morph target would contain the actual vertex positions for a single frame of animation. Then, by setting the morph weights in the animation channels so that they add up to 1.0, you could blend between positions.

The only efficiency hacks that I think might be needed would be a compact way to store vertex coordinates, and a guarantee that any morph target whose weight is zero is not processed.

That’s true; that would work, and it wouldn’t be so bad. But each frame it would have to add 0 + (morph value) for each vertex to compute the vertex position, which requires touching each vertex individually. I think a much better vertex animation implementation would simply copy the entire vertex table into place each frame. Also, it would have to walk through the list of unused targets each frame, even just to decide that their weight value is zero and so they shouldn’t be used. If you have hundreds of “frames”, that can be unnecessarily expensive in itself.

But you’re right, I shouldn’t have been so dismissive–it’s certainly possible to represent arbitrary vertex animation in this way, and it might actually work fairly well.

David