This tutorials explains you, how to handle Max Payne files with MilkShape 3D or better. Max Payne model files have the extension KF2, KFS and SKD. The KFS files contain the materials with textures and meshes. SKD files contain the skin data, which is used to connect the meshes with the skeleton. Then finally, the KF2 files contain animations, poses and other stuff, which we don't use at the moment.
The Max Payne support in MilkShape 3D is capable of importing and exporting KF2, KFS, and SKD files. This means you can import/export meshes, poses and animations.
You will need the following stuff to continue:
In Max Payne all data is packed into a big archive. The model files are in the x_data.ras, which is in your "./Max Payne" directory. Extract all data from that archive. See the documentation of RasMaker.exe to know how it works.
After you've extracted the data from the x_data.ras, you are ready to import some models. Basically, there are 4 steps to import a Max Payne model with 1 animation. Note, that all 4 steps need to be done in the right order, so don't skip one step. After that, it should look like that (be sure your joint size is about 0.025!):
Open MilkShape 3D and import for example Mr. Payne. It's ".\Data\database\skins\max_payne\Payne_Max_L0.KFS". You can do this with the menu command "File->Import->Max Payne KF2/KFS/SKD...". You will notice, that you can choose *.kf2, *.kfs and *.skd file types.
In a second step you will need to import the according SKD file, which will add the vertex->bone assignments and bone names. For Mr. Payne this is ".\Data\database\skins\max_payne\Payne_Max_L0.SKD".
Then you will notice, that all joints (bones) are placed at the origin. This is because all joints have no hierarchy and no positions yet. We can avoid this by importing a default pose. For Mr. Payne we then import ".\Data\database\skeletons\default_skeleton\anim\Widepose.kf2". Now you should see the skeleton.
After that it is time to import an animation. For example ".\Data\database\skeletons\default_skeleton\anim\2_DodgeBackwardLeft.kf2".
Ok, that's it. You have noticed, that all model files are in the ".\Data\database\skins" directory and all animations are in the ".\Data\database\skeletons\default_skeleton\anim" directory. If you want to import weapons, then you will find them in the ".\Data\database\weapons" directory. Always import the lod0 or levelitem files.
You can export with the menu command "File->Export->Max Payne KF2/KFS+SKD...". After you choose the export filename, the following dialog appears:
You can choose, what you want to export. KFS/SKD is used for player models or other models and KF2 is used for poses or animations or models like weapons, projectiles, etc... MilkShape 3D will warn you, if there are invalid material assignments or invalid vertex - bone assignments.
As we already know, we should use KFS for player models. Since Max Payne somehow shares the skeletons and animations, we just need to create a custom mesh and textures. This will be ok for models with a human shape, because it will save a lot of memory.
First create a new directory under the ".\Data\database\skins" directory, for example ".\Test".
Then import an existing model as descriped above. Remove the meshes and save the skeleton as a "skeleton.ms3d". You can reuse this skeleton for future models. At the end of this tutorial you will find a ZIP archive, which includes some testmodels from that tutorial.
Create your mesh or import it from somewhere else and assign it to the skeleton. The Max Payne units seem to be in centimeter, so you probably need to scale the model down. You have to make sure, that all vertices are assigned to a bone and all groups have a material assigned.
Now export it as described in the section above. I'm not sure if this is important, but the model files always have the same format: "%s_lod0.kfs", where you replace the %s with the directory name. So we should export our model to "Test_lod0.kfs".
In the ".\Data\database\skins directory you will find a lot .txt files. These files are scripts or something. Just copy a small .txt file, for example "punchinello_lisa.txt" and rename it to "Test.txt". Then replace the *.KFS and *.SKD files with your new ones.
You can have a look at other .txt files and then you will see, what's possible. You can add weapons to the model and so on...but this is not covered in that small tutorial.
The last step is, that you simple recreate your x_data.ras (be sure to make a backup first), or even better: create a new .mpm (Max Payne Mod) file, which is just a renamed .ras file. Later in the game you can switch your player models with PGDN, PGUP, if you are in developer mode.
Ok, I hope this small tutorial helps you to start! If you have other questions, then check one of the many fan sites.
Here is a ZIP file, which contains the file from that tutorials: MaxPayneMS3DTutorialFiles.zip (570 Kb).
Finally I want to thank Remedy Entertainment for their support and their cool game!
- Mete