In this guide you will learn how to use the Tomb Raider 2013 Mesh Tools to create a mesh mod.
.tiger
files and extract the .drm
files that contain the assets you'd like to mod.The archive contains a DRMDumper
folder. This is a tool created by Ekey which allows to export the game's .drm
files to readable data. Drag and drop this folder to your main Tomb Raider
installation folder.
After opening the tool, click on the path contained on the orange-ish coloured field, and select the path to where your game is installed.
Click on File
> Open DRM
and select the .drm
you'd like to extract.
Once the process is done, you'll find a folder named as the file you extracted, containing all the extracted data, in the DRMDumper folder.
.drm
which has calls for different .tiger
files. For example, all of Lara's .mesh
files are stored in bigfile.000.tiger
, so you need to extract the .drm
from that .tiger
in order to get Lara's model. However, we want to inject our mod in patch.000.tiger
, and the section number used in the other bigfile will not match. So, the ultimate solution is to extract Lara's .drm
from both archives, and when using DRMDumper on the .drm
extracted from patch.000.tiger
, scroll down the asset list to check what section number the file is using. Then rename the .mesh
extracted from the .drm
from bigfile.000.tiger
to that.It's tedious, but it's the only way for this to work.
In order to actually view and modify models, you'll need Noesis and the included plugin in this archive. To install it, drop the tras.py
file in Noesis/plugins/python
.
Now you can open Noesis and double click on an extracted .mesh
file to import it and view it. You may also click on the red skeleton button on the bottom left of the viewport to view the skeleton.
Click on File
> Export
(Or right click with the cursor on the desired file and Export
) to export the model to a format importable by any 3D program you're planning to use (.fbx
is recommended). No special settings are required here, you may just change the Destination path if you want.
For this guide, I'm going to use Blender as the example. Go to File
> Import
> FBX (.fbx)
(or whatever other format you've exported the .mesh
file to) and select the .fbx
you've just created.
Now, if your intention is only to modify Lara's model without importing any new mesh, then you're ready to go ahead and make modifications to the model to your liking.
If you want to port a custom model and have created custom mesh mods for other games, then you most likely already know what to do. Import your custom model, tweak it to fit Lara's proportions and rename your custom model's bones to Lara's (or transfer the weights from Lara's model, depends what you feel most comfortable doing or what you think will look best).
Rename your custom mesh to Lara's mesh names depending on what material you would like to use (ex. If you want to use Lara's shirt material and replace the shirt textures, rename your mesh to Lara's shirt mesh name).
If you've never made custom mesh mods before, stay tuned for both a written and video tutorial I will post regarding this.
Mesh_X_X: This prefix simply states the order of the mesh, the way it is stored in the .mesh
file. These values are irrelevant for the export process, so you may do anything you want with them as long as the number of underscores remains the same. You could rename Mesh
to Pants
, for example.
dg_X: dg stands for drawgroup. Drawgroups are used by the engine to specify when and if a certain mesh is supposed to be rendered by the game, based on the situation. For example, you'll notice that Lara's right bandaid glove use drawgroup 26, to make sure that the glove is actually only rendered when the game wants it to. You can change drawgroups to your liking. Drawgroup 0 makes sure that the mesh is always rendered, no matter the situation.
mat_x: mat stands for material. This value will determine which material the mesh is going to use. 26 is not the actual ID of the material, it's only the index, based on the order of materials contained in the .mesh
file. You may change this value to swap materials.
flag_X: This is a flag that can be set on meshes. The game probably uses dozens or hundreds of these for all sorts of different purposes. However, these are the flags I know about:
pg_X: This value seems to be used to "complete" a set of a mesh (Ex. All of Lara's head meshes use pg 16). This value should be irrelevant, so you can just leave it alone.
If one of your custom meshes exceeds the vertex or skinned bones limits, don't panic: You may simply split your mesh into two or more meshes. As many as you need to make sure none of them are hitting the limits.
Once you made sure your model is respecting all the limits listed above, it's time to try exporting your model to the game's format. Select all your custom meshes in the Blender scene, plus the skeleton, then head to File
> Export
> FBX (.fbx)
. Enable Selected Objects
in the Export settings, and you can export.
With Noesis open, head to the directory containing the .fbx
file you've exported. Right click on the file, Export
, and on Main output file
, select .mesh - Tomb Raider 2013 [PC] from the dropdown, then hit
Export`.
A window will ask you to export over a TR2013 mesh file. Click on Browse
and choose the .mesh
file you want to replace. Be careful, you can't export over any other file other than the one you made your model ready for in Blender. Doing so could result in corrupted data.
The Log in the Export tab will inform you of any irregularity happening with the export process. If everything goes well, your model had no issues and has been successfully exported to the format. If something goes wrong, the Log will tell you exactly what was wrong, and you may go back to Blender to fix the issue and re-export the model.
Once the model has been exported to the format, make sure it is named the same as the original file.
The archive contains an Injector
folder. This is a tool created by aman which allows to inject custom assets into the game's .tiger
files. Drag and drop this folder to your main Tomb Raider
installation folder.
Drag and drop your custom written .mesh
file in the folder, along with the .drm
file that the original file was extracted from, inside the Injector folder.
Now double click on the .bat
file named with the .tiger
file the .drm
was stored in. For example, if the .drm
comes from patch.000.tiger
, then double click on .install_patch.bat
.
The tool will take a few seconds to inject your custom .mesh
to the .tiger
file. It can go up to taking several minutes or hours depending on how many assets you're trying to inject and how big in size they are.
If everything goes well, you will see your custom mesh working in the game. Congratulations!
When you extracted the .drm
file, you must've seen the Texture
folder included in the extracted folder with all the textures extracted in DDS
format.
The game only uses DXT1 (no alpha) and DXT5 (with alpha) textures. Before exporting your custom texture to .dds
, make sure you know what DXT format the texture you want to replace is using (You can do that by simply importing the texture in whatever photo editing software you're using and checking if it contains an alpha channel or not) (Photoshop is recommended). If the texture has an alpha channel, export to DXT5. If it doesn't, export to DXT1.
Once your texture has been exported, rename it to the same name as the texture you'd like to replace, and place it in the Injector
folder.
You may inject your texture now. You don't have to inject every single asset one at a time, you may include the .mesh
file and all the needed .dds
files in the folder, then use the .bat
file. It will automatically inject all the assets one by one.
You should be able to export over any .mesh
, so this means you can potentially mod any player, NPC, or environment model. But this wasn't heavily tested so it may not always work. If you encounter a .mesh
file which you find issues exporting over, please report.
Raq Updated 29/08/2024