project-navigation
Personal tools

Author Topic: Character animations  (Read 11187 times)

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Character animations
« Reply #15 on: September 13, 2010, 07:25:56 pm »
Mostly done now, still need 2 death and the panic animation. However I realized too late that md2's can only contain 512 frames, so i nee to rescale and tweak the whole thing so will take a bit longer.

Maybe we could & should use the also supported .md3 file format for the new models ?

Afaik md3s can contain 1024 frames.

I want to note here, that this maybe could produce new problems, so I do not know if it is a good idea, especially because ALL of our current models are md2s, maybe tweaking & rescaling is the better way to go...

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Character animations
« Reply #16 on: September 13, 2010, 07:56:15 pm »
According to the spec, the limitation of 512 looks artificial (a Quake2 limitation, not a md2 limitation). Then, if the exporter avoid more than 512 frames and if we have the code some where, i think there is way to fix it.

Please what modeler do you use, and what exporter do you use. I know blender use a python exporter, then we can edit it.
« Last Edit: September 13, 2010, 08:11:56 pm by bayo »

Offline Origin

  • Rookie
  • ***
  • Posts: 59
    • View Profile
Re: Character animations
« Reply #17 on: September 14, 2010, 11:23:04 am »
I use max with the md2 export plugin found on Svn (I think :P), The md2s export just fine but the game crashes giving the error that modelname.md2 contains too many or no frames.
I did a quick search on on md2 limitations and found the number 512 mentioned as maximum frames, I assumed this to be correct.

I havent done any trial and error to see if i can get more frames in though, I should try exporting 513 and see what happens.

the frame number I tried exporting when i first noticed this was 800 something.
Its not a huge problem though, as the engine seems to interpolate between frames, when running animations at lower framerates with a lower number of frames.

I ran most animations at 30 fps during my initial tests, and that seems to be the cause of the missing interpolation I mentioned in a earlier post. (I guess the interpolation was still there, just going really fast?)

scaling down the animation times and running at 10 fps, makes the game interpolate. Just need to tweak the key frames a bit, as a few things can get lost as I scale the time.

Im not sure md3 supports animations in the engine.

edit: btw I'm also adding wakeup animations as requested. (im not sure if I should use a generic one for all wakeups though or one for each type of death.)
« Last Edit: September 14, 2010, 11:25:48 am by Origin »

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Character animations
« Reply #18 on: September 14, 2010, 11:35:08 am »
we can also extend that limit if you need more keyframes

we don't support animation yet for md3 or dpm (bones)

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Character animations
« Reply #19 on: September 14, 2010, 05:59:22 pm »
Please upload somewhere the model with 800 frames. We can check if the exporter do the job well, or if it export no frames. And it will be more easy to fix the game with it. Mattn mail? :D

MD2 format use an int (2^32 values) for the number of frames. Maybe it also exists a limitation according to the size of the content (memory for all vertex)*(number of frames). If i am not wrong, while your file is smaller than 4GiB its ok. Then, 1000 frames looks very small.

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Character animations
« Reply #20 on: September 14, 2010, 06:05:07 pm »
Quote
(im not sure if I should use a generic one for all wakeups though or one for each type of death.)
I understand, 1 wakup per death animation, cause the body dont have the same position.

But i would prefer a stand up actor for the stunned animation.