Author Topic: Animation Subsequences  (Read 6288 times)

Offline Enk

  • byte
  • *
  • Posts: 22
    • View Profile
Animation Subsequences
« on: August 14, 2008, 01:25:49 am »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Animation Subsequences
« Reply #1 on: August 14, 2008, 07:20:58 am »
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.

Offline fireside

  • double
  • *****
  • Posts: 607
    • View Profile
Re: Animation Subsequences
« Reply #2 on: August 14, 2008, 08:10:23 am »
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<-

Offline Enk

  • byte
  • *
  • Posts: 22
    • View Profile
Re: Animation Subsequences
« Reply #3 on: August 14, 2008, 11:15:05 am »
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 :/


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Animation Subsequences
« Reply #4 on: August 14, 2008, 12:13:35 pm »
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.

Offline Enk

  • byte
  • *
  • Posts: 22
    • View Profile
Re: Animation Subsequences
« Reply #5 on: August 14, 2008, 12:30:49 pm »
Thanks again.

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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Animation Subsequences
« Reply #6 on: August 14, 2008, 12:54:44 pm »

Offline Enk

  • byte
  • *
  • Posts: 22
    • View Profile
Re: Animation Subsequences
« Reply #7 on: August 14, 2008, 02:00:39 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Animation Subsequences
« Reply #8 on: August 14, 2008, 02:36:19 pm »
Only if the names match or if you are using the code snippet that i've posted in the other thread.