[Tutorial] The complete guide to decompiling and recompiling models!

Discussion in 'Tutorials & Resources' started by Psy, Aug 20, 2009.

  1. Mick-a-nator

    aa Mick-a-nator

    Messages:
    640
    Positive Ratings:
    314
    no, this is in GUIStudioMDL (2.2). It just aborts the compile after that.
     
  2. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,464
    What are you trying to recompile? Also, post your QC.
     
  3. Mick-a-nator

    aa Mick-a-nator

    Messages:
    640
    Positive Ratings:
    314
    Last edited: Sep 4, 2009
  4. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,464
    Code:
    $cd "C:\Program Files (x86)\Steam\SteamApps\e_spy\team fortress 2\tf\models\sawmill_stairsb"
    $modelname "props_forest\sawmill_stairsb.mdl"
    $model "body" "sawmill_stairs_reference.smd"
    $cdmaterials "models\props_forest\"
    $hboxset "default"
    $hbox 0 "static_prop" -108.619  -119.336  -81.207  120.619  204.336  135.206
    // Model uses material "sawmill_wood.vmt"
    // Model uses material "sawmill_bolts.vmt"
    $surfaceprop "wood"
    $illumposition 6.000 42.500 27.000
    $sequence idle "idle" fps 30.00
    $collisionmodel "phymodel.smd" {
    
    	$concave
    	$mass 1.0
    	$inertia 1.00
    	$damping 0.00
    	$rotdamping 0.00
    }
    
    No need to rename the SMDs, only the model name.
     
  5. Peterm

    Peterm Banned

    Messages:
    171
    Positive Ratings:
    8
    if any1 see's this when it came to skinning a model i got this error

    Created command line: "C:\Program Files\Steam\steamapps\broadwey\sourcesdk\bin\orangebox\bin\studiomdl.exe" -game "c:\program files\steam\steamapps\broadwey\team fortress 2\tf" -nop4 -nox360 "C:\Users\Mac\Desktop\Rock001burnt skin\mdldecompiler.qc"

    qdir: "c:\users\mac\desktop\rock001burnt skin\"
    gamedir: "c:\program files\steam\steamapps\broadwey\team fortress 2\tf\"
    g_path: "C:\Users\Mac\Desktop\Rock001burnt skin\mdldecompiler.qc"
    Building binary model files...
    Working on "mdldecompiler.qc"
    SMD MODEL C:\Users\Mac\Desktop\Rock001burnt skin/rock001_reference.smd
    SMD MODEL C:\Users\Mac\Desktop\Rock001burnt skin/lod1_rock001_reference.smd
    SMD MODEL C:\Users\Mac\Desktop\Rock001burnt skin/idle.smd
    Lod 1: vertexes: 2020 (305 new)
    ---------------------
    writing c:\program files\steam\steamapps\broadwey\team fortress 2\tf\models/props_recompiled\rock001.mdl:
    Error opening c:\program files\steam\steamapps\broadwey\team fortress 2\tf\models/props_recompiled\rock001.mdl! (Check for write enable)
     
  6. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,464
    Have you created the folder 'props_recompiled' in your 'tf/models' folder?
     
  7. Peterm

    Peterm Banned

    Messages:
    171
    Positive Ratings:
    8
    ah ok that was it thanks checking now if my skin looks ok / works
     
  8. Peterm

    Peterm Banned

    Messages:
    171
    Positive Ratings:
    8
    ok i've done this what i've been trying to do is you know on hammer on a prop_static you get a skins tab im trying to create an extra 1 of them any1 help cuz i've recompiled adding the line for materials do i have to move the mdl to props_mining (it's rock 001
     
  9. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,464
    Erm, your model and texture should be in unique folders. For example, not props_mining or any folder that is a part of the game but props_yourcustomfolder.
     
  10. Peterm

    Peterm Banned

    Messages:
    171
    Positive Ratings:
    8
    so what directory would that be wud itbe teamfortress2/tf/models?
     
  11. Peterm

    Peterm Banned

    Messages:
    171
    Positive Ratings:
    8
    sldo where wud i put the textures?
     
  12. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,464
    Wherever you've pointed your $cdmaterials to.

    For example, if you have $cdmaterials "models\props_yourfolder/" then you would create 'props_yourfolder' under 'tf/materials/models'.
     
  13. Peterm

    Peterm Banned

    Messages:
    171
    Positive Ratings:
    8
    ye not sure bout that i'll try
     
  14. Peterm

    Peterm Banned

    Messages:
    171
    Positive Ratings:
    8
    ok umm i'll c if it works dont think it does though
     
  15. Peterm

    Peterm Banned

    Messages:
    171
    Positive Ratings:
    8
  16. Peterm

    Peterm Banned

    Messages:
    171
    Positive Ratings:
    8
    wow u aint come back to this :(
     
  17. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,464
    Your file structure confuses me. Why don't you put the material for the model in a folder of the same name instead of using prop_mining?
     
  18. Peterm

    Peterm Banned

    Messages:
    171
    Positive Ratings:
    8
    they're bot in a prop mining folder of the same name though
     
  19. Boylee

    aa Boylee pew pew pew

    Messages:
    1,068
    Positive Ratings:
    630
    Thanks for the great tutorial Psy!

    Hopefully I'll have some models to post in the models and textures section soon :D
     
  20. Boylee

    aa Boylee pew pew pew

    Messages:
    1,068
    Positive Ratings:
    630
    Not meaning to sound like an idiot, but how do I get the decompiled model into SoftImage?
    It doesn't seem to want to swallow smd's via import or straight opening :S