Skip to main content

Asset Pipeline Guides

The engine loads binary asset formats generated by the Python tools under tools/ in the repo. Each format has its own converter script and its own file layout, documented in the pages below.

Meshes​

Export from Blender with blender_obj_skeleton_exporter.py, then convert to a .MESHBIN with obj-to-meshbin.py:

python3 madnight_engine/tools/obj-to-meshbin.py "../assets/Lake Dock/map.obj" cdrom/assets/map.meshbin 128

You provide the input .obj, the output destination file, and the texture size.

Textures​

Create a texture in GIMP and export as jpg/png (256x256 max, must be square). Convert it with ImageMagick into something the PSX will understand:

convert "../assets/Lake Dock/atlas.png" -depth 8 -colors 256 "../assets/Lake Dock/atlas_tim.png"

Then create a .TIM file with tim_creator.py, specifying the input png, output TIM, and number of colours (256 max):

python3 ./madnight_engine/tools/tim_creator.py -o cdrom/assets/map.tim --quantize 256 "../assets/Lake Dock/atlas_tim.png"

Alternative to Python​

If you don't have Python and/or ImageMagick installed then there is an alternative that you can use which is the web version of TIM Tool. It allows you to import images, lay them out where you desire, and then export them all as .TIM files.

When using this version you can apply complete transparency to your image and it will automatically apply the right settings to the image to make it transparent in your game. Anything that is pure black will be replaced to a dark grey (0x0421), or colour of your choosing.

Animations​

Load an unskinned animation into Blender and export it with blender_animbin.py to produce a basic .ANIMBIN file. The script still needs work for things like marker creation.

File format specs​