Material File Naming Convention: Difference between revisions
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... |
No edit summary |
||
Line 1: | Line 1: | ||
All darkmod shaders go into the <tt>darkmod/materials</tt> folder within .mtr files. For these files, the following simple rules apply: | 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_''' | == 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'''. | 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_''' | == 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'''. | 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_''' | == 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. | 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 == | == 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. | 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 == | == Exceptions to the Rules == |
Revision as of 19:26, 22 August 2008
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.