Animation Subsequences

Started by Enk, August 14, 2008, 01:25:49 AM

Previous topic - Next topic

Enk

Hei!

Just have to say that jPCT is a really great engine! I just started coding in Java, but jPCT is really easy to use.

I have a question regarding subsequences with MD2-animations.

What does exactly define a subsequence? Is there like 20 keyframes per subsequence or? A


I am using Milkshape for MD2-modelling and Blender for 3DS+++ btw.

EgonOlsen

The frames in the MD2-file have names. A subsequence is defined by a bunch of keyframes with the same name (or part of it), i.e. run1,run2,run3,run4....then the next sequence is started by stand1,stand2,stand3...
We have a thread somewhere here that deals with this topic too. The problem can be that in some models (i know one), the frame names are misused to write some text into the file instead of the frame names. In that case, you have to recreate the subs yourself. The thread contains some code to do this, too.

fireside

You can build your own animations from 3ds models saved like frames, also.  That's what I do because the Blender md2 exporter just messes up my models.
click here->Fireside 7 Games<-

Enk

Ok, thanks. How are these keyframe-names set? Is it possible to set them in Milkshape/Blender (I know this is kinda off-topic). But it would be great not to have to go and set all the subsequences for all objects manually :/


EgonOlsen

MD2 has fixed offsets where which animation starts and ends. My guess is, that the exporter sets them automatically. If not, then...i don't know.

Enk

Thanks again.

Milkshape does not actually support naming frames, but blender does. I'm gonna give the ol' Blender a shot at this. :)


Enk

So if I create a MD2 with animation according to the "standard" (e.g. 0-39 = stand), then the generated subsequences will be OK? e.g. animate(anim, 4) for animating PAIN_A?

EgonOlsen

Only if the names match or if you are using the code snippet that i've posted in the other thread.