Blender Painkiller MPK geometry plugins
Warning
Blender constraints: the current max ID names size is 63 usable bytes (for example, a mesh name). This limit should be increated in Blender 5. It means that some Painkiller mesh names could be cut during the map import; it's the usual case with the maps from Painkiller Resurrection but can happen in any PainEngine/NecroEngine game. Since some mesh names might contain specific key words for the engine, like "barrier", you need to pay attention to those cut names and rename them accordingly after the import.
Warning
Painkiller only supports meshes that have 2 UV map texture channels (colormap and lightmap). If a mesh have more channels, the plugin will use only 2 of them.
Blender add-on that imports and exports Painkiller (PC game 2004) MPK geometry files.
PainEditor is not capable of editing geometry files for Painkiller. It's mostly designed to create gameplay and atmosphere.
In order to edit an MPK geometry files for Painkiller, you need a 3D editor like Autodesk Maya, Autodesk 3ds Max, or Blender. This guide is aimed at Blender.
The plugin was created by dilettante. Tested on Blender 4.2 LTS.
Note
The guide was edited on May 04, 2025 and is actual at the time of writing. Some information may be outdated by the time you read it.
The main plugin repository.
Backup repository.
Installation via GUI
-
Download the latest plugin version from GitHub. Pick the latest relese.
-
Either use the prepared ZIP archive from the GitHub release assets or create a ZIP archive that should contain the
io_scene_mpk
folder and the plugin python scripts inside: -
In Blender, open
Edit
>Preferences
and switch to theAdd-ons
section. -
Click on the drop down menu at the upper right, select
Install from Disk...
, and choose the ZIP archive with the plugin. -
Search for the add-on on the list: enter
Painkiller MPK format
and tick it to enable.
Manual Installation
-
Download the latest plugin version from GitHub.
-
Put the unpacked
io_scene_mpk
folder with the python scripts toC:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons
:C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons\io_scene_mpk\__init__.py C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons\io_scene_mpk\export_mpk.py C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons\io_scene_mpk\import_mpk.py
Alternative path:
Import
Once the addon has been installed, you will be able to import Painkiller MPK geometry.
-
Extract a PKM or a PAK archive with the map geometry and textures.
Note
The texture folder usually has the same naming as the geometry file name. For example,
Maps.pak/4x02_Babel.mpk
geometry has corresponding textures inTextures.pak/Levels/4x02_Babel
. -
Create a new folder and copy the MPK geometry file and all the map textures to that folder.
-
In Blender, delete the default scene: in the upper right of your screen, right-click on
Collection
>Delete Hierarchy
. -
Make sure you deleted everytihng from the Blender default scene collection. Save the new defaults so that Blender default example objects won't interfere with your imported geometry. Because you always import on top of something, the workspace should be clean. Go to
File
>Defaults
>Save Startup File
. -
Import Painkiller MPK geometry file via
File
>Import
>Painkiller World Mesh (.mpk)
.Notes
- Merge verticies is enabled by default and recommended. It will join all the closest separated geometry.
-
Deselect all objects
Alt - A
. -
Click
Shading
>Display render preview
in Blender. Now you will be able to see the map with textures and lightmaps. -
Find the collectoin with the
__zone__
name and click on theeye
to disable it from Viewport. This collection includes portals (do not confuse it with teleports), antiportals, and zones. -
If the map is too big to observe, you need to increase the
View End
distance in the 3D View area'sProperties
N
menu >View
tab. Consult the official Blender documentation. -
Navigate with the fly/walk mode
Shift-~
and use the mouse scroll wheel to control the speed. If you are new to Blender, start learning from navigation basics. There are plenty of tutorials online.
Export
-
Export Painkiller MPK geometry file via
File
>Export
>Painkiller World Mesh (.mpk)
.Notes
- Choose the export mode. Default is only recommended for testing maps to reduce export time. Optimize is what you need to choose for final maps - it'll reduce the .mpk size.
- You can choose whether to export All, Only selected, or Only visible objects to .mpk.
Prepare map for PainEditor
A simple Painkiller map has the following structure (check inside default Painkiller PKM and PAK files as examples):
../Painkiller/Data/Levels/Mapname/
../Painkiller/Data/Maps/mapname.mpk
../Painkiller/Data/Textures/Levels/mapname/
Another example:
.
├── Levels
│ └── CTF_Ruins
├── Maps
│ ├── MOPPCode
│ └── ruins_mini.mpk
└── Textures
├── Levels
└── Skies
You need to create those folders manually when you prepare a map.
-
Put the
untitled.mpk
into thePainkiller/Data/Maps
folder. -
The
../Data/Maps/MOPPCode
folder is generated automatically each time you load your map in the game. Make sure you don't have any HavokMOPPCode
of the similar.mpk
file generated before. If so, delete thePainkiller/Data/Maps/MOPPCode/untitled.mpk
folder. Also, make sure that you don't have any duplicates of your complete PKM map with the same MPK name inside in theData
directory or there will be geometry conflicts.Warning
You always need to remove the automatically generated
MOPPCode
each time you create a new geometry within the same file name before running a map.MOPPCode
can lead to unexpected results when it does not match the version of the.mpk
file.It is safe to remove the whole
../Data/Maps/MOPPCode
directory before testing a map. -
Open
Painkiller/Data/Levels/DM_Untitled/DM_Untitled.CLevel
with a notepad and change the following line to match your new geometry file: -
The folder with the textures should match the name of the MPK file:
Painkiller/Data/Textures/Levels/untitled
. If it does not match, you won't see textures on your map. -
Run your map in PainEditor to check if the map configuration was correct. Put all the items, gameplay, effects via the PainEditor.
-
Pack your map properly to distribute it.
Uninstall plugins via GUI
-
In Blender, open
Edit
>Preferences
and switch to theAdd-ons
section. -
Search for the
Painkiller MPK format
plugin. -
Click on the dropdown menu and remove the plugin by clicking
Remove
.
Uninstall plugins manual
Remove the following files from the Blender folder:
C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons\io_scene_mpk\__init__.py
C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons\io_scene_mpk\export_mpk.py
C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons\io_scene_mpk\import_mpk.py
Alternative path: