This article describes conventions for creating a model resource pack. It uses the Volcano mobj j_heretic for examples.
Let's look at how jHRP.pk3 is organized. There are the “Defs/jHeretic/Models” and the “Data/jHeretic/Models” directories. In the Data directory, each object has its own subdirectory that holds the data files (e.g. “Volcano”). In the Defs directory, there is a DED with the same name (e.g. “Volcano.ded”). The matching names are necessary because the PK3s are built by a script that uses the names to find out which files belong to each package.
[Defs] [jHeretic] [Models] [Decor] Volcano.ded
[Data] [jHeretic] [Models] [Decor] [Volcano] *.md2 *.pcx
Note that there can only be one DED file for each object: “Volcano.ded” matches the “Volcano” directory.
If you are creating a model for an object that doesn't yet have a directory, don't worry too much about choosing the correct directory names. If the name you choose is unsuitable for some reason, I will change it to something more appropriate before I run the package builder script.
Write the DED file for the object. The DED should contain the Model defs and any associated extra defs. Avoid defining any new States because they may compromise netgame compatibility. If you need to animate an object that has only one State, use the “df_worldtime” flag. To see an example of how “df_worldtime” should be used, see the definitions for jHeretic's Wight.
If you include any particle generators in the DED, remember to use “gnf_modelonly” if the generator is not applicable to the original sprite.
Note that the ModelPath directive should not be used unless you have a special reason for it. In the jHRP model files are specified using paths relative to “Data/jHeretic/Models”. For example, to use “Shiny.pcx” from the “Data/jHeretic/Models/Common” directory, you would set the file name to “Common/Shiny.pcx” in the DED file.
Prepare the MD2/DMD models and skin images. You should use the following md2tool options to prepare a model:
md2tool -gl -renorm -weldtc (modelfile)
This will rebuild the model's GL commands, calculate new surface normals, and remove any unused texture coordinates. The effect of these options depends on how the model was originally produced, but it never hurts to issue them.
When doing replacements for the original objects, it's important to get the model skin colors right. View the model in the game and compare it to the original object. Then apply gamma correction, color balance, hue adjustment, etc. if necessary. The texreset console command can be used to make Doomsday reload all textures, so there is no need to exit the game when tweaking the skin.
If you want to include any credits information with the model, make it a comment in the beginning of the DED file.
Here are some tips for making the finishing touches to your model:
Choose the correct directory name for the object. The directories form a hierarchy. For example, pickup items go under one directory and decorative objects under another. Additional subdirectories are used when there are many similar objects, like keys. For examples, see jHRP and jXRP.
Make a post on the forums that you have created a pack and would like to get it added to the RP.