Material File Naming Convention

From The DarkMod Wiki
Revision as of 19:23, 22 August 2008 by Greebo (talk | contribs) (New page: All darkmod shaders go into the <tt>darkmod/materials</tt> folder within .mtr files. For these files, the following simple rules apply: == Use the '''tdm_''' prefix for map textures == Al...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

All darkmod shaders go into the darkmod/materials folder within .mtr files. For these files, the following simple rules apply:

Use the tdm_ prefix for map textures

All shaders meant to be directly used in the map editor are grouped after their position in the Texture Folder Structure. For example, the texture with the shader name textures/darkmod/stone/sculpted/engraved_tile_star should go into the file tdm_stone_sculpted.mtr.

Use the tdm_models_ prefix for model shaders

All shaders primarily used in models go into files which reflect the Model Folder Structure. The shaders used for the model models/darkmod/decorative/hammer_stone_large.ase should go into the file tdm_models_decorative.mtr.

Use the tdm_maps_ prefix for map-specific shaders

All other shaders geared to a specific map should go into files using the tdm_maps_*.mtr convention. Example: tdm_maps_gathers.mtr.

Special Shaders / System Shaders

There are lots of shaders used for special effects, inventory, HUD and whatnot. The files of these shaders don't have a special naming convention yet, so for now they go into files following the generic tdm_*.mtr convention.

Exceptions to the Rules

The file naming convention cannot be followed for material files which are meant to override the ones in the Doom 3 base/ folder. An example is the darkmod/materials/lights.mtr file, which needs to be called this way. The D3 file system will then favour darkmod's file over the one in the base package, but the prerequisite is that the filenames and folder locations match exactly.