Page 1 of 1

Mafia 2 animations

Posted: Wed Apr 15, 2020 11:18 am
by daemon1
Mafia 2 animation tool.
Works for both cutscenes and ingame animations.

Usage:
mafia2_anim <frameresource> <anim1> [anim2] ... [animN]

<frameresource> is a required file extracted from SDS by ExSDS tool, or any other tool for game archives.
<anim1>...[animN] are .animation2 files, at least one file is required

Tool will take skeleton for a particular character from <frameresource> and merge all the following animations onto it. This is needed because most ingame animations are split into 2 parts (top & bottom). Dont try merging animations that are not supposed to work together.

Image Image

Example cutscene video with 2 characters:
https://www.youtube.com/watch?v=3bCVsRjUGEk

Notes:
1. game is using linear interpolation, so after loading SMD, set it in your 3d editor, otherwise animations may not look correctly (especially for root motion, leading to "moonwalking" effects)
2. some animations have a few keys that don't correspond to keysframes. These will be merged to same keysframes.
3. some animations contain additional bones (like weapon attaches) which will not be exported, and print warnings.
4. additive animations (those with "DIFF" in their name etc) will be added to rest-pose on export, which will allow to watch them, but in most cases they will not look correct, because they are supposed to be added to other poses or animations in a different ways.
5. notification event lists will be output to console (sounds like footsteps and other events)

Re: Mafia 2 animations

Posted: Thu Apr 23, 2020 4:25 am
by gamer1977
Please explain an example

Re: Mafia 2 animations

Posted: Thu Apr 23, 2020 8:28 am
by daemon1
Example 1.

We have 000BDB0A.FrameResource extracted from vitod1.sds package (with Vito model)
Also we have sc_vito_lift_button.Animation2 cutscene animation file from distillery level.
The command to export this animation will be:

mafia2_anim 000BDB0A.FrameResource sc_vito_lift_button.Animation2

Example 2.

We have 000BDB0A.FrameResource extracted from vitod1.sds package (with Vito model)
Also we have animation files 00-CF_WALK_L-A.Animation2 & 00-CF_WALK_L-B.Animation2 from basic_anim.sds
These 2 animation files are lower and upper body animation parts which are designed to play together.
The command to export this animation will be:

mafia2_anim 000BDB0A.FrameResource 00-CF_WALK_L-A.Animation2 00-CF_WALK_L-B.Animation2

Re: Mafia 2 animations

Posted: Thu Apr 23, 2020 11:36 am
by gamer1977
Thanks

Re: Mafia 2 animations

Posted: Mon Feb 08, 2021 8:13 am
by gamer1977
daemon1 wrote:
Thu Apr 23, 2020 8:28 am
Example 1.

We have 000BDB0A.FrameResource extracted from vitod1.sds package (with Vito model)
Also we have sc_vito_lift_button.Animation2 cutscene animation file from distillery level.
The command to export this animation will be:

mafia2_anim 000BDB0A.FrameResource sc_vito_lift_button.Animation2

Example 2.

We have 000BDB0A.FrameResource extracted from vitod1.sds package (with Vito model)
Also we have animation files 00-CF_WALK_L-A.Animation2 & 00-CF_WALK_L-B.Animation2 from basic_anim.sds
These 2 animation files are lower and upper body animation parts which are designed to play together.
The command to export this animation will be:

mafia2_anim 000BDB0A.FrameResource 00-CF_WALK_L-A.Animation2 00-CF_WALK_L-B.Animation2
hello where is the model ?

Re: Mafia 2 animations

Posted: Mon Feb 08, 2021 8:17 am
by gamer1977
gamer1977 wrote:
Mon Feb 08, 2021 8:13 am
daemon1 wrote:
Thu Apr 23, 2020 8:28 am
Example 1.

We have 000BDB0A.FrameResource extracted from vitod1.sds package (with Vito model)
Also we have sc_vito_lift_button.Animation2 cutscene animation file from distillery level.
The command to export this animation will be:

mafia2_anim 000BDB0A.FrameResource sc_vito_lift_button.Animation2

Example 2.

We have 000BDB0A.FrameResource extracted from vitod1.sds package (with Vito model)
Also we have animation files 00-CF_WALK_L-A.Animation2 & 00-CF_WALK_L-B.Animation2 from basic_anim.sds
These 2 animation files are lower and upper body animation parts which are designed to play together.
The command to export this animation will be:

mafia2_anim 000BDB0A.FrameResource 00-CF_WALK_L-A.Animation2 00-CF_WALK_L-B.Animation2
hello where is the model ?