Thread: Panzerfaust's Big Book of Converting

Results 1 to 3 of 3
  1. #1
    Dogg don't piss on me I just invented photoshop ! Panzerfaust's Avatar
    Join Date
    Mar 2002
    Location
    Achewood
    Posts
    2,483

    Panzerfaust's Big Book of Converting

    This is...

    THE BIG BOOK OF CONVERTING
    Note: I have no intention of adding any more tutorials to this. If someone would like to take this and update it and whatever, just ask. Some stuff may or may not work as this was written 1.5 to 2 years ago.

    INDEX
    -REQUIRED TOOLS (BBC_req_tools)
    -BASICS (BBC_basics)
    -COMPILING AND DECOMPILING MODELS BY Ambient.Impact (BBC_DC_AI)
    -QC FILE BREAKDOWN UPDATED AND REDONE BY Fury_161 (BBC_QC_F161)
    -TEXTURE EDITING (BBC_tex_edit)
    -HALF-LIFE PLAYER MODEL TO GRUNT CONVERSION (BBC_PM_HG)
    -THE SPECIALIST PLAYER MODELS TO SVEN COOP AND BACK AGAIN (BBC_TS_SC)
    -HACKING MODELS (BBC_HM)
    -SWITCHING WEAPONS (BBC_SW)
    -CHANGING HANDS (BBC_CH)


    REQUIRED TOOLS Code: BBC_req_tools

    1. Milkshape 3D (You can get it here:

    http://www.swissquake.ch/chumbalum-soft/ms...d/download.html NOTE: YOU MUST HAVE A REGISTERED COPY OF MS3D TO SAVE STUFF!)

    2. HL Model Viewer (Here: http://www.swissquake.ch/chumbalum-soft/hl...lmv/index.html)

    3. Some sort of Texture Editor (PSP, Paint, and APS will do.)

    BASICS Code: BBC_basics

    A MDL file decompiles into several file types.

    1. QC File

    The blueprint for the MDL, it tells the compiler what to do. Use Notepad to edit QC files.

    2. SMD Reference File

    This is the actual model, decompiled. It contains the mesh and skeleton of the model, no animations. (Usually has “reference” or “ref” in the name.)

    3. SMD Sequence File

    These are the animations; I’m really not an animator so I’ll leave these alone. Sequence files tell the skeleton structure in the Reference file what to do; it pulls the mesh along for the ride.

    4. BMP File

    These are the textures for the MDL, a texture editing guide will be farther down. (For APS, sorry, don’t use PSP or Paint.)

    COMPILING AND DECOMPILING MODELSBy Ambient.Impact Code: BBC_DC_AI

    I think most of you are using a method of compiling/decompiling models that isn't as easy and pain-free as it should be. I originally found out about this method on dodhq.net, but the site seems to have gone down recently, so I will post it here.

    I only use studiomdl to compile nowadays, and I have my system set up so that I can simply right click a .qc file, and choose "Compile". I also have my system set up to do a similar thing with .mdl files, so that I can easily decompile them. I've attached all of the necessary files, so no bitching please.

    Step one

    Unzip the contents of the zip file somewhere, doesn't really matter where, as long as you can find the location again.

    Step two

    Open each .bat file in Notepad or some other text editor, and change the path to whatever folder you unzipped to. (e.g. C:\Compile\studiomdl.exe)

    Step three

    Go to the Folder Options Control Panel (Start->Settings->Control Panel->Folder Options). (NOTE: You must have .qc and .mdl files associated with something before you can go any further. (e.g. .mdl files should be associated with HLMV) Go to the File Types tab, and scroll down to find the MDL File Type entry, and select it. Now click on Advanced, near the bottom. A dialogue box called "Edit File Type" should come up. This is where you can configure what will show up when you right-click this file type. Click on "New...", and a dialogue box will pop up. Under "Action", type in "Decompile" (you could type in "****", this part doesn't make any difference, it's just what will be displayed in the right-click menu for this command). Next, click the "Browse..." button next to "Application used to perform this action:", and browse to the mdldec.bat file, and select it. Now click "Ok" to close the "New Action" dialogue box, and click "Ok" again in the "Edit File Type" box to close that too. You should now be able to decompile an .mdl file by right-clicking it. Test it out on an .mdl at this point to make sure it works properly. If that works, continue on to do the same thing with .qc files. Find the QC File Type entry, click "Advanced", and add two separate actions to whatever is already there. The first one should be named something like "Compile Model", and should point to "studiomdl.bat". The second should be called "Compile Sprite", and point to "sprgen.bat". .qc files are used for compiling both models and sprites, so this little addition allows you to compile both, just make sure you click the proper one (Model or Sprite).

    This works on my operating system (Windows XP Pro), but I've tested it successfully on Windows 2000 as well, and it should work with older versions of Windows.

    Let me (Ambient.Impact) know if this doesn't work.

    TEXTURE EDITING Code: BBC_tex_edit

    First off, I don't know how to make a bmp file 256 colors in PSP, this will be for APS only, unless someone sends me the info on PSP.

    After your done editing a texture, you need to make it 256 colors so that it will work in HL.

    On the top menu, go to Image>Mode>Indexed Color. Once in there, change Palette to Local (Selective).

    Then change Color to 256.

    H00ray! You've made a texture able to work in HL! Now you have to import it onto the model. Open HLMV and import your

    model, go to the textures tab on the bottom. Use the side menu to select the texture you want to replace. (NOTE: The textures HAVE

    TO BE THE SAME SIZE!
    )

    Then click the import button, and browse to your texture. Click save and your skin will now be on the model!

    Congrats! Click save and save your model!

    HALF-LIFE PLAYER MODEL TO GRUNT CONVERSION Code: BBC_PM_HG

    Rating:Nubbish
    Special Requirements: None

    This section of the tutorial will cover converting a standard player model (in this case, Gordon has graciously volunteered.) to HGrunt, those annoying soldiers with MP5s.

    To start off, create a folder named GordonGrunt in your Conversions folder. After that, open up HL Model Viewer, and go to

    File/Open PAK File. Select pak0.pak from the Half-Life/valve directory, and go to the models tab. Open it, and scroll down

    to Player.mdl. Double click on it, and Gordon should open up in the main window.

    Click the Texture tab on the bottom bar, and then click on Save Model. Browse to the folder we

    created earlier, GordonGrunt. Save the file with the name Gordon.

    NOTE: A file by the name of GordonT.mdl will also appear in your GordonGrun folder. This is normal, it contains the external

    textures.


    Now that we have Gordon, we need the Grunts, in HLMV, scroll up the list to HGrunt.MDL. Open it, and go to Textures/Save

    Model. Save it as Grunt in the GordonGrunt folder.

    NOTE: Along with the Grunt MDL file, several will follow by the name of Grunt01,02,03 etc. This is normal, those are the sequences,

    they can be stored externally. Gruntt MDL is the external textures. I will tell you how to store them like this later on.


    Now that we have both the model files, we need to open up Milkshape. Do so, and go to the Tools menu on the top. Select Kratisto's

    HL MDL Decompiler 1.01
    off the list, and click the ... button next to the text box. Browse to the

    GordonGrunt folder and select Gordon.

    All we want from Gordon is his BMP Textures andReference SMDs, so uncheck the QC

    Script
    and Sequence SMDs boxes. Click Ok and you should see a text box with file paths scrolling, it's decompiling

    the requested parts that you selected earlier.

    At the top of the decompiled list, it should have:

    REFERENCE:\GordonGrunt\player_template_biped(No_Head)1.smd
    REFERENCE:\GordonGrunt\player_template_biped(Gordon_Head)1.smd
    REFERENCE:\GordonGrunt\player_template_biped(Helmet)1.smd


    Player_template_biped(No_Head)1 is Gordon's body, (Gordon_Head)1 and (Helmet)1

    are the heads, Gordon has a sub-head because that's the model it shows if you do not have another player's player model online.

    Now to decompile the Grunts, you'll need everything decompiled with this one, so go to Kratisto's HL MDL Decompiler again,

    and select the Grunt model.

    Again, you should see the filepaths and stuff listed, this time it takes longer because it has to decompile the animations.

    The references in this case are:

    Reference:\GordonGrunt\gruntbody.smd
    Reference:\GordonGrunt\grunthead.smd
    Reference:\GordonGrunt\commanderhead.smd
    Reference:\GordonGrunt\shotgunhead.smd
    Reference:\GordonGrunt\m203_head.smd
    Reference:\GordonGrunt\gunreference.smd
    Reference:\GordonGrunt\gunreference(shotgun).smd


    Gruntbody is the actual grunt body, no head, Grunthead, Commanderhead, Shotgunhead and M203_head are the heads.

    Now, with the references, it should have decompiled a QC file. Open the file with Notepad (NOTE: You can also open the QC file by

    going to (in MS3D) Tools>Half-Life>Edit QC File
    ), and scroll down to:

    Code:
    // reference meshes
    $body body "gruntbody"
    
    $bodygroup heads
    {
    studio "grunthead"
    studio "commanderhead"
    studio "shotgunhead"
    studio "m203_head"
    }
    $bodygroup weapons
    {
    studio "gunreference"
    studio "gunreference(shotgun)"
    blank
    }
    copy this, and highlight all of that text in the QC File:

    Code:
    // reference meshes
    $body body "player_template_biped(No_Head)1"
    
    $bodygroup heads
    {
    studio "player_template_biped(Gordon_Head)1"
    studio "player_template_biped(Helmet)1"
    }
    $bodygroup weapons
    {
    studio "gunreference"
    studio "gunreference(shotgun)"
    blank
    }
    Delete the // skinfamilies group, we don't need those.

    Scroll up in the QC file to $modelname "hgrunt.mdl" and change the hgrunt to GordonGrunt.

    Save the file, and (in MS3D) fo to Tools>Half-Life>Compile QC File. You should see all this gibberish and stuff fly by on the bottom text

    screen (NOTE: If you get an error during the compile, post it here and I'll tell you what to do.)

    There! It's done! Browse to your GordonGrunt folder and open GordonGrunt.mdl in HLMV. (NOTE: The arms are off the model because the

    hgrunt animations are for the hgrunt skeleton, and it's larger than gordon's skeleton. Play around with the model a bit and see if you can re-attach Gordon's arms.
    )

    (SIDE NOTE: If you want to make the textures external, add the line "$externaltextures" to your QC File. If it doesn't work, drop

    the s.
    )

    Congrats on your first conversion! I'll post more tutorials here soon

    (NOTE: If a mod uses regular HL models (ie: SvenCoop, Scientist Slaughterhouse, Opposing Force, Blue Shift, Point of View, Azure

    Sheep, etc.) the models will most likely be easy to convert, or already work without modifications.
    )

    I'm attaching Fury's QC breakdown, as its too large for a post (over 12000 characters, if you must know).
    Attached Files Attached Files
    Last edited by Panzerfaust; 22-07-2006 at 04:55 PM.
    Liquid Banjo

  2. #2
    Dogg don't piss on me I just invented photoshop ! Panzerfaust's Avatar
    Join Date
    Mar 2002
    Location
    Achewood
    Posts
    2,483

    Re: Panzerfaust's Big Book of Converting

    THE SPECIALIST PLAYER MODELS TO SVEN COOP AND BACK AGAIN Code: BBC_TS_SC

    Rating: Nubbish
    Special Requirements: Fluent in Italian

    It's ok if you're not fluent in italian, it's still easy to convert TS player models.

    First, pick a TS model, any will do.

    Now, the bones are named in italian, it was a bit bothersome for me when I converted the Trigun models. Go into MS3D and decompile a TS model,

    import the reference and click the Joints tab.

    Not to fear, I have the complete bone name list next to me.

    Code:
    ITALIAN           ENGLISH
    
    Bacino                      Pelvis
    SX Coscia                  L Thigh
    SX Polpaccio              L Calf
    SX Piede                   L Foot
    DX Coscia                  R Thigh
    DX Polpaccio              R Calf
    DX Piede                   R Foot
    Dorso                        Spine
    Dorso1                      "      "1
    Dorso2                      "      "2
    Dorso3                      "      "3
    Collo                         Neck
    Testa                        Head
    SX Clavicola               L Clavicle
    SX Braccio superiore   L UpperArm
    SX Avambraccio          L Forearm
    SX Mano                    L Hand
    DX Clavicola              R Clavicle
    DX Braccio superiore   R UpperArm
    DX Avambraccio         R Forearm
    DX Mano                   R Hand
    DitoManoDX0             R Finger 0
    (NOTE: Leave the "Bip01" part of the bone name intact.)

    That's about it for TS player models, very short, but the renaming takes a bit.

    To convert them back to TS, just rename the bones with their italian counterparts.

    Also remember to add in the name of your new Reference SMD to the TS model's QC File.

    (NOTE: The model might not look right ingame, this is only the basics, you can tweak the model yourself.)

    (NOTE: I can't add this to the top because I went over the max character limit again :-/ Also, I noticed that I had a bone name

    wrong, DX and SX Braccio superiore, the "s" in superiore needs to be lower case.
    )

    HACKING MODELS Code: BBC_HM

    Rating: Nubbish
    Special Requirements: None

    Model hacking is very easy, and when done right it can appear like it was always on the model.

    For this tutorial, I'll be taking Gordon and Hacking the scientist's glasses onto him.

    As with any tutorial, start by creating a new folder where you keep your conversions. Name the folder GordonGlasses. Go

    into Half-Life Model Viewer and browse to your Half-Life pak file (located in

    half-life\valve\pak0.pak.)

    Select player.mdl and save the model to the GordonGlasses folder. Now, select

    Scientist.mdl and extract it to the same place.

    (NOTE: I'm using low-def models for this tutorial, if you want to use HD models, go right ahead.)

    Load up Milkshape 3D and use Krastisto's Model Decompiler to decompile the Gordon model

    (Player.mdl), decompile everything.

    Now, decompile the scientist model (Scientist.mdl) but this time, decompile only the reference and textures. Import the

    gordon SMD and then import the Walter head (importing only the triangles, no

    skeleton.). Delete the Walter head and leave only the glasses, then fit them around gordon's head. Use the

    Select, Move, and Scale tools to manipulate the glasses.

    Once you have the glasses in the desired position around gordon's head, go into the Joints tab and select the bone named

    Bip01 Head. This is what gordon's head is assigned to, and what we need to assign the glasses to. So select the glasses

    (With the bone still highlighted) and click the Assign button. There! The glasses are properly assigned! Save the SMD as

    what you want it, and go into the Gordon QC file and edit in the new SMD in place of the name of the old gordon SMD.

    Great! Now it's properly in place! Compile the SMD and view the model in HLMV!

    (NOTE: This tutorial may be applied to any model.)

    SWITCHING WEAPONS Code: BBC_SW

    Rating: Moderate

    If you read the first tutorial I put up, you'll notice a piece of the QC file I posted has a group named $bodygroup

    weapons
    . This group contains the weapons the Grunts, Massns, Spies, Shock Trooper, and Barney carry ingame.

    The ones up there are the low-def shotgun and low-def 9mmAR, you can swap either out for this tutorial.

    First, select a weapon to add in, I chose the P 90 that Toadie

    posted.

    (NOTE: I chose the model because it had all faces intact. I also chose the model because the hands are seperated from the gun by

    SMDs. If you want, you can choose a model with a m203 instead.
    )

    First, we need to decompile the model, so go into Kratisto's MDL Decompiler again in MS3D. Decompile

    only the Reference and Textures for the model.

    Since I'm using an automatic weapon for this tutorial, I'll import Gunreference.SMD from the

    GordonGrunt conversion we did earlier.

    Now, merging SMDs is easy. Go to File>Import>Half-Life SMD and select the P90 Reference. When the box pops up asking what

    you want to import, make sure only the Triagles button is checked.

    Now that you have both SMDs in MS3D at the same time, it's time to assign the P90 to where the MP5 is. You'll need to use the

    Move and Rotate functions to position the gun inplace directly where the MP5 is.

    With that done, you need to assign the P90 to the bone that the MP5 is assigned to. Go to the Joints tab on the side menu

    and select the bone Line01, which is what the mp5 is assigned to. Select the bone, and then select the gun parts you want

    to assign. Click the assign button on the bone, and you should see all the pixels on the model turn red.

    Delete the unessicary groups, (mp5sideview and m203) and export the model, as, say, P90.SMD. Go into your QC file for the

    grunts, and edit the $bodygroup weapons section.

    Change the line:

    Code:
    $bodygroup weapons
    {
    studio "gunreference"
    studio "gunreference(shotgun)"
    blank
    }
    to

    Code:
    $bodygroup weapons
    {
    studio "P90"
    studio "gunreference(shotgun)"
    blank
    }
    Now that will switch in our P90 for the regular vanilla MP5. Save the QC file and compile it!

    (NOTE: It will work, but he's holding it wrong, play around with the positioning of the P90 in the SMD we made earlier.)

    CHANGING HANDS Code: BBC_CH

    Rating: NUBBISH and INSANE
    Special Requirements overall: Opposing Force retail (however I think the demo version will work too)

    I was holding off on doing this tutorial, as, I SWEAR, it's impossible to tell starting off how the conversion will go. But, I'll continue on.

    During my testing of thus, I found that there are two types of hand conversions.

    There is an easy way to tell the difference between which tutorial you need to use for hand converting. The two types (that I've noticed so

    far) are the Nubbish Hand Conversion Method and the Dear God This Is Insanity Conversion Method.

    We'll deal with the first one first.

    THE NUBBISH HAND CONVERSION METHOD
    REQUIREMENTS: Either the HD 9mmAR from Opposing Force or the LD one. This tutorial is written with the HD one in mind.

    (thanks to CPL.Shepard for providing the example)

    This just involves some tinkering with a QC File. Since such an excellent example popped up within the last few days, I'll use it.

    First off, download this model: http://www.svencoop.com/forums/attac...&postid=189119

    Save it to a folder in your Conversions folder (hopefully you've followed that from my other tutorials :P ) and open up Milkshape

    3D
    . Decompile the model using Krastisto's.

    (NOTE: You do not need to edit anything!)

    Now, use HLMV to browse to your Opposing Force .pak file, either pak0 or

    pak1 is fine (pak0 is Low-Def, pak1 is High-Def).

    Extract the v_9mmAR model to the folder you put the mp5 model in. Decompile the model using Krastisto's (reference and

    textures only) and you'll notice that both models (during the decompiling) have two references named:

    MP5: v_gordon_hands_reference

    and

    9mmAR: v_soldier_hands_reference

    You've just done half the work in itself. All you need to do from this point on is open the QC file, and edit in the

    v_soldier_hands_reference instead of v_gordon_hands_reference.

    Compile and you're done! View the model in HLMV if you desire!
    Liquid Banjo

  3. #3
    THCFalcon91 PhatMan's Avatar
    Join Date
    Aug 2007
    Location
    Maple Valley
    Posts
    71

    Re: Panzerfaust's Big Book of Converting

    if i had a credit card i'd donate to you!
    thank you SO MUCH
    ive always wanted to do this kinda stuff and i just did
    i turned the q2marine player from qwertz's model pak into an hgrunt!!

    now all i have to learn is how to mess around with the model to get rid of some clipping issues, namely the q2marine's bulk flak jacket clipping into his face

    Edit: OH NO!!! it crashes every time i look at (i think) an already dead laying on the ground hgrunt. ie in the single player, we've got hostiles, when you round the corner to encounter a sentry, a spawning headcrab, and the hgrunt dead next to an explosive crate, and thats where you get the mp5.

    i have this problem with a lot of replacement models. there are so many barney replacements that crash me if the barney is dead on the floor (or in the singleplayer when he gets cut in half by the laser early on, or in osprey when the gonome past the teleporter is eating barney.

    plz help i <3 making models!!
    Last edited by PhatMan; 21-08-2007 at 06:43 PM. Reason: crashes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •