project-navigation
Personal tools

Author Topic: Character animations  (Read 11186 times)

Offline Origin

  • Rookie
  • ***
  • Posts: 59
    • View Profile
Character animations
« on: September 06, 2010, 01:35:34 pm »
Hi all. I decided to start on some animations before continuing on with the female variations of the new models, but I have a few questions that i hope someone can answer.


I cant figure out how the game determines the point where the model stands on. Is this in relation to the models pivot?

and about model scale, I imported .bip and .fig and assumed that the scale would then be correct for use ingame. is this correct?

Is the tag_floor needed? It doesnt seem to be present by default after importing .bip and .fig though the other tags are there. Should i create one?


Actually I guess I should just try hitting export and see what happens ingame. :P

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Character animations
« Reply #1 on: September 06, 2010, 02:16:39 pm »
Quote
I cant figure out how the game determines the point where the model stands on. Is this in relation to the models pivot?

the short answer is yes - you should maybe try to import an existing biped max file. and yes - the size does matter ;)

Quote
and about model scale, I imported .bip and .fig and assumed that the scale would then be correct for use ingame. is this correct?

yes - the fig and bip were exported from existing max sources from data_source - so they should match (though i have never tried it myself)

Quote
Is the tag_floor needed? It doesnt seem to be present by default after importing .bip and .fig though the other tags are there. Should i create one?

See here. the tag_floor is the ground tag that is used to determine the positions of the other tags.

Offline Origin

  • Rookie
  • ***
  • Posts: 59
    • View Profile
Re: Character animations
« Reply #2 on: September 06, 2010, 06:06:10 pm »
trying to start the game after exporting model seems to crash the game. Im not sure what settings i should be using when exporting to md2.

In the Skin box i just put .body is that right?

should i export a specific number of frames?

Is there a specific fps the animation should run at?

what are the "body.mdx" files for?

edit: Deleted the body.mdx file and now it works...

edit2: solved all of the above.

yes
no
no
dont know, but doesnt seem to be needed.
« Last Edit: September 09, 2010, 03:37:19 pm by Origin »

Offline Origin

  • Rookie
  • ***
  • Posts: 59
    • View Profile
Re: Character animations
« Reply #3 on: September 11, 2010, 07:05:16 pm »
Alright im making pretty good progress by now, only missing grenade, item, dual, melee, and death anims.

again there are a few odd things I have noticed.

The old models seem to have a transition animation from standing to crouched. I cant find this in the .anm file though, so my models instantly snap from standing to crouched. Anyone know whats up with that?

Another thing is that weapon fire effects dont come from the weapon, they seem to come from slightly behind the model.
I thought this might be a missing tag (tag_muzzle) but this tag seems to be only needed for weapons, and no change happens.

I really need to know what the .mdx was for, found some info on these boards mentioning them being compiled from the .md2.
I still couldnt find out exactly what they do or how to compile them. I guess this might be related to above issues?




Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Character animations
« Reply #4 on: September 11, 2010, 07:26:37 pm »
Hey Origin.

Great to see you taking on the animation issue also !

Afair the .mdx files are generated to get the tangents & normals of the md2s pre-calculated, but mattn can tell you more for sure. I just remember that there were some problems with normalmapping, lighting & advanced rendering techniques of the md2 models, so arisian & mattn developed the ufomodel tool which magically precalculated the normals & tangents with some kind of rotation matrix & stored this info in the mdx files, but afaik the mdx files have nothing to do with the animation of the models, you can read more about that here:

https://sourceforge.net/tracker/?func=detail&aid=2990488&group_id=157793&atid=805244

The tool to generate the mdx files is ufomodel.

Offline Origin

  • Rookie
  • ***
  • Posts: 59
    • View Profile
Re: Character animations
« Reply #5 on: September 11, 2010, 08:50:47 pm »
Thanks mate. The link seems to be for some glsl patch though? edit: oh comments :P

Where can i get ufomodel?
« Last Edit: September 11, 2010, 09:06:54 pm by Origin »

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Character animations
« Reply #6 on: September 11, 2010, 09:36:11 pm »
You can find the c:b project file ufomodel.cbp in ufoai\build\projects - You can compile it with Code::Blocks (source:src\tools\ufomodel\ufomodel.c) - It will generate ufomodel.exe in ufoai root.

I hope this info helps somehow.
But normally all the md2 files are processed & the mdx files generated during a standard build, so it should be enough to just add your md2s to base/models & start a full compilation to generate the mdx files for your models also...

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Character animations
« Reply #7 on: September 11, 2010, 09:43:10 pm »
@ least this was the case when using svn & Muton's tool, but I am not sure how all of this worx with the new git system as I am not really familiar with it yet, but I am quite sure Mattn can answer all your questions...

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Character animations
« Reply #8 on: September 11, 2010, 09:45:44 pm »
If you need the mdx file just upload the md2 files here & I will try to generate it for you  ;)

Offline Origin

  • Rookie
  • ***
  • Posts: 59
    • View Profile
Re: Character animations
« Reply #9 on: September 11, 2010, 10:16:42 pm »
I hope to finish the remaining animations some time tomorrow, will upload all then :D

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Character animations
« Reply #10 on: September 12, 2010, 12:02:18 am »
The old models seem to have a transition animation from standing to crouched. I cant find this in the .anm file though, so my models instantly snap from standing to crouched. Anyone know whats up with that?

this is lerped (linear interpolation of the vertices)

which remind me - it should be cool if you could do a stand up animation for the three death end positions. because we are able to revitalize an actor when it was stunned)

Quote
Another thing is that weapon fire effects dont come from the weapon, they seem to come from slightly behind the model.
I thought this might be a missing tag (tag_muzzle) but this tag seems to be only needed for weapons, and no change happens.

that should only be related to tag_muzzle for the weapon - maybe it's translated from the relative position of the actor hand tag positions, but i don't think so.


Offline Origin

  • Rookie
  • ***
  • Posts: 59
    • View Profile
Re: Character animations
« Reply #11 on: September 12, 2010, 01:33:54 am »

this is lerped (linear interpolation of the vertices)


Alright, I dont know how to get it back though :(


which remind me - it should be cool if you could do a stand up animation for the three death end positions. because we are able to revitalize an actor when it was stunned)


yea should be doable.

I really dont understand the weapons thing. as you said it should only be related to weapons, and i havent changed any of them.

Offline Origin

  • Rookie
  • ***
  • Posts: 59
    • View Profile
Re: Character animations
« Reply #12 on: September 13, 2010, 01:55:22 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.

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Character animations
« Reply #13 on: September 13, 2010, 03:07:23 pm »
Great, looking forward to it!

Offline Crystan

  • Project Artist
  • Captain
  • ***
  • Posts: 572
  • UFO:AI Lead Sound Artist
    • View Profile
    • http://crysea.cr.funpic.de/
Re: Character animations
« Reply #14 on: September 13, 2010, 03:38:38 pm »
md2's can only contain 512 frames

That really sucks. :/