DPM Wizard (Converting half-life models to MD3 or DPM)

2023-07-13 DarkPlaces tutorials kleskby 0 146
Author: st1x51


Let's start with the fact that DPM is a special model format for the DarkPlaces engine, which, unlike the usual MDL format, supports bone animation. This prevents the models from "floating" when the animation plays.And takes less size.

Required tools:
1. Half-Life MDL Decompiler 1.2 - Decompiler of Half Life models to smd.
2. DPM Wizard - A wonderful program written by VorteX for easy compilation of dpm models.
3. FIMG - A simple program for viewing and converting textures, written by FrikaC, actually the name probably stands for Frika Img.


Step 1. Decompile the model using Half-Life MDL Decompiler:
1. Drop the model into the Half-Life MDL Decompiler folder
2. Run decompile_all, the output is the w_syringe folder, inside the smd files, the texture in bmp format and the qc file with information about the model.

Step 2. Run the DPM Wizard and compile the model
1)Click Compile new model>Build dpm from half life1/2 smd
2) Now we are looking for our smd files. Please note that the first smd file should be a mesh, and then animations should go. To find out the name of the mesh file, go to the qc file of our decompiled model and see the following line:
//reference mesh(es)
$body "body" "syringe_low"
Therefore, syringe_low.smd is a mesh and should be first in the list, followed by idle.smd
3. Click next, in the name field we can specify the name of our model (w_syringe), in the rotate field we must write -90, in the offset field must be 0 0 0
4. Click finish, the model is ready and lies in dpmwizard\build\models

Files that are needed: the model itself w_syringe.dpm and w_syringe.dpm_0.skin
If we open the skin file, we will see the following line there
syringe,models/syringe
this means that in the models folder, there should be a syringe texture
Important note, the skin file must be next to the model.

The work on the conversion is not over yet, we still need to convert our texture to tga format, for this we use Fimg. We throw syringe.tga into the models folder, that's it.

Important notes.
1.To simplify animations, you can use a group frame (.framegroups file)
An example of such a file
1 20 30 1 // idle1 this would be self. frame = 0;
21 15 30 0 // jump this would be self.frame = 1;

The first value is the first frame, the second value is the number of frames to play (i.e. 1 frame + 20), the third value is the animation speed (frames per second), the fourth value is the loop flag, if set to 1, then the animation will repeat indefinitely .

If framegroups are used for the model, then you need to set the animation using self.frame, note that the sequences start from 0, that is, to play 1 sequence, you need to write self.frame = 0;
The problem with framegroups is that you can’t manage a single frame and you can’t set a specific action for a specific frame (or I don’t know. If I find out, I’ll write).
Important note, the .framegroups file must be placed next to the model.

2. When converting a model with a large number of textures, there may be a problem with the skin file, either this is a compiler jamb or dpmwizard.
For example, we have a player torso model that has a bunch of textures, the skin file after conversion will look like this:
pants,models/pants
pants,models/shirt
pants,models/jacket
pants,models/head
pants,models/cap

This is wrong, it should look like this:
pants,models/pants
shirt,models/shirt
jacket,models/jacket
head,models/head
cap,models/cap
The name of the texture must match the name in the path.

3. The path for the skin file can and should be changed.
For example, we have a skin file with the string
syringe,models/syringe
we can change it like this
syringe,models/items/syringe
so that there is no hierarchy of texture files

4. It happens that a model can have two mesh files, there are two solutions to this problem:
a) Connect meshes in the model editor (for example Milkshape)
b) Connect by copying everything from the gap between the triangles and the end of one smd file to another, so that we kind of get one mesh file. Cheating approach, but effective.



Tags: quake, tutorial, moddeling, DarkPlaces
Owned by kleskby#1837
Telegram
Close

You have no new notifications.


You have no new messages.