Material File Naming Convention

From The DarkMod Wiki
Revision as of 03:45, 20 October 2018 by Petike (talk | contribs) (minor category edit)
(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.

Use the test_ Prefix for Test Shaders / WIP / Personal Stuff

For shaders used in test maps or for personal experiments, use files with the test_ prefix. An example is test_baddcog.mtr which contains all the WIP shaders by Baddcog.

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.

See also