Modifying Sauer Player Models - Guide
Installing the tools
First and foremost, you need to download Blender (version 2.79) and an add-on to it that will allow you to import models and animations with the .md5 format and export them.
Download Blender 2.79https://download.blender.org/release/Blender2.79/Download MD5 Importer & Exporter (thanks @pink-vertex)
https://github.com/pink-vertex/blender_addon_md5/archive/Release.zipTo install an addon simply open the "
User Preferences" menu (
CTRL + ALT + U) and go to the "
Add-ons" tab, then follow the steps:
- "Install Add-on from File" select the Zip (addon) you downloaded above.
- Search for "md5" in the search box for addons.
- Enable the addon checkbox.
- Save the settings and close the window.
Attaching a new object to the character
Now you have everything ready to import any character in .md5, to do that just go to the
File -> Import menu and select
MD5 Mesh (.md5mesh) , navigate to your Sauerbraten models folder (
sauerbraten/packages/models) and choose the folder of one of the characters (inky, snoutx10k, mrfixit or captaincannon), the file you should import will appear as
charactername.md5mesh.
If all went well, the character should look like this:
Our goal will be to put Suzanne, mascot of Blender, in the head of Captain Cannon, just add it by going to
Add -> Mesh -> Monkey, and then move it to the position you prefer.
(ignore captain cannon's textures, it's just for a better visualization)
Since these are optional steps, follow the links below if you want to know how to move, rotate, scale and texturize objects in Blender:
Move, Rotate, Scalehttps://docs.blender.org/manual/en/latest/modeling/meshes/editing/basics/move_rotate_scale.html
UV Map Basicshttps://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/UV_Map_BasicsNow we need to attach our object to the "bone" of the character's head, so we will add an "
Armature" Modifier to the monkey, just go to the tool icon and select it.
After adding an Armature, click on the "
Object:" text field and choose MD5 (MD5 is Captain Cannon's armature name), then click the icon to the right of the tool icon to open the "
Object data" menu.
Now you need to define which character bone our monkey should follow. To do so, change from "
Object mode" to "
Edit mode" and on the "
Vertex Groups" tab, you will click the "
+" visual button and rename the "Group" text for the bone name, in which case it will be "Head". By clicking on "
Assign" all parts of our model will follow the character's "Head" bone.
Your modification is almost done, but before exporting back to .md5 you need to open your object's UV Map, ie define how the texture will interact with the faces of the model (our monkey). This is quite simple to do automatically, although the result is not very pleasant... Still in "Edit mode" press the
U key and choose "
Smart UV Project" and you're done, this step is necessary even if you don't want to add any texture to the model.
Now you need to go back to "
Object mode" and apply the Position, Rotation and Scale of the monkey, press
CTRL + A and choose "
Location", press it again and choose "
Rotation & Scale".
Now you can export, select the whole character (including your object, make sure to select the armature last, otherwise the export button will not be available). Just replace the .md5mesh that you had imported before.
And good job, you just made your first mod!
Texturing things
This yellowish color with white text means that the model has no texture, and to add it you will need to make some modifications to the md5.cfg file of the character you have chosen. If you are already a Blender lover, you probably already know how to make and organize textures in your model, so in this topic we will cover how to configure these textures in Sauerbraten.
A .cfg file is a simple text file that contains several commands, this text file can be executed manually by the player or automatically by the game. You will find your character's .cfg file in the same folder as his .md5mesh is.
Below is an example of the Captain Cannon cfg file, it is responsible for loading the model and applying the textures, as well as running the other files that configure the animations and etc.
sauerbraten/packages/models/captaincannon/md5.cfg
1 md5load "captaincannon.md5mesh" captaincannon 70
2 exec "packages/models/captaincannon/ragdoll.cfg"
3 md5tag Weapon tag_weapon
4 md5skin head "<dds>cc_head.png" "<dds>cc_head_mask.png"
5 md5bumpmap head "<dds>cc_head_normals.png"
6 md5skin body "<dds>cc_body.png" "<dds>cc_body_mask.png"
7 md5bumpmap body "<dds>cc_body_normals.png"
8 exec "packages/models/captaincannon/anims.cfg"
9 mdlscale 1225
10 mdlspec 60
You only need two things: The image to use as the texture and the name of the mesh to apply the texture to.
How to get the name of the mesh? It's simple, go back to Blender, select your object and see in the lower left corner what its name is, you can also modify it by pressing
N and going to the "
Item" tab.
You will probably have your own texture but for now we will steal a texture that is already in sauer, so we use
md5dir to navigate to any other folder inside
sauerbraten/packages/models.
Here we are accessing the folder
sauerbraten/packages/models/tentus/chains (
md5dir) and applying the
skin.jpg texture on the Suzanne mesh (
md5skin).
1 md5load "captaincannon.md5mesh" captaincannon 70
2 exec "packages/models/captaincannon/ragdoll.cfg"
3 md5tag Weapon tag_weapon
4 md5skin head "<dds>cc_head.png" "<dds>cc_head_mask.png"
5 md5bumpmap head "<dds>cc_head_normals.png"
6 md5skin body "<dds>cc_body.png" "<dds>cc_body_mask.png"
7 md5bumpmap body "<dds>cc_body_normals.png"
8 exec "packages/models/captaincannon/anims.cfg"
9 mdlscale 1225
10 mdlspec 60
11
12 md5dir tentus/chains
13 md5skin Suzanne skin.jpg
When you use
md5dir, every md5 command below it will use the dir you chose as reference.
And you're done, the monkey should look like this:
Yeah it's horrible, but you got it...
It's all a matter of practice and creativity
Common errors:Export button is unselectable = Means you didn't select character armature last.
AttributeError BMElem[key] Invalid key... = You didn't open your model's UV map.
I hope this post was helpful, below are some interesting links:
Sauerbraten MD5 Model Referencehttp://sauerbraten.org/docs/models.html#md5_formatBlender Weight Paintinghttps://www.youtube.com/watch?v=Tl4qTgwQwYwBlender Texture Mappinghttps://www.youtube.com/watch?v=eiDrRa6JvQ0Blender Rigginghttps://www.youtube.com/watch?v=Y0btZFIeGtYHow to animate a mapmodel in Sauerbraten (portuguese)http://www.cubebr.com/2018/10/como-animar-mapmodels-do-sauerbraten.htmlas our dear Suicizer would say: be sure to check the licenses before modifying any model!